Database Fundamentals: Keys, Relationships, and Normalization Concepts
Identify FK in ERD
A field that connects to another table's primary key
Foreign Key (FK)
A field that links one table to another by referencing a Primary Key
M:M Relationship
Many records in Table A relate to many in Table B (requires a junction table)
1:M Relationship
One record in Table A relates to many records in Table B
1:1 Relationship
One record in Table A relates to one record in Table B
Identify PK in ERD
The unique identifier in each entity (usually underlined or labeled)
Why use normalization?
To avoid duplicate data and improve data integrity
Why use a Foreign Key?
To create relationships between tables
Why use GROUP BY?
To summarize data (e.g., totals, counts)
Why use a Primary Key?
To uniquely identify each record in a table
When do you use HAVING instead of WHERE?
When filtering aggregated results (like COUNT or SUM)
Junction Table
A table used to break down a many-to-many relationship into two one-to-many relationships
Primary Key (PK)
A unique identifier for each record in a table (no duplicates, no nulls)
API
A way for different systems to communicate and exchange data (Application Programing Interface)
CRUD
Create, Read, Update, Delete (basic database operations)
Cardinality
Describes the relationship between tables (1:1, 1:M, M:N)
Referential Integrity
Ensures that foreign keys match existing primary keys (no broken links between tables)
Normalization
Organizing data to reduce redundancy and improve efficiency
