1 / 17

Data Models: Degrees of Data Abstraction

Data Models: Degrees of Data Abstraction. Modified ANSI/SPARC Framework. Data Models. Conceptual Relatively simple representation of complex real-world data structures Global view of data Basis for identification and description of main data items

Télécharger la présentation

Data Models: Degrees of Data Abstraction

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 Models: Degrees of Data Abstraction Modified ANSI/SPARC Framework Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  2. Data Models • Conceptual • Relatively simple representation of complex real-world data structures • Global view of data • Basis for identification and description of main data items • ERD used to represent conceptual data model • Hardware and software independent • Internal • Representation of database as seen by DBMS • Adapts conceptual model to specific DBMS • Software dependent Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  3. Data Models (con’t.) • External • Users’ views of data environment • Provides subsets of internal view • Makes application program development easier • Facilitates designers’ tasks • Provides a “reality check for the conceptual model • Ensures security constraints in design • Physical • Lowest level of abstraction • Software and hardware dependent • Requires definition of physical storage devices and access methods Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  4. The Entity Relationship (E-R) Model • Represents conceptual view • Main Components • Entities • Correspond to entire tables, not rows • Technically, known as “entity types” • Represented by rectangles • Attributes • Relationships Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  5. Attributes • Characteristics of entities • Domain is set of possible values • Primary keys underlined Figure 3.6 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  6. Simple Cannot be subdivided Age, sex, marital status Composite Can be subdivided into additional attributes Address into street, city, zip Single-valued Occurs only once for each instance Person has one social security number Multi-valued Multiple values possible for each instance of an entity Person may have several college degrees Derived Can be derived with algorithm May or may not be stored Age can be derived from date of birth Attributes (con’t.) Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  7. Relationships • Associations between entities • Connected entities are called participants • Operate in both directions • Relationship classification • Degree: binary, ternary (unusual), unary (recursive) • 1:1, 1:M, M:N (connectivity (?), cardinality (?)) • Number of entity instances associated with one occurrence of related entity • Relationships may have attibutes Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  8. Relationship Degree • Indicates number of associated entities • Unary • Single entity • Recursive • Exists between occurrences of same entity set • Binary • Two entities associated • Ternary • Three entities associated Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  9. Three Types of Relationships Figure 3.21 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  10. Another Ternary Relationship Leases Staff Property Renter Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  11. Connectivity and Cardinality in an ERD Figure 3.12 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  12. Relationship with Attribute HoursWorked WorksAt Staff Branch Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  13. Relationship Strength • Existence dependence • Entity’s existence depends on existence of related entities • Existence-independent entities can exist apart from related entities • EMPLOYEE claims DEPENDENT • Weak (non-identifying) • One entity is existence-independent on another • PK of related entity doesn’t contain PK component of parent entity • Strong (identifying) • One entity is existence-dependent on another • PK of related entity contains PK component of parent entity Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  14. Relationship Participation • Optional • Entity occurrence does not require a corresponding occurrence in related entity • Shown by drawing a small circle on side of optional entity on ERD • Mandatory • Entity occurrence requires corresponding occurrence in related entity • If no optionality symbol is shown on ERD, it is mandatory Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  15. Weak Entity • Existence-dependent on another entity • Has primary key that is partially or totally derived from parent entity Figure 3.19 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  16. Composite Entities • Used to ‘bridge’ between M:N relationships • Bridge entities composed of primary keys of each entity needing connection Figure 3.30 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

  17. Composite Entities (con’t.) Figure 3.31 Database Systems: Design, Implementation, & Management, 5th Edition, Rob & Coronel

More Related