BizTechLab

IDEASINNOVATIONIMPACT

1. Relational Model

Column (Attribute)

A column is a named, typed slot that every row in a table has a value for (or NULL) — it represents one specific property being recorded.

Why This Matters

  • A column is where a table's actual meaning lives — the table "orders" is meaningless until its columns tell you it tracks a customer, a date, and an amount.
  • Naming and typing columns well is one of the highest-leverage decisions in schema design, and it starts here.

Core Concept

  • A Column (formally, an Attribute) is a named position in a table that holds one specific kind of value for every row — an age column, a name column, a signup-date column.
  • Every column has a declared data type (you'll meet the real types in the Data Types section), which constrains what values it can legally hold.

Deep Dive

  • A column's name and type are part of the table's schema — fixed when the table is designed, not something that changes row by row.
  • Two different tables can have columns with the same name (both "users" and "orders" might have a "created_at" column) — a column's identity is scoped to its table, not global.
  • A well-named column should tell you what it holds without needing a comment — "signup_date" is self-explanatory; "date1" is not.

Common Mistakes

Giving a column a vague, generic name like "value", "data", or "type1".

Why: A column name is often the only context a future reader gets — a vague name forces them to go read application code just to understand what a table stores.

Fix: Name columns for what they actually represent (customer_email, not field3), even if it makes the name longer.

Interview Questions

beginner

What is a column, formally?

An attribute — a named, typed position in a table that holds one specific kind of value for every row.

intermediate

Why does a column's data type matter beyond just storage?

A type is a promise about what shape every value in that column will have, which is what lets the database — and every reader — trust the column's meaning without re-checking it, the same idea from the very first chapter of this course, applied specifically to columns.

Chapter Summary

A column (or attribute) is a named, typed slot every row fills in — it's where a table's actual meaning lives. A column's name and type are fixed by the schema, shared by every row, and scoped to their own table.