1 / 18

Data Modelling : Modelling Object (Entity) classes, Attributes and relationships

Data Modelling : Modelling Object (Entity) classes, Attributes and relationships Data Modelling/ Object Structure analysis and design Logical Data Design Physical Database design Entity, Attributes, Instances: Customer Cust Name City Zip Phone # Cust #

Download Presentation

Data Modelling : Modelling Object (Entity) classes, Attributes and relationships

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. Data Modelling: Modelling Object (Entity) classes, Attributes and relationships Data Modelling/ Object Structure analysis and design Logical Data Design Physical Database design Entity, Attributes, Instances: Customer Cust Name City Zip Phone # Cust # Unique Identifier: Cust# ( Primary Key)

  2. Relationships between Object Classes/ Entities: How are instance relates to another (Business rules and Policies) Customer Sales Transactions Customer Sales Transactions initiates 0 to many Is initiated by 1 and only 1 Customer Sales Transaction Cardinality Min Max Min = 1 Existence Dependency

  3. E/ R Model: Customer Sales Transaction Min Max Each Instance of class A is associated with one and only one instance of class B A B A B A B A B A B 1,35 A B

  4. Recursive Relation • Course • Course ID • Subject • Course • Course Title • Course Credit Is a prerequisite for Has as a pre-requisite

  5. Generalization/ Specialization SS# Name Address Person Dept Salary Teacher Students Major GPA • Inheritance • No Cardinality ( 1 to 1) Person Mutually Exclusive Teacher Students

  6. Composition Relationship (HAS - A) An object instance is composed of one or more instances of another object class Sales Transaction ST Line

  7. COURSE INSTRUCTOR CourseID Course Title Credit InstrID • Subject • Course # • Last Name • First Name SCHEDULED CLASS SchedClassID Day of Week Start Time End Time • CourseID • InstrID • RoomID ROOM RoomID Capacity • Bldg • Room# N-ary Relationships - Use an Association

  8. Some Guidelines • Identifying Classes • each class has data it must remember • each class has at least one attribute • class has several attributes • all instances have same attribute ( & methods) • Assigning Attributes to Object classes • each attribute appears only once • assign attribute to object class that it most logically describes • Identifiers (Pks) for each class • sub-class assumes identifier of super-class

  9. Completed Object Relationship Model

  10. Object Relationship Model with Attributes and Identifiers

  11. CASE

  12. Sales Transaction Order # Order Date Xact. Type Sub Total Sales Tax Total Cash Sale Credit Order Order PickUp Amt Rcvd Pmt Type Pickup # Amt Charged App. Code

  13. flight

  14. Q2: Flight Reservation Customer Flt # Dep Time Dep City Arr. Time Arr City Capacity Ticket # Dep Date Ticket Class Ticket Condition. Fare Cust Name Cust Address Cust Number

  15. Deduction TS-Line Ded-Type Ded Amt Hrs-Worked Gross Pay Department Time Card Time Sheet Dept. Name Pay Period Ending Pay Period Ending TC-Line Date Time-In Time-Out Each TS-Line is related to only one time-card Time Card will have TC-Lines for employees on vacation Employee SSN Emp Name Tax Status Exempts Hourly Rate YTO-Gross Last Update

More Related