Entity Relationship Diagrams (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
15 cards from this deck
ShowHide
Practise the cards
15 cards from this deck
ERD full form & purpose
ERD full form & purpose
Entity Relationship Diagram - models database structure
Primary key purpose
Primary key purpose
Unique identifier for each record in a table
What primary key ensures
What primary key ensures
No two records in the table are identical
Foreign key function
Foreign key function
Links to primary key of another table, establishes relationship
Secondary key purpose
Secondary key purpose
Used for data retrieval; allows quick access to records
Secondary key uniqueness
Secondary key uniqueness
Not necessarily unique (unlike primary keys)
1:1 relationship meaning
1:1 relationship meaning
Each record in one table linked to only one in another
1:M relationship meaning
1:M relationship meaning
Single record in one table linked to multiple in another
Most common relationship type
Most common relationship type
One-to-Many (1:M)
M:M relationship meaning
M:M relationship meaning
Multiple records in one table link to multiple in another
How to implement M:M relationship
How to implement M:M relationship
Create a junction table with foreign keys to both tables
Junction table definition
Junction table definition
Associative table with foreign keys linking back to both tables
Composite primary key
Composite primary key
Combination of fields used as primary key
Shape used for entities in ERD
Shape used for entities in ERD
Rectangles
ERD relationship label types
ERD relationship label types
1:1, 1:M, or M:M
