GPT E/R Model Flashcards
Who developed the E/R model and what is its purpose?
Peter Chen in 1976 for conceptual database design using graphical representation
What are the core constructs of the E/R model?
- Entity
- Relationship
- Attribute
Entity
Class of objects with common properties and unique name
Relationship
Logical link between two or more entities
STUDENT “attends” COURSE
Attribute
Propoerties of entities or relationships
Name, BirthDate, etc.
Cardinality constraints
Rules specifying minimum and maximum participation in relationships or attributes
Why attributes too? Well we have recursive relationships?
Weak entity
An entity that depends on another entity for identification
Primary key the foreign key
Order Item is a weak entity to Order for example
Composite attributes
Aggregate of multiple attributes
City + Street = Address
Recursive relationships
Entity relates to itself
PERSON “friends” PERSON
Generalization in the E/R Model
A hierarchy where child entities inherit properties from a parent entity.
Data Dictionary
Documentation of entities, relationships, and their attributes with descriptions
Two types of E/R notations
DB-Main and Crow’s Foot
Main limitations of E/R model
- Cannot express all integrity constraints
- Requires additional documentation to bridge design gaps
How is E/R model used in reverse engineering?
To analyze and redesin existing databases lacking conceptual-level documentation
Ternary relationship
A relationship involving three entities
What is an identifier in the E/R model?
An attribute or combination of attributes that uniquely identify an entity
Primary Key
What is a subset in E/R Modeling?
A special hierarchy where a specialized class (STUDENT) is a subset of a parent entity (PERSON)
Don’t get how this hierarchy is special
Why is documentation important in E/R modeling?
To supplement the model’s expressiveness and ensure clarity in design and implementation
What kind of key does a weake entity use?
A composite key that includes a foreign key from the strong entity
Entity-level cardinality
For my own confusion I added this card
General rules about how many isntances of an entity can relate to another entity
How we see it modeled, but enforced at instance level
Most of the time its only one instance from an entity thats relating to another soooo, i mean otherwise it would be a many to many relationships requiring another table
Implicit constraints
Inherent design to E/R model
Explicit constraints
Defined by database designer to enforce business rules
When is it necessary to create a relationship table?
- Many-Many relationships
- Relationships have attributes (ENROLLMENT includes EnrollmentDate)