1 / 53

IT 21103/41103

IT 21103/41103. System Analysis & Design. Chapter 04. Data Modeling. Data Modeling. Concerned with the data flow of an organization. Data Modeling. Focuses on Data Only. Data Modeling. Data Attributes Name Size Type. Data Modeling. Name Unique Indentifer. Data Modeling. Size

oswald
Download Presentation

IT 21103/41103

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. IT 21103/41103 System Analysis & Design

  2. Chapter 04 Data Modeling

  3. Data Modeling Concerned with the data flow of an organization

  4. Data Modeling Focuses on Data Only

  5. Data Modeling Data Attributes Name Size Type

  6. Data Modeling Name Unique Indentifer

  7. Data Modeling Size Amount of space required to hold the data

  8. Data Modeling Type How the computer stores the data

  9. Data Modeling Data Structures Specific organizational strategies for associating data elements

  10. Data Modeling Examples: Receipts File Folders

  11. Data Modeling Computer Data Structures Mimic the real-world Helps the analyst link data to the new system

  12. Data Modeling Data Streams Series of characters that form a command or represent specific data values in a program

  13. Data Modeling File Organized data structure with a specific format

  14. Data Modeling Master File Identifies an individual person or thing in the organization

  15. Data Modeling Transaction File Data collection that represents a specific event or activity

  16. Data Modeling Database Collection of files containing data about the current operations of an organization

  17. Data Modeling Data Warehouse Collection of files about the past operations of an organization

  18. Data Modeling Relational Databases Collection of data tied together by common fields

  19. Data Modeling Common Fields Primary Key Field(s) Foreign Key Field(s) - Create Relationships

  20. Data Modeling Entity-Relationship Diagram - ERD

  21. ERD • The Entity-Relationship Approach • Represents reality using well-defined graphics and rules • Basic building blocks are “things” (entities) and relationships Member M Adopts 1 Animal

  22. ERD • Advantages • Theoretical foundation (Set Theory) • Good for communication • Build E-R Model, then translate to any type of RDBMS • Disadvantages • Different (yet another new thing to learn) • Must translate to the relational model

  23. ERD • Entity-Relationship Model: Basic Concepts • Entity • Thing, Object, Concept of interest to the enterprise • Each occurrence can be uniquely identified

  24. ERD • Entity-Relationship Model: Basic Concepts • Attribute • Property of an entity • Column

  25. ERD • Entity-Relationship Model: Basic Concepts • Relationship • Association between two (or more) entities

  26. ERD • Entity-Relationship Model: Basic Concepts • Entity Identifier • Attribute(s) whose value uniquely identifies an entity • Primary Key

  27. ERD • What is an Entity? • Physical entity types • Person • Building • Machine • Book • Usually Singular

  28. ERD • What is an Entity? • Conceptual entity types • Contract • Account • Order • Course

  29. ERD • What is an Entity? • Event entity types • Transaction • Shipment • Reservation • Phone Call • Seminar Offering

  30. ERD • Entity-Relationship Model: Diagrams • Example: • Soft Rectangle represents entities • Noun • Singular • Connecting Line represents relationships • Verb Member Adopts Animal

  31. ERD • Relationships have Characteristics • A relationship has Cardinality (Degree) One-to-One One-to-Many Many-to-Many

  32. ERD • Each entity’s participation is Mandatory or Optional • Cardinality & Optionality are based on business rules Mandatory Optional

  33. ERD • One:One Relationship • One Member adopts one animal • One Animal is adopted by one member Member Adopts Animal

  34. ERD • One:Many relationship • One member adopts one animal • One animal is adopted by many members Member Adopts Animal

  35. ERD • Many:Many relationship • One member adopts many animals • One animal is adopted by many members Member Adopts Animal

  36. ERD • Optionality: Participation in a Relationship Zoo Employee Cares for Animal

  37. ERD • Mandatory • Every instance of the entity MUST participate in the relationship • Example: • Every animal is cared for by at least one employee

  38. ERD • Optional • An instance of the entity CAN participate in the relationship • Example: • Some employees do not take care of animals

  39. ERD • Drawing an E-R Diagram • Identify the entities • Write (make up) a few attributes for each entity • Designate the unique identifier (PK) • Identify the relationship (FK goes on the many side) • Show cardinality and optionality for each relationship

  40. ERD • E-R Modeling Exercise: • A Seminar Company • A seminar company offers more than 100 different courses • Each course has a unique course number and a title • The company schedules thousands of seminars annually • Each seminar is the presentation of one specific course • A seminar is either public or on-site

  41. ERD • E-R Model: • Entities • Course • Course # (PK) • Course Title • Duration • Author

  42. ERD • E-R Model: • Entities • Seminar • Seminar # (PK) • Date • Place • Type • Public • On-site • Course # (FK)

  43. ERD COURSE • E-R Model: Presented by SEMINAR

  44. ERD • E-R Modeling Exercise: • A Personnel Database • A company has four divisions • Each employee works for a department • Each department reports to one of the divisions

  45. ERD • E-R Model: • Entities • Division • Division # • Division Name

  46. ERD • E-R Model: • Entities • Employee • Employee # • Employee Name • Dept # (FK)

  47. ERD • E-R Model: • Entities • Department • Dept # • Dept Name • Div # (FK)

  48. ERD • E-R Model: DIVISION DEPARTMENT Reports to Works for EMPLOYEE

  49. Relational Database Theory • E-R Modeling Exercise: • A Supplier-Parts Database • A company purchases many parts from its suppliers • Each part has only one supplier • A supplier can supply zero, one, or many parts • One _____(can/must) _____ (one and only one/one or more) ______

More Related