Part 4 The Enhanced Entity-Relationship EER Model

Chapter 4 the enhanced entity relationship eer model l.jpg
1 / 42
0
0
846 days ago, 250 views
PowerPoint PPT Presentation
EER Model . The ER model ideas are adequate for speaking to numerous database outlines for customary database applications, which for the most part incorporate information preparing applications in business and industry.However, fashioners of database applications have attempted to plan more exact database diagrams that mirror the information properties and compels more preciselyIn this section, we depict highlights th

Presentation Transcript

Slide 1

Section 4 The Enhanced Entity-Relationship (EER) Model Dr. Bernard Chen Ph.D. College of Central Arkansas Fall 2008

Slide 2

EER Model The ER display ideas are adequate for speaking to numerous database outlines for customary database applications, which for the most part incorporate information preparing applications in business and industry. Be that as it may, architects of database applications have attempted to outline more exact database constructions that mirror the information properties and compels all the more unequivocally In this part, we portray highlights that have been proposed for semantic information models, and show scraper the ER model can be improved to incorporate these ideas.

Slide 3

Outline Subclasses, Superclasses and Inheritance Specialization and Generalization Constrains and Characteristics Union

Slide 4

Subclasses, Superclasses and Inheritance In many cases a substance sort has various subgroupings of its elements that are important and should be spoken to expressly due to their noteworthiness to the database application. For instance: EMPLOYEE might be further gathered into: SECRETARY, ENGINEER, TECHNICIAN, … Based on the EMPLOYEE's Job MANAGER EMPLOYEEs who are chiefs SALARIED_EMPLOYEE, HOURLY_EMPLOYEE Based on the EMPLOYEE's technique for pay

Slide 5

Subclasses and Superclasses

Slide 6

Subclasses, Superclasses and Inheritance We call each of these subgroupings a subclass of the EMPLOYEE element sort, and the EMPLOYEE substance sort is known as the superclass for each of these subclasses. These are called superclass/subclass (and in addition just class/subclass ) connections: EMPLOYEE/SECRETARY EMPLOYEE/TECHNICIAN EMPLOYEE/MANAGER … These are additionally called IS-A connections SECRETARY IS-An EMPLOYEE, TECHNICIAN IS-An EMPLOYEE, … .

Slide 7

Subclasses, Superclasses and Inheritance An Entity CANNOT exist in the database just by being an individual from a subclass; it should likewise be an individual from the superclass An individual from the superclass can be alternatively included as an individual from any number of its subclasses

Slide 8

Subclasses and Superclasses Example A salaried representative who is additionally a designer has a place with the two subclasses: ENGINEER, and SALARIED_EMPLOYEE A salaried worker who is additionally a building chief has a place with the three subclasses: MANAGER, ENGINEER, and SALARIED_EMPLOYEE It is redundant that each element in a superclass be an individual from some subclass

Slide 9

Subclasses and Superclasses

Slide 10

Subclasses, Superclasses and Inheritance An essential idea related with subclasses is that of sort legacy An element that is individual from a subclass acquires All properties of the substance as an individual from the superclass All connections of the element as an individual from the superclass

Slide 11

Subclasses, Superclasses and Inheritance Example: In the past slide, SECRETARY (and TECHNICIAN and ENGINEER) acquire the traits Name, SSN, … , from EMPLOYEE Every SECRETARY element will have values for the acquired qualities Every SECRETARY element will likewise keep all connections

Slide 12

Outline Subclasses, Superclasses and Inheritance Specialization and Generalization Constrains and Characteristics Union

Slide 13

Specialization is the way toward characterizing an arrangement of subclasses of an element sort The arrangement of subclasses is based upon some recognizing attributes of the elements in the superclass Example: {SECRETARY, ENGINEER, TECHNICIAN} is a specialization of EMPLOYEE based upon occupation sort.

Slide 14

Specialization It might have a few specializations of a similar superclass Example: Another specialization of EMPLOYEE in view of strategy for pay is {SALARIED_EMPLOYEE, HOURLY_EMPLOYEE}. The subset image on each line associating a subclass to ϵ shows the course of the superclass/subclass relationship

Slide 15

Subclasses and Superclasses

Slide 16

Specialization Attributes of a subclass are called particular or neighborhood qualities. For instance, the characteristic TypingSpeed of SECRETARY The subclass can likewise take part in particular relationship sorts. For instance, a relationship BELONGS_TO of HOURLY_EMPLOYEE

Slide 17

Specialization There are two noteworthy explanations behind including class/subclass relationship and specialization in an information display: 1. Certain ascribes may apply to a few however not all elements of the superclass (secretary subclass has nearby trait Typing speed where design has eng_type) 2. some relationship sorts might be take an interest in just by substances that are individuals from the subclass (Hourly_employees are identified with Trade_nuion by means of velongs_to)

