BizTechLab

IDEASINNOVATIONIMPACT

1. Relational Model

Degree

A relation's degree is simply the number of columns it has — fixed by its schema, not by how much data is in it.

Why This Matters

  • Degree and cardinality (next chapter) are two of the most commonly mixed-up terms in database theory.
  • Getting them straight now avoids a very common early confusion, including in interviews.

Core Concept

  • A relation's Degree is the count of its attributes (columns).
  • A table with 5 columns has degree 5 — full stop, regardless of whether it has 0 rows or 10 million.

Deep Dive

  • Degree is a property of a table's structure (its schema), not its data — it only changes when you explicitly add or remove a column, never when you insert or delete rows.
  • This is the key thing that separates it from cardinality: degree answers "how wide is this table", cardinality answers "how many rows does it currently have".

Interview Questions

beginner

What is the degree of a relation?

The number of columns (attributes) it has. It's a structural property, fixed by the schema, and doesn't change based on how many rows the table holds.

Chapter Summary

Degree is a table's column count — a structural fact, not a data fact. It changes only when the table's design itself changes.