1 / 35

Database Systems Background Review (2) Dr. Muhammad Shafique

Database Systems Background Review (2) Dr. Muhammad Shafique. Outline. Database Development Data Modeling ER Model EER Model Relational Data Model. Overview of Database Design Process. Two main activities: Database design Applications design Database design

Télécharger la présentation

Database Systems Background Review (2) Dr. Muhammad Shafique

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. Database Systems Background Review(2)Dr. Muhammad Shafique Database Systems Background Review

  2. Outline • Database Development • Data Modeling • ER Model • EER Model • Relational Data Model Database Systems Background Review

  3. Overview of Database Design Process • Two main activities: • Database design • Applications design • Database design • To design the conceptual schema for a database application • Applications design • To design the programs and interfaces that interact with the database • Generally considered part of software engineering Database Systems Background Review

  4. Database Development Database Systems Background Review

  5. Data Modeling • Categories of data models • Conceptual (high-level, semantic) data models • Provide concepts that are close to the way many users perceive data. • Also called entity-basedorobject-based data models • Implementation (representational) data models • Provide concepts that fall between the above two, used by many commercial DBMS implementations • Relational data model • Physical (low-level, internal) data models • Provide concepts that describe details of how data is stored in the computer. Database Systems Background Review

  6. Data Modeling Using ER Model (1) • ER Model Concepts • Entity • Entity Types, Value Sets, and Key Attributes • Weak Entity Types • Attribute • Categories of Attributes • Simple • Composite • Multi-valued • Relationship • Relationship Types • Roles and Attributes in Relationship Types Database Systems Background Review

  7. Data Modeling Using ER Model (2) Database Systems Background Review

  8. Relationships of Higher Degree • Relationship types of degree 2 are called binary • Relationship types of degree 3 are called ternary and of degree n are called n-ary • In general, an n-ary relationship is not equivalent to n binary relationships • Constraints are harder to specify for higher-degree relationships (n > 2) than for binary relationships Database Systems Background Review

  9. TernaryRelationships Database Systems Background Review

  10. Another example of a ternary relationship Database Systems Background Review

  11. Some of the Currently Available Automated Database Design Tools Database Systems Background Review

  12. Enhanced-ER (EER) Model (1) • EER stands for Enhanced ER or Extended ER • EER Model Concepts • Includes all modeling concepts of basic ER • Additional concepts: • Subclasses/superclasses • Specialization/generalization • Categories (UNION types) • Attribute and relationship inheritance • The additional EER concepts are used to model applications more completely and more accurately • EER includes some object-oriented concepts, such as inheritance Database Systems Background Review

  13. Subclasses and Superclasses Database Systems Background Review

  14. Specialization Database Systems Background Review

  15. Generalization Database Systems Background Review

  16. Specialization/Generalization • Constraints • Two basic constraints on specialization/generalization • Disjointness Constraint: • Completeness Constraint Database Systems Background Review

  17. Example of disjoint partial Specialization Database Systems Background Review

  18. Example of overlapping total Specialization Database Systems Background Review

  19. Specialization / Generalization Lattice Example (UNIVERSITY) Database Systems Background Review

  20. Example of Categorization (Union Type) Database Systems Background Review

  21. Formal Definitions of EER Model (1) • Class C: • A type of entity with a corresponding set of entities: • The definition of relationship type in ER/EER should have 'entity type' replaced with 'class‘ to allow relationships among classes in general • Subclass S is a class whose: • Type inherits all the attributes and relationship of a class C • Set of entities must always be a subset of the set of entities of the other class C • S ⊆ C • C is called the superclass of S • A superclass/subclass relationship exists between S and C Database Systems Background Review

  22. Formal Definitions of EER Model (2) • Specialization Z: Z = {S1, S2,…, Sn} is a set of subclasses with same superclass G • Hence, G/Si is a superclass relationship for i = 1, …., n. • G is called a generalization of the subclasses {S1, S2,…, Sn} • Z is total if we always have: • S1 ∪ S2 ∪ … ∪ Sn = G; • Otherwise, Z is partial. • Z is disjoint if we always have: • Si ∩ S2 empty-set for i ≠ j; • Otherwise, Z is overlapping. Database Systems Background Review

  23. Formal Definitions of EER Model (3) • Subclass S of C is predicate defined if predicate (condition) p on attributes of C is used to specify membership in S; • that is, S = C[p], where C[p] is the set of entities in C that satisfy condition p • A subclass not defined by a predicate is called user-defined • Attribute-defined specialization: if a predicate A = ci (where A is an attribute of G and ci is a constant value from the domain of A) is used to specify membership in each subclass Si in Z • Note: If ci ≠ cj for i ≠ j, and A is single-valued, then the attribute-defined specialization will be disjoint. Database Systems Background Review

  24. Formal Definitions of EER Model (4) • Category or UNION type T • A class that is a subset of the union of n defining superclasses D1, D2,…Dn, n > 1: • T ⊆ (D1∪ D2∪ … ∪ Dn) • Can have a predicate pi on the attributes of Di to specify entities of Di that are members of T. • If a predicate is specified on every Di T = (D1[p1] ∪ D2[p2] ∪…∪ Dn[pn]) Database Systems Background Review

  25. Conceptual Modeling Concepts • Semantic data models and Knowledge Representation (KR) • Similarities • Both use an abstraction process • Both provide concepts, constraints. Operations, and languages for defining data and representing knowledge • Differences • KR is broader in scope than semantic data models • KR schemes include reasoning mechanisms • KR schemes mix up schemas with instances whereas semantic data models focus on the representation of database schemas Database Systems Background Review

  26. Conceptual Modeling Concepts • Abstraction concepts • Classification and Instantiation • Is-an-instance-of or is-a-member-of • Exceptions • Class properties • Meta-class concept • Identification • Two levels of identification • To distinguish among database objects and classes • To identify database objects and to relate them to their real-world counterparts ( same person in different roles) Database Systems Background Review

  27. Conceptual Modeling Concepts • Abstraction concepts • Specialization and generalization • Is-a or Is-a-subclass-of • CONSTRAINTS • CARDINALITY (Min and Max) • COVERAGE (Total vs. Partial, and Exclusive (disjoint) vs. Overlapping) • Aggregation and association • To build composite objects • Three scenarios • Entity as an aggregation of attributes • Association relationship to relate objects from several independent classes (explained with example in the following slides) • Combining related objects to define higher level objects • IS-A-PART-OF or IS-A-COMPONENT-OF Database Systems Background Review

  28. Modeling Aggregation (1) • Example: Company, Job_applicant, and Job_Offer Database Systems Background Review

  29. Modeling Aggregation (2) Database Systems Background Review

  30. Modeling Aggregation (3) Database Systems Background Review

  31. Modeling Aggregation (4) Database Systems Background Review

  32. Modeling Aggregation (5) Database Systems Background Review

  33. Ontologies • Ontology is “a specification of a conceptualization” • Specification refers to the language and vocabulary terms (data model concepts) used to specify conceptualization • Conceptualization refers to the set of concepts that are used represent the reality or knowledge that is of interest to a community of users • Some possible descriptions of ontology • Dictionary --- describes relationships between words • Database schems • Many medical, scientific, and engineering ontologies are being developed as a means of standardizing concepts and terminology • Semantic Web --- for meaningful information exchange Database Systems Background Review

  34. References • Textbook Chapter 3 • Textbook Chapter 4 • Semantic Database Modeling: Survey, Applications, and Research IssuesRichard Hull and Roger KingACM Computing Surveys, Vol. 19, No. 3, September 1987 • Semantic Data ModelsJoan Peckham and Fred MaryanskiACM Computing Surveys, Vol. 20, No. 3, September 1988, pp 153 – 189 Database Systems Background Review

  35. Summary • Data Modeling • ER Model • EER Model • Other data models (reading material) Database Systems Background Review

More Related