Entity - Relationship features

The features of the E – R includes specialization, generalization, higher level & lower level entity sets, attribute inheritance, and aggregation.

1. Specialization

An entity set may have subgrouping of entities that are different from other entity set in some form. These entity grouping can be represented using E – R model. The process of describing subgrouping within an entity set is known as Specialization. An entity set may be specialized by more than one distinguish feature.

For example, consider an entity set named person, having attributes name, street, and city. The person can be classified as: customer or employee. A set of attributes that includes all the attributes of entity person are described by each of these person type. For example, customer entities may be further described by attribute customer_id, and the employee entities can be further described by attributes employee_id, employee_salary.

Consider another example, suppose bank decides to divide accounts into two categories: savings account and current account. The bank can then create two specializations of account: savings_account and current_account. Savings account requires minimum balance to be maintained and the current account have fixed interest rates and additional an overdraft facility is provided. Hence, the entity set savings_account will have all the attributes of account and additional attribute minimum_balance, while the entity set current_account will have all the attributes of account and additional attribute overdraft_amount.

In E – R diagram, specialization is represented by triangle component with label ISA, where ISA stands for “is a”. The ISA can be referred as a subclass-superclass relationship. Specialization is a top – down design process.

2. Generalization

The containment relationship that exists between a higher – level entity set and one or more lower-level entity sets is known as generalization. Generalization is a bottom – up design process.

For example, there may exists similarities between entity set customer and entity set employee. The person is a higher level entity set and customer and employee are lower – level entity set. The higher – level and lower – level entity set can be referred as superclass and subclass. The person is a superclass and customer and employee are subclasses.

Figure – 1: An illustration of Generalization and Specialization



Comments

Popular posts from this blog

A university registrar’s office maintains data about the following entities: (a) courses, including number, title, credits, syllabus, and prerequisites; (b) course offerings, including course number, year, semester, section number, instructor(s), timings, and classroom; (c) students, including student-id, name, and program; and (d) instructors, including identification number, name, department, and title. Further, the enrolment of students in courses and grades awarded to students in each course they are enrolled for must be appropriately modelled. Construct an E-R diagram for the registrar’s office. Document all assumptions that you make about the mapping constraints.

Consider a database used to record the marks that students get in different exams of different course offerings.