1 / 18

Six Blind Men and the Elephant

Six Blind Men and the Elephant. Entity. Relationship. Attribute. Multivalued Attribute. Associative Entity. Basic ERD Symbology. PRODUCTS. CUSTOMERS. are purchased by. SUPPLIERS. PRODUCTS. supply. ORDERS. PRODUCTS. contain. ORDERS. CUSTOMERS. are placed by. EMPLOYEES. OFFICES.

nailah
Télécharger la présentation

Six Blind Men and the Elephant

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Six Blind Men and the Elephant

  2. Entity Relationship Attribute Multivalued Attribute Associative Entity Basic ERD Symbology

  3. PRODUCTS CUSTOMERS are purchased by SUPPLIERS PRODUCTS supply ORDERS PRODUCTS contain ORDERS CUSTOMERS are placed by EMPLOYEES OFFICES are assigned to PRODUCTS STORES are sold in Typical Business Relationships

  4. (a) Each EMPLOYEE must be assigned to one and only one OFFICE. Each OFFICE may be assigned to one and only one EMPLOYEE. EMPLOYEE OFFICE assigned to assigned to (b) Each EMPLOYEE must be assigned to one and only one DEPARTMENT. Each DEPARTMENT may be in charge of zero or more EMPLOYEEs. EMPLOYEE DEPARTMENT assigned to in charge of (c) Each STUDENT may be registered for zero, one, or many COURSEs. Each COURSE may be taken by zero, one, or many STUDENTs. STUDENT COURSE registered for taken by Relationship Complexities

  5. PERSON married to COURSE EMPLOYEE is a prerequisite for managed by has as a prerequisite 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. Unary Relationship

  6. EMPLOYEE OFFICE assigned to assigned to COURSE STUDENT registered for taken by CUSTOMER ORDER place placed by 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. Binary Relationship

  7. STUDENT ADVISOR MAJOR 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. Ternary Relationship

  8. (a) PASSENGER SCHEDULED FLIGHTS make reservation reserved by (b) PASSENGER RESERVATION SCHEDULED FLIGHTS Associative Entity

  9. Each… entity1 relationship entity2 must be or may be { } one or more or one and only one { } Each… CUSTOMER may be placing one or more ORDERS. ORDER must be placed by one and only one CUSTOMER Reading Relationships

  10. 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. Characteristics of a Good Data Model

  11. (a) (b) ORDER ORDER NUMBER ORDER DATE CUSTOMER NUMBER CUSTOMER NAME CUSTOMER STREET CUSTOMER CITY CUSTOMER STATE CUSTOMER ZIPCODE CUSTOMER PHONE ORDERED PRODUCT (repeats 1 – n times) PRODUCT ID QUANTITY DESCRIPTION UNIT PRICE EXTENDED PRICE ORDER SUBTOTAL SALES TAX SHIPPING ORDER TOTAL ORDER ORDER NUMBER ORDER DATE CUSTOMER NUMBER CUSTOMER NAME CUSTOMER STREET CUSTOMER CITY CUSTOMER STATE CUSTOMER ZIPCODE CUSTOMER PHONE ORDER SUBTOTAL SALES TAX SHIPPING ORDER TOTAL ORDERED PRODUCT PRODUCT ID + ORDER NUMBER QUANTITY DESCRIPTION UNIT PRICE EXTENDED PRICE First Normal Form

  12. (a) (b) ORDER ORDER NUMBER ORDER DATE CUSTOMER NUMBER CUSTOMER NAME CUSTOMER STREET CUSTOMER CITY CUSTOMER STATE CUSTOMER ZIPCODE CUSTOMER PHONE ORDER SUBTOTAL SALES TAX SHIPPING ORDER TOTAL ORDER ORDER NUMBER ORDER DATE CUSTOMER NUMBER CUSTOMER NAME CUSTOMER STREET CUSTOMER CITY CUSTOMER STATE CUSTOMER ZIPCODE CUSTOMER PHONE ORDER SUBTOTAL SALES TAX SHIPPING ORDER TOTAL ORDERED PRODUCT PRODUCT ID + ORDER NUMBER QUANTITY UNIT PRICE EXTENDED PRICE ORDERED PRODUCT PRODUCT ID + ORDER NUMBER QUANTITY DESCRIPTION UNIT PRICE EXTENDED PRICE PRODUCT PRODUCT ID DESCRIPTION Second Normal Form

  13. (a) (b) ORDER ORDER NUMBER ORDER DATE CUSTOMER NUMBER CUSTOMER NAME CUSTOMER STREET CUSTOMER CITY CUSTOMER STATE CUSTOMER ZIPCODE CUSTOMER PHONE ORDER SUBTOTAL SALES TAX SHIPPING ORDER TOTAL ORDER ORDER NUMBER ORDER DATE CUSTOMER NUMBER ORDER SUBTOTAL SALES TAX SHIPPING ORDER TOTAL ORDERED PRODUCT PRODUCT ID + ORDER NUMBER QUANTITY UNIT PRICE EXTENDED PRICE ORDERED PRODUCT PRODUCT ID + ORDER NUMBER QUANTITY UNIT PRICE PRODUCT PRODUCT ID DESCRIPTION PRODUCT PRODUCT ID DESCRIPTION CUSTOMER CUSTOMER NUMBER CUSTOMER NAME CUSTOMER STREET CUSTOMER CITY CUSTOMER STATE CUSTOMER ZIPCODE CUSTOMER PHONE Third Normal Form

  14. (a) (b) ORDER ORDER NUMBER ORDER DATE CUSTOMER NUMBER ORDER SUBTOTAL SALES TAX SHIPPING ORDER TOTAL ORDER ORDER NUMBER ORDER DATE CUSTOMER NUMBER ORDER SUBTOTAL SALES TAX SHIPPING ORDER TOTAL ORDERED PRODUCT PRODUCT ID + ORDER NUMBER QUANTITY UNIT PRICE ORDERED PRODUCT PRODUCT ID + ORDER NUMBER QUANTITY UNIT PRICE MTD SALES MONTH ID MONTHLY SALES Denormalization

  15. Product ID + OrderNumber Quantity Unit Price Order Number Customer Number Sales Tax Order Date ORDER ORDERED PRODUCT Order Subtotal Shipping Order Total CUSTOMER PRODUCT Customer Number Customer Phone Customer Name Customer City Customer Zipcode Product ID Description Customer Street Customer State Fully Normalized ERD

  16. Criteria for Selection Explanation Stability  Choose a candidate key that will not likely change its value over time. EXAMPLE: UNSTABLE STABLE NAME+ADDRESSEMPLOYEE_ID Non-Null  Choose a candidate key that is always guaranteed to have a non-null value. EXAMPLE: POSSIBLE NULL NON-NULL PHONE_NOSSN Non-Informational  Do not create intelligent keys that attempt to convey information via their structure. EXAMPLE: INFORMATIONAL NON-INFORMATIONAL Location Color Shelf Class Code Code Code Code Simplicity  Wherever feasible, consider using a single attribute primary key instead of a multi-attribute primary key. EXAMPLE: SINGLE ATTRIBUTE MULTI-ATTRIBUTE ITEM_NO+COLORITEM_CODE Selecting a Primary Key 99XXX99XX123456789

  17. 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. Identifying Entities and Relationships

  18. Normal Form Description First Normal Form (1NF) A relation is in 1NF if it contains no repeating data elements. Second Normal Form (2NF) A relation is in 2NF if it is in 1NF and contains no partial functional dependencies. Third Normal Form (3NF) A relation is in 3NF if it is in 2NF and contains no transitive dependencies. Three Normal Forms

More Related