Lecture 2: Entity Relationship Modelling Flashcards
List four concepts of the ER Model
- Entity types
- Relationship Types
- Attributes
- Multiplicity
Why is conceptual design important?
It helps communicate database designs to non-technical users.
Also can be mapped as a relational schema.
What are the types of ER representations?
- Chen’s representation
- UML representation (mordern used)
What is an entity type?
Group of objects with same properties, identified as having an independent existence. Eg.. Beer
Define Entity Occurrence.
Uniquely identifiable object of an entity type
e.g. Beer - Summers, XXX, Extra Dry
Define what is a Relationship type.
Give an example.
Set of meaningful associations among entity types.
e.g. Song - “SING” - Artist
Explain Relationship Occurrence.
Give an example.
Uniquely identifiable association, which includes one occurrence from each participating entity type.
e.g. “humpty dumpty - SINGS - Adele”
Explain and give examples of “Degree of a Relationship”
Give examples of Each.
Number of participating entities in relationship.
- Degree 2: Binary
- Artist sings song
- Customer buys Beer
- Degree 3: Ternary
* A waiter SERVES beer SERVES Customers - Degree 4: Quaternary
Explain what a recursive relationship is.
Relationship type where same entity type participates more than once in different roles.
- lisa FREINDS WITH Jane
- Coke TASTES LIKE Pepsi
Explain characteristics of an Attribute.
Attribute: Property of an entity or a relationship type.
e.g “A car”
- Year = 2010
- Type = Sedan
- Size = Small
- Colour = Red
- Number PLate = NULL
What is an attribute Domain?
- Set of allowable values for one or more attributes
- Similar domains in entity relationship model
- Similar to data types in SQL
- Not usually represented in ER Schemas.
What are composite Attributes?
-
Simple Attribute
- Attribute composed of a single component with an independent existence
-
Composite Attribute
- Attribute composed of multiple components, each with an independent existence
- E.g. STAFF
- ID
- Name
- First name
- Middle Name
- Last Name
Explain what a Multi-Valued attribute is.
-
Single Valued attribute
- attribute that holds a single value for each occurrence of an entity type
-
Multi-valued attirbute
- attribute that holds multiple values for each occurrence of an entity type
- e.g STAFF
- ID
- Degrees[1..*]
Explain what a derived Attribute is
Attribute that represents a value that is derivable from value of a related attribute, or set of attributes, not neccarilly in the same entity type.
List and give definitions of KEYs:
- Candidate
- Primary
- Composite
Candidate Key
- Minimal set of attributes that uniquely identifies each occurrence of an entity type
Primary Key
- Candidate key selected to uniquely identofy each occurrence of an entity type
Composite Key
- A candidate key that consists of two or more attributes.