CS
Chapter04EERModel.pptx

Eg based on value of an attribute say job type or age

Info icon This preview shows pages 17–25. Sign up to view the full content.

E.g., based on value of an attribute, say, Job-type, or Age. Attribute-defined: shows the name of the attribute next to the line drawn from the superclass toward the subclasses (see Fig. 4.1) User-defined: membership is defined by the user on an entity by entity basis Enhanced Entity-Relationship Modelling 17
Image of page 17

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Constraints on Specialization and Generalization If we can determine exactly those entities that will become members of each subclass by a condition, the subclasses are called predicate- defined (or condition-defined) subclasses Condition is a constraint that determines subclass members Display a predicate-defined subclass by writing the predicate condition next to the line attaching the subclass to its superclass Enhanced Entity-Relationship Modelling 18
Image of page 18
Constraints on Specialization and Generalization If all subclasses in a specialization have membership condition on same attribute of the superclass, specialization is called an attribute-defined specialization Attribute is called the defining attribute of the specialization Example: JobType is the defining attribute of the specialization {SECRETARY, TECHNICIAN, ENGINEER} of EMPLOYEE If no condition determines membership, the subclass is called user-defined Membership in a subclass is determined by the database users by applying an operation to add an entity to the subclass Membership in the subclass is specified individually for each entity in the superclass by the user Enhanced Entity-Relationship Modelling 19
Image of page 19

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Displaying an Attribute-Defined Specialization in EER Diagrams Enhanced Entity-Relationship Modelling 20
Image of page 20
Constraints on Specialization and Generalization Two basic constraints can apply to a specialization/generalization: Disjointness Constraint: Completeness Constraint: Enhanced Entity-Relationship Modelling 21
Image of page 21

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Constraints on Specialization and Generalization Disjointness Constraint: Specifies that the subclasses of the specialization must be disjoint : an entity can be a member of at most one of the subclasses of the specialization Specified by d in EER diagram If not disjoint, specialization is overlapping : that is the same entity may be a member of more than one subclass of the specialization Specified by o in EER diagram Enhanced Entity-Relationship Modelling 22
Image of page 22
Constraints on Specialization and Generalization Completeness (Exhaustiveness) Constraint: Total specifies that every entity in the superclass must be a member of some subclass in the specialization/generalization Shown in EER diagrams by a double line Partial allows an entity not to belong to any of the subclasses Shown in EER diagrams by a single line Enhanced Entity-Relationship Modelling 23
Image of page 23

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Constraints on Specialization and Generalization Hence, we have four types of specialization/generalization: Disjoint, total Disjoint, partial Overlapping, total Overlapping, partial Note: Generalization usually is total because the superclass is derived from the subclasses.
Image of page 24
Image of page 25
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '09
  • SUNANHAN
  • Entity-relationship model

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern