Chapter 9 Data Modeling Flashcards
What is a Binary Relationship?
A binary relationship is the simplest kind of relationship involving two entity types.
Example: A small Entity-Relationship (E-R) diagram could illustrate the binary relationship between salespersons and products.
“The Garment Utilization System (GUS) at Disney theme parks tracks costumes worn by ‘cast members’ and manages their lifecycle using barcode scanning.”
How is this an example of a database application using binary relationships?
binary relationships refer to associations between two entities in a database model.
The binary relationships in GUS:
- Cast Member to Costume: Each cast member wears one or more specific costumes, creating a relationship where each cast member is associated with the garments they are responsible for or wearing on a particular day.
- Costume to Garment Lifecycle Events: Each costume can go through various lifecycle stages, such as checking in, maintenance, and checking out to cast members. The relationship between costumes and their lifecycle events can also be considered a binary relationship.
The entities can be cast members & customes
What does cardinality refer to in E-R diagrams?
Cardinality refers to the maximum number of associations between two entities.
What is a One-to-One Relationship?
Think an paired group of salespersons
In a one-to-one relationship, each office has at most one salesperson, depicted in an E-R diagram with a ‘bar’ symbol showing maximum one cardinality.
What is a One-to-Many Relationship?
A one-to-many relationship occurs when a salesperson manages to many salespersons, represented in the E-R diagram by the ‘crow’s foot’ symbol.
Zero or many salespersons
What is a Many-to-Many Relationship?
think of a salesperson & products
A many-to-many (M-M) relationship occurs between many products & “the many parts of those products”, where neither can directly contain a quantity attribute.
What are Associative Entities?
- Associative entities, or junction tables, are used in databases to represent many-to-many relationships.
- They store data about the relationship between two entities and can include additional information related to that relationship.
What are unique identifiers in many-to-many relationships?
Many-to-many relationships should have unique identifiers, typically a composite of the unique identifiers from the two entities involved.
What is a Unary Relationship?
Unary relationships associate occurrences of an entity type with other occurrences of the same entity type.
What is a One-to-One Unary Relationship?
An example is the ‘Back-Up’ relationship where salespersons are organized in pairs as backups for each other.
What is a One-to-Many Unary Relationship?
In this relationship, some salespersons may act as sales managers, overseeing multiple salespersons.
What is a Many-to-Many Unary Relationship?
Where parts can be made from several other parts and can also be “components of multiple other parts”.
What is a Ternary Relationship?
A ternary relationship involves three different entity types, such as salespersons, customers, and products.
What does intersection data in a ternary relationship include?
Intersection data consists of the date of the sale and the number of units of the product sold.
what are lock acquisition in transactions
Acquiring a lock allows a thread to have exclusive access to the data guarded by that lock, forcing other threads to block