Specialization and generalization specialization the

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

View Full Document Right Arrow Icon
Specialization and Generalization Specialization The process of designating subgroupings within an entity set is called specialization . For example, consider an entity set person , with attributes name , s treet and city . A person may be further classified as a customer or an employee . Each of these person types is described by a set of attributes that includes all the attributes of entity set person plus possibly additional attributes. For example, customer entities may be described further by the attribute customer-id , whereas employee entities may be described further by the attributes employee-id and salary . The specialization of person allows us to distinguish among persons according to whether they are employees or customers . Generalization There are similarities between the customer entity set and the employee entity set in the sense that they have several attributes in common. This commonality can be expressed by generalization , which is a containment relationship that exists between a higher-level entity set and one or more lower-level entity sets. In our example, person is the higher-level entity set and customer and employee are lower-level entity sets. Higher- and lower-level entity sets also may be designated by the terms superclass and subclass , respectively. The person entity set is the superclass of the customer and employee subclasses. Figure: Specialization and Generalization. [ Note: ISA means “is a” ]
Image of page 17

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

View Full Document Right Arrow Icon
14 Reduction of E-R Schemas to Tables Strong Entity Sets Weak Entity Sets Relationship Sets One-to-One Relationship One-to-Many Relationship Many-to-One Relationship Just the reverse of one-to-many . E 1 A 1 A 2 A n E 1 ( A 1 , A 2 , …, A n ) E 2 ( B 1 , A 1 , B 2 , …, B n , C 1 , C 2 , …, C n ) E-R Schema Relational Schema E 2 B 1 B 2 B n R C 1 C 2 C n E 1 A 1 A 2 A n E ( A 1 , A 2 , …, A n , B 1 , B 2 , …, B n ) E-R Schema Relational Schema E 2 B 1 B 2 B n R loan ( loan-number , amount) payment ( loan-number, payment-number , payment-date, payment-amount) E-R Schema Relational Schema E A 1 A 2 A n E ( A 1 , A 2 , …, A n ) E-R Schema Relational Schema
Image of page 18
15 Many-to-Many Relationship Composite Attributes Multivalued Attributes Generalization E-R Schema Relational Schema person ( person-id , name, street, city) employee ( person-id , salary) customer ( person-id , credit-rating) E A 1 A 2 A 3 E ( A 1 , A 2 ) E_A ( A 3 , A 1 ) E-R Schema Relational Schema E A 1 A 2 A 3 E ( A 1 , A 2 , B 1 , B 2 ) E-R Schema Relational Schema B 1 B 2 E 1 A 1 A 2 A n E 1 ( A 1 , A 2 , …, A n ) E 2 ( B 1 , B 2 , …, B n ) R ( A 1 , B 1 , C 1 , C 2 , …, C n ) E-R Schema Relational Schema E 2 B 1 B 2 B n R C 1 C 2 C n
Image of page 19

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

View Full Document Right Arrow Icon
16 E-R Diagram Symbols at a Glance Figure: Symbols used in E-R diagram. Figure: Alternative E-R notations.
Image of page 20
17 Figure: Symbols used in the UML class diagram notation.
Image of page 21

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

View Full Document Right Arrow Icon
18 DML: Data-Manipulation Language So far we’ve seen how to use table manipulation commands [ sorry, we couldn’t include the commands due to lack of time frownface ]. Now we’ll observe how to put data into tables, retrieve data from tables and manipulate these data.
Image of page 22
Image of page 23
This is the end of the preview. Sign up to access the rest of the document.

{[ 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