Unit 2 Flashcards
Primary Key
attribute with information that uniquely identifies each instance in the table. There can only be one primary key.
Candidate Key
The primary key and alternative keys. All candidate keys that are not the primary key are alternative keys.
Alternative Key
All keys that could be primary keys but are not selected to be the primary key.
Foreign Key
Keys that are primary keys in other tables.
Composite Primary Key
Combines two attributes to uniquely identify instances in a table.
Surrogate Key
Auto generated values.
Should you use surrogate keys on every table?
No. Overusing surrogate keys confuses the design and relationships of the table.
What does it mean for data to be atomic?
Data values cannot be broken down any further.
Determinant
An attribute which uniquely determines other attributes. Ex: studentID uniquely identifies studentName and studentGPA.
Meaning of “A → B”
B is functionally dependent on A.
What makes a well-structured relation?
- minimal data redundancies.
- designed to avoid insert, delete, and update anomalies.
Types of Functional Dependencies
Full Dependency, Partial Dependency, Transitive Dependency
Full Dependency
The determinant is the primary key (s) and all attributes have a functional dependency on the determinant (s).
Partial Dependency
The determinant is part of the primary key and one or more of the attributes have a functional dependency on the determinant. Can only exist when there is a composite primary key.
Transitive Dependency
The determinant is not part of the primary key and one or more of the attributes has a functional dependency on the determinant.