Ch 3. E/R Diagrams
Role
Help to explain relationship E.g. Employee: role - employee or worker Department: role - employer or department
derived attribute
An attribute whose values can be calculated from related attribute values. E.g. Attribute "AGE" can be found from attribute "birthday"
How is Partial Participation represented in an ER Diagram
Single line from entity to relation.
partial participation
Some instances may participate, but dont have to.
binary relationship
Specifies the max number of relationship instances that entity can participate in
data association
one entity type refers to another entity type.
Types of Binary Relationships
one to one (1:1), one to many (1:N), many to one (M:1), many to many, (N:M)
Role Name
signifies the role that a participating entity type plays in each relationship instance. In some cases the same entity type participates more than once in a relationship type in different roles. Optional but essential for recursive relationship.
How is Weak Entity Type represented in an ER Diagram
A Double Lined rectangle.
Entity Type
A collection of entities that share common properties or attributes. Each entity has own value(s) for each attribute.
How is a relationship represented in an ER Diagram
A diamond
Unified Modeling Language (UML)
A language based on object-oriented concepts that provides tools such as diagrams and symbols to graphically model a system. *refer to notes*
How is an Entity represented in an ER Diagram
A rectangle
How is a single value attribute represented in an ER Diagram
A single lined oval
single-valued attribute
An attribute that can have only one value. E.g. Age, b-day
Multi-valued attribute
An attribute that may take on more than one value for a given entity (or relationship) instance. E.g. Phone, college degree
Weak Entity Type
An entity type whose existence depends on some other entity type. Do not have key attributes of its own. Usually has partial key. Has one or more ID (owner or parent) entity type. Always has TOTAL participation. Not every existence dependency results in a weak entity type.
How is Attributes represented in an ERD diagram
As an oval
Key attribute/Uniqness constraint
Attribute w/ distinct value for each individual entity in entity set. An entity type may have have more than one key attribute, but MUST HAVE ONE.
How is Partial Key represented in an ER Diagram
Dashed and Underlined Oval
How is a derived attribute represented in an ER Diagram
Dashed-oval
Relationships
Data associating among objects (connections) Represent such references as relationships, not as attributes.
Relationship type R among 'n' entities
Defines a set of associations among entities from these entity types.
How is are binary relationships represented in an ER Diagram
Displays 1 (max 1),N (no max), or M (no max) to and from diamonds. Read from left-to-right or bottom.
How is Total Participation represented in an ER Diagram
Double line from entity to relation
How is an Identifying Relationship between weak entities represented in an ER Diagram
Double lined diamond
Total participation
Each instance HAS to participate
ER Model
Entity Relationship Model
Attributes
Properties of an object that describe the entity Each attribute has value(s)
Relationship set R == set of relationship instances r_i
R_i : Associates 'n' individual entities (e1, e2,...e_n) e_j in r_i: members of entity set e_j
Composite Attributes
Referenced as a unit or referred to its components. Useless if reference only as a whole.
Identifying Relationship
Relates a weak entity types to its owner (or parent) entity types. A weak entity type. At least one, may be more, identifying entity types.
Relationship vs Operation
Relationship in ERD specifies data association (how entities are related to each other). Operations is specified in functional spec. ERD specifies data requirements/aspect, not operations. ERD provides data model upon which operations are operated. Don't mix operations w/ relationships. Operations should be tracked separately, with the help of UML.
Recursive Relationship
Relationship when the same entity types participates in more than one relationship type in different roles.
Min,max notation
Replaces the cardinality ratio (1:1, 1:N, N:M) and single/double line participation constraints (no need)
Partial Key
Uniquely distinguish weak entities related to the same owner entity. May have duplicated value among all (weak) entities
Cardinality Ratio
Usually 1:1 or 1:N where 1 is on owner entity side.
Simple Attributes
a single atomic value that can not be split up any further (reference as a whole)
How is a key attribute represented in an ER Diagram
an underlined-oval
How is a multi value attribute represented in an ER Diagram
double lined oval
Alternate notation for ER Diagrams
min,max
How is min,max represented in an ER Diagram
min,max on "other side" of entity. (In UML they're on the same side) *refer to notes*
Entities
objects in real world w/ independent existence Obj w/ physical existence (person, car, house) Obj w/ conceptual existence (job, course, company)