Quick Scoop

In SQL, an attribute usually means a column in a table. It describes one property of the entity stored in each row, like Name, Age, or Email.

Simple example

If you have a Students table:

  • StudentID is an attribute.
  • Name is an attribute.
  • DateOfBirth is an attribute.

Each row is one student, and each attribute stores one piece of information about that student.

Why it matters

Attributes help define:

  • what data a table stores.
  • what type of data each field can hold.
  • rules like PRIMARY KEY, UNIQUE, and NOT NULL.

Tiny SQL example

sql

CREATE TABLE Students (
  StudentID INT PRIMARY KEY,
  Name VARCHAR(100),
  DateOfBirth DATE
);

Here, StudentID, Name, and DateOfBirth are the attributes, and their data types control what values they can store.

If you want, I can also explain the difference between attribute, field, column, and entity in one short table.