Flashcards
The Entity Relationship Model
Cards in this deck (9)
- 1What is an entity? What is its diagrammatic representation?-Any real thing/abstract notion that we recognise as a separate concern within the database.
-Rectangle labelled by name of entity. - 2What is a relationship? What is its diagrammatic representation?-Named association between two entity types, which has some meaning in the context of the database.
-Labelled line connecting two entities - 3What is the cardinality of a relationship? What is the diagrammatic representation of this?-The number of entity occurrences that are related to a single occurrences of an associated entity type through this relationship.
Can be 1:1, 1:*, *:1, *:*.
-Crows' foot, straight line for 1, 3 angled lines for many. - 4How are primary keys represented diagramatically?Underlined.
- 5What is a simple attribute? What is a composite attribute?Simple: only has one single component
Composite: has multiple components eg address - 6What are single value, multivalued, and derived attributes?Single value: holds only one value
Multivalued: can hold many values eg many phone numbers in an office
Derived: derivable from value of related attribute eg age from DOB - 7Separate entity or composite attribute?Better to have separate entity.
- 8How can you resolve many to many relationships? Why is this necessary?-Introduce a new entity and have a 1:* and *:1 relationship instead
-This is because we cannot map FKs to PKs in a *:*. - 9how do you construct a relational model from an ER model?-Resolve *:* relationships
-Build relational tables from entities in ER diagram
-Map FKs with primary keys.
Information
- Description
- Flashcards on The Entity Relationship Model, created by SEZ McKelvey on 06/04/2018.
- Created by
- SEZ McKelvey
- Views
- 0
- Rating