Part 4: Enhanced Entity-Relationship EER Modeling

0
0
1946 days ago, 865 views
PowerPoint PPT Presentation
Part 4

Presentation Transcript

Slide 1

﻿Section 4: Enhanced Entity-Relationship (EER) Modeling Data Modeling and Database Design

Slide 2

Remember! Introduction Layer ER Diagram  C ontains hashes and oval Design-particular ER Diagram (Coarse-granularity)  Uses (min, max) documentation  Maps erasure rules Design-particular ER Diagram (Fine-granularity)  Maps quality qualities into ER graph  Decomposes multi-esteemed characteristics  Decomposes m:n connections

Slide 3

Enhanced Entity-Relationship (EER) Model Enhanced Entity-Relationship (EER) demonstrating is an augmentation to the ER displaying that fuses extra develops Central build Superclass/subclass (SC/sc) relationship More particularly: Specialization/speculation Categorization Aggregation

Slide 4

Superclass/Subclass Relationship (SC/sc)

Slide 5

An Instance Diagram

Slide 6

Think About It… Theoretically, one has three options of displaying furniture/seat/table/couch Model three separate element sorts for seat, table, and couch, and make three separate relationship sorts with the substance sort store Model furniture as an element sort with a trait called furniture_type; then seat, table, and couch would be estimations of that trait Model furniture as a superclass/subclass

Slide 7

SC/sc Relationships There are two essential sorts of Sc/sc connections Specialization/Generalization : One superclass (SC) is identified with at least one subclasses (sc) Categorization : One subclass (sc) is identified with at least one superclasses (SC)

Slide 8

Vignette 1

Slide 9

Modeling Vignette 1: Alternative 1

Slide 10

Modeling Vignette 1: Alternative 2

Slide 11

Modeling Vignette 1: Alternative 3

Slide 12

Properties of SC/sc Relationships An element that exists in a subclass can be related with just a single superclass element An element can't exist in the database only by being an individual from a subclass; it should likewise be an individual from a related superclass An element that is an individual from a superclass can be alternatively included as an individual from any number of its subclasses It is not required that each individual from a superclass be an individual from a subclass

Slide 13

Properties of SC/sc Relationships (proceeded with) Type Inheritance Property : A subclass acquires every one of the credits of the superclass to which it is connected furthermore, it will likewise acquire all the relationship sorts in which the superclass partakes A subclass may likewise have its own particular ascribes notwithstanding the properties acquired Likewise, a subclass may have its own particular relationship(s) with other element sorts (i.e., between element class connections)

Slide 14

Note That… The cardinality proportion of any SC/sc relationship is constantly 1:1 The support of the subclass in a SC/sc relationship is constantly add up to A subclass acquires all traits and additionally all relationship sorts that a superclass has (sort legacy property)

Slide 15

Specialization and Generalization Specialization is the way toward producing subgroups ('sc's) of a nonexclusive element class (SC) by determining the recognizing properties (traits) of the subgroups (= beat down approach) Generalization , then again, takes shape the normal properties (traits) shared by an arrangement of element sorts ('sc's) into a bland element sort (SC) (= base up approach) Notation: circle + fork (showing subset) Read: "is-a"

Slide 16

Specialization and Generalization (proceeded with) Completeness Constraint The interest of the superclass in a specialization/speculation is alluded to as the culmination imperative and can accept one of two qualities: aggregate or fractional Total specialization implies that each element of the superclass must take an interest in this specialization/speculation relationship (demonstrated by a strong line from the superclass to the specialization/speculation image (i.e., the circle)) Partial specialization implies that there might be elements exhibit in the superclass that don't take an interest in this specialization/speculation (showed by a specked line)

Slide 17

Specialization and Generalization (proceeded) Disjointness Constraint Used to determine that the subclasses of a specialization must be: Disjointed (shown by 'D'), i.e., an element of the superclass can't be an individual from more than one subclass Overlapped crosswise over subclasses (showed by 'O') Please take note of that you need to indicate both: fulfillment and disjointness limitations!

