Data Entities: Cardinalities & Keys Flashcards
What is a Cardinality of a relationship?
How many instances of an entity relate to one instance of the other entity
Cardinality examples:
1..1, 1..*, ..
What is a primary key?
The attribute that uniquely identifies an entity
What is a foreign key?
Links attributes in other entities
What’s the relationship between primary and foreign key in a 1..* relationship?
The primary key from the “1 end” is added as foreign key in the “many end”
What’s the relationship between primary and foreign key in a 1..1 relationship?
Both ends may have the same primary key
How are relationships between entities created?
Created by keys and are represented by storing the primary key values in the other entity