Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Systems Background Review (2) Dr. Muhammad Shafique

Similar presentations


Presentation on theme: "Database Systems Background Review (2) Dr. Muhammad Shafique"— Presentation transcript:

1 Database Systems Background Review (2) Dr. Muhammad Shafique
ICS (072) Database Systems Background Review

2 Database Systems Background Review
Outline Database Development Data Modeling ER Model EER Model Relational Data Model ICS (072) Database Systems Background Review

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

4 Database Systems Background Review
Database Development ICS (072) Database Systems Background Review

5 Database Systems Background Review
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-based or object-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. ICS (072) 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 ICS (072) Database Systems Background Review

7 Data Modeling Using ER Model (2)
ICS (072) 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 ICS (072) Database Systems Background Review

9 Ternary Relationships
ICS (072) Database Systems Background Review

10 Another example of a ternary relationship
ICS (072) Database Systems Background Review

11 Some of the Currently Available Automated Database Design Tools
COMPANY TOOL FUNCTIONALITY Embarcadero Technologies ER Studio Database Modeling in ER and IDEF1X DB Artisan Database administration, space and security management Oracle Developer 2000/Designer 2000 Database modeling, application development Popkin Software System Architect 2001 Data modeling, object modeling, process modeling, structured analysis/design Platinum (Computer Associates) Enterprise Modeling Suite: Erwin, BPWin, Paradigm Plus Data, process, and business component modeling Persistence Inc. Pwertier Mapping from O-O to relational model Rational (IBM) Rational Rose UML Modeling & application generation in C++/JAVA Resolution Ltd. Xcase Conceptual modeling up to code maintenance Sybase Enterprise Application Suite Data modeling, business logic modeling Visio Visio Enterprise Data modeling, design/reengineering Visual Basic/C++ ICS (072) 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 ICS (072) Database Systems Background Review

13 Database Systems Background Review
Subclasses and Superclasses ICS (072) Database Systems Background Review

14 Database Systems Background Review
Specialization ICS (072) Database Systems Background Review

15 Database Systems Background Review
Generalization ICS (072) Database Systems Background Review

16 Specialization/Generalization
Constraints Two basic constraints on specialization/generalization Disjointness Constraint: Completeness Constraint ICS (072) Database Systems Background Review

17 Example of disjoint partial Specialization
ICS (072) Database Systems Background Review

18 Database Systems Background Review
Example of overlapping total Specialization ICS (072) Database Systems Background Review

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

20 Example of Categorization (Union Type)
ICS (072) 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 ICS (072) 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. ICS (072) 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. ICS (072) 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]) ICS (072) 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 ICS (072) 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) ICS (072) 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 ICS (072) Database Systems Background Review

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

29 Modeling Aggregation (2)
ICS (072) Database Systems Background Review

30 Modeling Aggregation (3)
ICS (072) Database Systems Background Review

31 Modeling Aggregation (4)
ICS (072) Database Systems Background Review

32 Modeling Aggregation (5)
ICS (072) Database Systems Background Review

33 Database Systems Background Review
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 ICS (072) Database Systems Background Review

34 Database Systems Background Review
References Textbook Chapter 3 Textbook Chapter 4 Semantic Database Modeling: Survey, Applications, and Research Issues Richard Hull and Roger King ACM Computing Surveys, Vol. 19, No. 3, September 1987 Semantic Data Models Joan Peckham and Fred Maryanski ACM Computing Surveys, Vol. 20, No. 3, September 1988, pp 153 – 189 ICS (072) Database Systems Background Review

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


Download ppt "Database Systems Background Review (2) Dr. Muhammad Shafique"

Similar presentations


Ads by Google