Relationships, Types, Cardinalities Flashcards
What is an Entity Relationship Diagram (ERD)?
A visual representation of the relationships between entities in a database.
What is Cardinality in ERDs?
The number of instances of one entity that can (or must) be associated with each instance of another entity.
What are the three main types of Cardinality?
One-to-One (1:1), One-to-Many (1:M), Many-to-Many (M:N).
In a One-to-One relationship, how many instances of each entity are involved?
One instance of each entity.
In a One-to-Many relationship, how many instances of the first entity are associated with one instance of the second entity?
One instance.
In a Many-to-Many relationship, how many instances of each entity can be associated with each other?
Multiple instances.
What symbol is used to represent One-to-One relationships in an ERD?
A straight line connecting the two entities.
What symbol is used to represent One-to-Many relationships in an ERD?
A line with a crow’s foot at one end connecting the two entities.
What symbol is used to represent Many-to-Many relationships in an ERD?
Two lines with crow’s feet at both ends connecting the two entities.
What is meant by the term ‘mandatory’ in Cardinality?
Indicates that an entity instance must participate in the relationship.
What is meant by the term ‘optional’ in Cardinality?
Indicates that an entity instance may or may not participate in the relationship.
What does a double line between two entities in an ERD represent?
An identifying relationship where the child entity’s existence depends on the parent entity.
What is the difference between a weak entity and a strong entity in an ERD?
A weak entity cannot be uniquely identified by its attributes alone, while a strong entity can.
What is a recursive relationship in an ERD?
A relationship where an entity is related to itself.
What is the purpose of using Cardinality in an ERD?
To define the relationship between entities and specify how many instances can be associated with each other.