Relations (Database Design) Flashcards
Any set of one or more columns that uniquely identify a row in a
table.
Superkey
A minimal superkey, meaning it uniquely identifies a row
without any unnecessary columns.
Candidate Key
The chosen candidate key to uniquely identify rows in a table.
Primary Key
Other candidate keys not chosen as the primary key
Alternate Key
A key derived from real-world attributes (e.g., SSN, Email).
Natural Key
An artificially generated key (e.g., UserID) with no business
meaning, often used for simplicity and efficiency.
Surrogate Key
A single column serving as a primary key (e.g., StudentID).
Simple Key
A primary key made of multiple columns (e.g., {OrderID,
ProductID}).
Composite Key
Often used interchangeably with composite key, but
technically refers to combining columns that have meaning together.
Compound Key
Defines the number of instances of one entity that can or must be associated with instances
of another entity
Cardinality / Multiplicity
Each record in one table is associated with exactly one record in another
table.
One-to-One
A single record in one table can be related to multiple records in
another table, but each record in the second table relates to only one record in the first.
One-to-Many
Records in one table can relate to multiple records in another and vice versa
Typically implemented using a junction table
Many-to-Many
Defines whether an entity’s participation in a relationship is mandatory or optional.
Modality / Participation
Entities in one table may or may not have related records in another table
Optional