Entity |
Real-world object or concept that can be distinctly identified |
Customer, Product, Order |
Attribute |
Property or characteristic of an entity |
name, email, customer_id |
Primary Key (PK) |
Unique identifier for each row in a table |
customer_id, product_id |
Foreign Key (FK) |
Column that references primary key of another table |
order.customer_id → customer.customer_id |
Relationship |
Association between entities |
Customer orders Products |
Cardinality |
Number of instances in relationship (1:1, 1:M, M:N) |
One-to-Many, Many-to-Many |
ERD |
Entity Relationship Diagram - visual representation of data |
Crow's Foot notation diagrams |
Normalization |
Process of organizing data to reduce redundancy |
1NF, 2NF, 3NF, BCNF |
First Normal Form (1NF) |
Each column contains atomic values, no repeating groups |
Separate columns for each attribute |
Second Normal Form (2NF) |
1NF + all non-key attributes fully dependent on primary key |
No partial dependencies |
Third Normal Form (3NF) |
2NF + no transitive dependencies |
No indirect dependencies |
BCNF |
Boyce-Codd Normal Form - stricter version of 3NF |
Every determinant is a candidate key |
Constraint |
Rule that enforces data integrity |
NOT NULL, UNIQUE, CHECK |
Index |
Data structure that improves query performance |
Index on frequently queried columns |
Transaction |
Logical unit of work with ACID properties |
COMMIT, ROLLBACK |
ACID |
Atomicity, Consistency, Isolation, Durability |
Transaction properties |