The Entity Relationship(E-R) Model Flashcards
(23 cards)
Purpose of E-R Model
E-R diagrams facilitate database
design
Express logical properties of mini-
world of interest within enterprise
Not limited to any particular DBMS
Entity
Object that exists and that can be distinguished from other objects
Entity Type
Category of entities
Entity Set
Collection of entities of the same type that are well defined
Entity Instance
Particular noun
Entity Type forms
An intension of entity
permanent definition part
Entity instances forms a
Extension of entity
All instances that fulfill the definition at the moment
Basic Symbols for E-R Diagram
Entity - rectangle
Attribute - oval
Relationship - diamond
Link - line
What does the rectangle represent for the entity?
It represents the entity set, not the individual entitity
Attributes
Defining properties or qualities of entity type
Domain
Set of allowed values for attribute
What are some components of an attribute
- May have null values for some entity instances
- May be multi-valued – use double oval on E-R diagram
- May be composite – use oval for composite attribute, with ovals for components
- May be derived – use dashed oval
Best way to remember attributes and entities
Attributes - columns
Entities - rows
Superkey
Attribute or set of attributes that uniquely identifies an entity
Candidate key:
Superkey such that no proper subset of its attributes is also superkey (minimal
superkey – no unnecessary attributes)
Primary key
candidate key actually used for identifying entities and accessing records
Alternate key
candidate key not used for primary key
Composite key
key with more than one attribute
Foreign key
Term used in relational model (but not in the E-R model) for an attribute that is primary key of a table and is used to establish a relationship, usually with another table, where it appears as an attribute also
Relationships
Connections or interactions between entity sets
Represented by diamond on E-R diagram
Relationships type
Category of relationships
Forms intension
Relationships set
Collection of relationships of same type that exist a given moment
Forms extension
What does set and type form?
Type forms intension; set forms