data modeling supplement. six blind men and the elephant

12
Data Modeling Supplement

Upload: roy-oliver

Post on 18-Jan-2018

220 views

Category:

Documents


0 download

DESCRIPTION

Basic ERD Symbology EntityRelationship AttributeMultivalued Attribute Associative Entity

TRANSCRIPT

Page 1: Data Modeling Supplement. Six Blind Men and the Elephant

Data Modeling Supplement

Page 2: Data Modeling Supplement. Six Blind Men and the Elephant

Six Blind Men and the Elephant

Page 3: Data Modeling Supplement. Six Blind Men and the Elephant

Basic ERD Symbology

Entity Relationship

Attribute MultivaluedAttribute

AssociativeEntity

Page 4: Data Modeling Supplement. Six Blind Men and the Elephant

Typical Business RelationshipsPRODUCTS CUSTOMERS

are purchased by

SUPPLIERS PRODUCTSsupply

ORDERS PRODUCTScontain

ORDERS CUSTOMERSare placed by

EMPLOYEES OFFICESare assigned to

PRODUCTS STORESare sold in

Page 5: Data Modeling Supplement. Six Blind Men and the Elephant

Relationship Complexities(a)

(b)

(c)

EMPLOYEE OFFICE

EMPLOYEE DEPARTMENT

STUDENT COURSE

Each EMPLOYEE must be assigned to one and only one OFFICE.

Each OFFICE may be assigned to one and only one EMPLOYEE.

Each EMPLOYEE must be assigned to one and only one DEPARTMENT.

Each DEPARTMENT may be in charge of zero or more EMPLOYEEs.

Each STUDENT may be registered for zero, one, or many COURSEs.

Each COURSE may be taken by zero, one, or many STUDENTs.

assigned to

assigned to

assigned to

in charge of

registered for

taken by

Page 6: Data Modeling Supplement. Six Blind Men and the Elephant

Unary Relationship

PERSON

COURSE EMPLOYEE

married to

is aprerequisite for

has asa prerequisite

managed by

manage

Each PERSON may be married to one and only one PERSON.

Each COURSE may have zero, one, or many prerequisite COURSEs.Each COURSE may be a prerequisite for zero, one, or many COURSEs.

Each EMPLOYEE must be managed by one and only one EMPLOYEE.Each EMPLOYEE may manage zero, one, or many EMPLOYEEs.

Page 7: Data Modeling Supplement. Six Blind Men and the Elephant

Binary RelationshipEMPLOYEE

STUDENT COURSE

assigned to

assigned to

Each EMPLOYEE must be assigned to one and only one OFFICE.Each OFFICE may be assigned to one and only one EMPLOYEE.

Each STUDENT may be registered for zero, one, or many COURSEs.Each COURSE may be taken by for zero, one, or many STUDENTs.

Each CUSTOMER may place zero, one, or many ORDERs.Each ORDER must be placed by one and only one CUSTOMER.

OFFICE

CUSTOMER ORDER

registered for

taken by

place

placed by

Page 8: Data Modeling Supplement. Six Blind Men and the Elephant

Ternary Relationship

STUDENT

MAJOR

ADVISOR

Each STUDENT must have declared one or more MAJORs and be assigned to one or more ADVISORs.

Each ADVISOR must be assigned to one or more STUDENTs and be responsible for one or more MAJORS.

Each MAJOR must be declared by one or more STUDENTs and be assigned to one or more ADVISORs.

Page 9: Data Modeling Supplement. Six Blind Men and the Elephant

Associative Entity

PASSENGER

SCHEDULED FLIGHTS

PASSENGER

SCHEDULED FLIGHTS

RESERVATION

make reservation

reserved by

(a)

(b)

Page 10: Data Modeling Supplement. Six Blind Men and the Elephant

Reading Relationships

Each…

entity1 relationship entity2

Each…

CUSTOMER may be placing one or more ORDERS.

ORDER must be placed by one and only one CUSTOMER

must beor

may be

one or moreor

one and only one{ } { }

Page 11: Data Modeling Supplement. Six Blind Men and the Elephant

Characteristics of a Good Data Model

Characteristic Explanation Pictorial

A good data model should be an accurate graphical depiction of the entities and their relationships 

Rigorous and Specific

A good data model should be specific with regard to the identification of all entities and their relationships and rigorous in the identification and specification of the attributes associated with each entity. 

Top-down Decomposable A good data model should be decomposable in the sense that the level of detail for each entity and its associated attributes can be investigated at various levels of detail or aggregation. 

Provide Focus

A good data model should be focused on the data associated with a single system and contained within a single system boundary. 

Minimally Redundant

A good data model will display minimal redundancy with regard to repeated entity types, data redundancy, and many-to-many relationships. 

Transparent

The actual data and the physical structure of the database should be discernable from looking at the graphical data model. 

Easily Navigated

A good data model should be laid out in an organized fashion to allow for the relationships among the entities to be easily followed. 

Predicts the Final System

A good data model should be an accurate prediction of the physical implementation of the system. 

Page 12: Data Modeling Supplement. Six Blind Men and the Elephant

Identifying Entities and Relationships

Question Category Description

Determine System Entities

Find out what types of people, business units, things, places, events, materials, or other organizations are associated with, or interact with, the system and about which data must be maintained.

  Identify Entity Attributes

Identify the characteristics by which each entity is associated or identified with.

  Determine Entity Keys

Identify the most appropriate characteristic for each entity that uniquely distinguishes an instance of that entity from all other instances of the same entity.

  Determine Relationships and Degrees

Identify the various events, transactions, or other business activities that infer an association between entities.

  Determine Cardinalities and Optionalities

Identify the circumstances under which each of the relationships can occur. This requires an investigation into the various business rules under which the organization operates and the constraints imposed on the events which occur within the business environment.