DBMS-Introduction to DBMS-1.6-EER features-SPPU

 Extened ER features

Explain extended ER feature specialization generalization and aggregation with example and diagrams.

We can use basic E-R concepts to develop most database features, but to express database deeply some extended features available in ER Model which are known as Extended ER.Features; 

These are as follows:

Specialization

- In an entity set, sometimes further sub grouping is also possible depending upon certain characteristics. For example, a silbset may have some attributes which are not shared by other subset In the entity set. In E-R diagram these distinct subsets can be represented by some means.

Consider an example of entity set person having attributes name, city and street. The entity person may be further classify as follows:

o customer

o employee

Both of these types of person are described by a set of attributes that contains all the attributes of entity set person with some additional attributes of their own.

- For example, in the description of customer entities, we may add new attribute like customer-

id, whereas in the description of employee entities we may add new attributes like employee-id and salary.

- This process of creating subgroups within an entity set is called specialization: The specialization of entity person helps us to

distinguish whether a person is an employee or

customer depending upon attributes.

An entity set may be specialized by more than one distinguishing characters. In the above example, job  performed  by an employee  may  be a


 Generalization

In the Fig. 1.13.1, we can 90sirve that the

refinement from an initial"" entity set into subgroups{multiple entity seis) depending upon distinct features shows top-down approch.

- The design process may also proceed into opposite bottom-up approach , in which multiple entity sets are grouped into higher level single entity set depending upon the common characteristics in between these entity sets.

In out example the entity 'Permananent emplyoee' has following attributes

o Name

o City

o pid

o Salary


emplyoee' and 'Temporary emplyoee'.


o Pf_Number

The entity 'Temporary emplyoee' has following attributes

o Name

o City

This commonality can be tenned as Gtneralization which is containment relationship that exists between higher level entity set and one or more lower level entity set.

Here the employee is higher level entity set while the enunes 'Permananent emplyoee' and 'Temporary emplyoee' are the lower level entity sel

In this example, the attributes which are conceprually same has different names. e.g. the pid and eid are both nothing but the employee ids of pennanent and temporary employees. To create generalization such attributes can be given a common name like emp_id and must be represented in higher level entity employee.

- The higher level entity set is also known as Superclass while the lower level entity set also known as subclass.

E-R model there is limitation that is it cannot express relationships among relationships. Consider the ternary relationship 'works-on' between a employee, branch, and job. Consider we want to record managers for (employee, branch, job) combinations. An entity set 'manager' is available.

To reprsent this relationship, we can set a quaternary relationships manages between employee, branch, job, and manager. Using the basic E-R modeling constructs, we obtain the following E-R diagram.


Aggregation

Here the relationship sets 'works-on' and 'manages 'can be combined into one single relationship set But combining the mis difficult as

some employee, branch, job combinations many not have a manager.

model there is limitation that is it cannot express relationships among relationships. Consider the ternary relationship 'works-on' between a employee, branch, and job. Consider we want to record managers for (employee, branch, job) combinations. An entity set 'manager' is available.

To reprsent this relationship, we can set a quaternary relationships manages between employee, branch, job, and manager. Using the basic E-R modeling constructs, we obtain the following E-R diagram.


Comments