1 / 12

5. Data Modeling

5. Data Modeling. J. Stephen Schiavo Missouri Southern State University. Introduction. Model: A representation of reality Logical model: the essence of the system Not constrained by platform or technology

nicki
Download Presentation

5. Data Modeling

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. 5. Data Modeling J. Stephen Schiavo Missouri Southern State University

  2. Introduction • Model: A representation of reality • Logical model: the essence of the systemNot constrained by platform or technology • Physical model: Includes implementation detailShows how implementation problems overcome • Data model: Detailed, organized description of the information that is critical to the enterprise • Shared • Stable • Simple, small • Aid in communication and agreement

  3. Systems Concepts: Entities • Entities: “nouns” • People :Customers, Employees, Students, Faculty, … • Places : Stores, Dorms, Classrooms, Plants, … • Things : Vehicles, Houses, Products, Parts, Courses, … • Instance • Individual specimen of an entity • Record, member, individual • Independent entity (exists solely in its own right) • Associative Entity (requires existence of other entity)

  4. Systems Concepts: Attributes (adjectives) • Compound attribute (Area code & Phone num.) • Type (Number, Text, Memo, Y/N, Date-time, …) • Domain (All possible values: pos. integers, states, …) • Default (Assumed usual value in a new record) • Subset criterion – Used to group instances • Gender: M or F • EmplEthnic: “Cauc”, “AfrA”, “Hisp”, “NatA”, “PacI”, “AsiA” • Class: “Fr”, “So”, “Jr”, “Sr”, “NA”

  5. Index Systems Concepts: Keys • Primary key: unique identifier for each instance • Concatenated key (compound key) • Candidate & alternate keys • Foreign keys • Secondary Indexes • Associative Entity: compound key from others

  6. Systems Concepts: Transactions • Entities interacting with each other • CustomerbuysProduct • Studentenrolls in Class • SellerlistsHome • MechanicrepairsVehicle • Transactions provide the life of the model • Often result in familiar paper: PO, Invoice, Grades

  7. Systems Concepts: Relationships • How entities relate to one another and to other tables • One-to-one : Each Sales-rep has a company car • One-to-many : Each Sales-rep has several clients • Many-to-many (nonspecific) ; Each client buys N products; product bought by M clients • Cardinality (How many children a parent can have.)Exactly one; One or more; Zero or one; Zero or more; etc. • Degree: How many entities comprise the relationship • Recursive relationships

  8. Diagramming Conventions

  9. Diagramming Conventions:Recursive Relationships • Where one member of a table refers to another member of the same table • PREREQUISITE field in the COURSE table • ROOMMATE field in the RESIDENT table • SUPERVISOR field in the EMPLOYEE table • UNDERSTUDY field in the ACTOR table Often best to use an arrow to show direction of relation as described Resident Rooms with …

  10. Strategic Data Modeling • Enterprise Data Model • Highest level entities only, w/o attributes • Guide to fleshing out the model as applications arise • Application data model • Critical for clarity in analysis phase ! • Identify local vocabulary • Proceed at high level of abstraction • New system can retain much in common with old system

  11. More Concepts • C-A-S-E: Use-Cases (“youss-cases”) • Context Data Model (without attributes) • Keys & Key-Based Models (primary & foreign keys) • Normalization– Getting it right.

  12. Normalization of the Data Model 1 • 1 NF First Normal Form:1 Record per key; 1 value per field • 2 NF: Where there’s a -part key, both parts must determine every attribute • 3 NF: Consider the fields City - State - ZIPNo field can be a consequence of a non-key field 1 1 2 2 3 3 The key; the whole key; nothing but the key!

More Related