Slide 18

Notation

Slide 19

An EER Model of Vignette 1

Slide 20

Sample Data Sets For EER Model of Vignette 1

Slide 21

An Extension of Vignette 1: Multiple Specializations

Slide 22

Sample Data Sets For Vignette 1 Extension

Slide 23

An EER Model of Vignette 2

Slide 24

Specialization/Generalization Hierarchy Example of a Hierarchy: [STUDENT - > STUDENT_ATHLETE - > FOOTBALL_PLAYER - > {DEFENSIVE_PLAYER, OFFENSIVE_PLAYER}] demonstrates a 3-level chain of importance Inheritance A subclass acquires the characteristics and relationship sorts of the quick parent, as well as of the forerunner superclasses in the pecking order as far as possible up to the base of the specialization progressive system

Slide 25

An EER Model of Vignette 3

Slide 26

Specialization/Generalization Lattice In a specialization cross section, a substance sort can take an interest as a subclass in more than one specialization (i.e., a tyke can have more than one parent) Inheritance The subclass will acquire every one of the qualities and relationship sorts from the superclasses of the considerable number of specializations taking part in the grid and the ancestor chain of importance of every one of these superclasses This is called numerous sort legacy, and the subclass in the grid is alluded to as a common subclass

Slide 27

The Categorization Construct An arrangement happens when a subclass is related with more than one superclass of various element sorts The subclass is called class An element that is an individual from the classification (subclass) must exist in ONLY ONE of the superclasses in the classification relationship Example: A budgetary benefactor can be an individual, an organization, or an establishment  no "is-a" relationship! Documentation: "U" (= union, the subclass is a subset of the union of the superclasses)

Slide 28

Categorization Example

Slide 29

Characteristics of a Categorization There is just a single subclass in every arrangement The cardinality proportion is 1:1 inside and over the SC/sc relationship The interest of the subclass in the classification is constantly add up to

Slide 30

Characteristics of a Categorization (proceeded with) Each superclass may show either aggregate or fractional support A classification can either be: An aggregate class (i.e., the class is the union of all the superclass elements) An incomplete class (i.e., the classification is a genuine subset of the union of all the superclass substances) A classification has the property of specific sort legacy (i.e., it acquires traits of one element sort just) Often a novel identifier for a class must be produced (which is known as a surrogate key)

Slide 31

Sample Data Sets For Categorization Example

Slide 32

Choosing the Appropriate EER Construct Exercise: Part1: Consider a car dealership in the condition of Texas; the dealership ordinarily stocks autos, trucks, vans, and game utility vehicles (SUVs) Part 2: Not all vehicles in the dealership are enlisted vehicles however How might we demonstrate REGISTERED_VEHICLE? One exemption exists in which a classification and a speculation/specialization are commonly substitutable builds: on account of an aggregate class!

Slide 33

Choosing the Appropriate EER Construct (proceeded)

Slide 34

Choosing the Appropriate EER Construct (proceeded)

Slide 35

Choosing the Appropriate EER Construct (proceeded)

Slide 36

Choosing the Appropriate EER Construct (proceeded)

Slide 37

The Aggregation Construct An accumulation permits us to demonstrate an "entire/part" relationship as an "is-a-part-of" relationship between a subclass and a superclass A substance in the total contains superclass elements from ALL SC/sc connections in which it takes an interest Inheritance: Selective sort legacy means the legacy of characteristics and connections from ALL superclass elements contained in the particular total Notation: "A" Read: "is-a piece of" Note that a total can never be incomplete

Slide 38

An Example of Aggregation

Slide 39

An Aggregation Hierarchy

Slide 40

Aggregation Versus Categorization

Slide 41

A Fine-granular Design-Specific EER Diagram for Vignette 3

Slide 42

A Presentation Layer EER Diagram For Bearcat, Inc.

Slide 43

A Fine-granular Design-Specific EER Diagram For Bearcat, Inc.