Slide 18

Specialization In synopsis, the specialization procedure permits us to do the accompanying: Define an arrangement of subclass of an element sort Establish extra particular qualities with every subclass Establish extra particular relationship sorts between every subclass and other element sorts or different subclasses

Slide 19

Generalization is the invert of the specialization procedure Several classes with normal elements are summed up into a superclass; unique classes turn into its subclasses

Slide 20

Generalization Example: CAR, TRUCK summed up into VEHICLE; both CAR, TRUCK get to be subclasses of the superclass VEHICLE. We can see {CAR, TRUCK} as a specialization of VEHICLE Alternatively, we can see VEHICLE as a speculation of CAR and TRUCK

Slide 21

Generalization (2)

Slide 22

Outline Subclasses, Superclasses and Inheritance Specialization and Generalization Constrains and Characteristics Union

Slide 23

Constraints on Specialization and Generalization Two fundamental requirements can apply to a specialization/speculation: Disjointness Constraint: Completeness Constraint:

Slide 24

Constraints on Specialization and Generalization Disjointness Constraint: Specifies that the subclasses of the specialization must be disjoint : an element can be an individual from at most one of the subclasses of the specialization Specified by d in EER chart

Slide 25

Displaying a property characterized specialization in EER graphs

Slide 26

Constraints on Specialization and Generalization If not disjoint, specialization is covering : that is a similar element might be an individual from more than one subclass of the specialization Specified by o in EER chart

Slide 27

Example of covering aggregate Specialization

Slide 28

Constraints on Specialization and Generalization Completeness Constraint: Total indicates that each element in the superclass must be an individual from some subclass in the specialization/speculation Shown in EER charts by a twofold line Partial permits an element not to have a place with any of the subclasses Shown in EER charts by a solitary line when all is said in done, a superclass that was distinguished through the speculation procedure typically add up to, on the grounds that the superclass is gotten from the subclasses and subsequently contains just the substances that are in the subclass

Slide 29

Constraints on Specialization and Generalization (6) Hence, we have four sorts of specialization/speculation: Disjoint, add up to Disjoint, halfway Overlapping, add up to Overlapping, incomplete

Slide 30

Constraints on Specialization and Generalization Some broad guidelines: Deleting an element from s superclass suggests that it is consequently erased from every one of the subclasses to which it has a place Inserting an element in a superclass of an aggregate specialization infers that the element is compulsorily embedded in no less than one of the subclasses of the specialization

Slide 31

Specialization/Generalization Hierarchies, Lattices A subclass may itself have facilitate subclasses determined on it Hierarchy has a limitation that each subclass has just a single superclass (called single legacy ); this is essentially a tree structure In a cross section , a subclass can be subclass of more than one superclass (called numerous legacy )

Slide 32

Shared Subclass "Engineering_Manager"

Slide 33

Specialization/Generalization Hierarchies, Lattices Leaf hub is a class that has no subclasses of its own A subclass with more than one superclass is known as a common subclass (different legacy) Notice that the presence of no less than one shared subclass prompts to a grid, generally, it's a chain of importance

Slide 34

Specialization/Generalization Lattice Example (UNIVERSITY)

Slide 35

Outline Subclasses, Superclasses and Inheritance Specialization and Generalization Constrains and Characteristics Union

Slide 36

Union All of the superclass/subclass connections we have seen so far beginning from a solitary superclass Sometimes we may require more than one superclass For this situation, the subclass will speak to an accumulation of items that is a subset of the UNION of unmistakable element sorts We call such a subclass a UNION TYPE

Slide 37

Union Example: In a database for vehicle enlistment, a vehicle proprietor can be a PERSON, a BANK (holding a lien on a vehicle) or a COMPANY. A UNION sort called OWNER is made to speak to a subset of the union of the three superclasses COMPANY, BANK, and PERSON

Slide 38

Two classifications (UNION sorts): OWNER, REGISTERED_VEHICLE

Slide 39

Union We can think about a UNION (OWNER) with shared subclass (ENGINEERING_MANAGER) The last is a subclass of each of the three superclass ENGINEER, MANAGER and SALARIED_EMPLOYEE, so an element that us an individual from ENGINEERING_MANAGER must exist in every one of the three This implies a designing supervisor must be an ENGINEER, a MANAGER, and a SALARIED_EMPLOYEE On the other hand, a substance that is an individual from OWNER must exist in just a single of the superclass

Slide 40

Shared Subclass "Engineering_Manager"

Slide 41

UNION Attribute legacy works all the more specifically on account of UNION. For instance, OWNER element acquires characteristics of a COMPANY, a PERSON OR a BANK A mutual subclass, for example, ENGINEERING_MANAGER acquires ALL the qualities of its s

SPONSORS