0% found this document useful (0 votes)
22 views

Lecture Notesfordbmsand Data Mining and Data Warehousing: Extended E-R Features

The document discusses various extended entity-relationship (E-R) modeling features including specialization, generalization, and aggregation. Specialization identifies subclasses of an entity set that have unique attributes or relationships. Generalization combines subclasses into a more general class by identifying common attributes. Aggregation treats a relationship set and its associated entities as a single aggregate entity to avoid redundancy. These techniques help develop a class hierarchy represented by a tree structure in the E-R diagram.

Uploaded by

Swathi Kumari
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Lecture Notesfordbmsand Data Mining and Data Warehousing: Extended E-R Features

The document discusses various extended entity-relationship (E-R) modeling features including specialization, generalization, and aggregation. Specialization identifies subclasses of an entity set that have unique attributes or relationships. Generalization combines subclasses into a more general class by identifying common attributes. Aggregation treats a relationship set and its associated entities as a single aggregate entity to avoid redundancy. These techniques help develop a class hierarchy represented by a tree structure in the E-R diagram.

Uploaded by

Swathi Kumari
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

www.jntuworld.

com

www.jwjobs.net

Le c t ur e N ot e sF o rDBM S a nd Da t a M ining a nd Da t a W ar e hous i ng

Lecture 7 Extended E-R Features: ? Specialization: It is the process of identifying the subclass/es of an entity set which are special from other entities of this set in terms of attributes or relationships they make. Consider the design of a database for an academic institution. While designing we identified an entity set Employee which represent all the employees of this. The attributes of this may be (Employee ID, Employee Name, Date of Joining, Address) but then we see a subclass of this set of employees, called set of all Teachers which is different from other employees. We may have other employees in the sub classes called Admin Staff or Technical Lab Staff or Other Staff like peons and other workers. All of these subclasses form specialization of class Employee. All the attributes and associations of class Employee will also be there with all the subclasses. Every teacher will have an employee ID, Name, DOJ, Address similarly the admin staff, technical lab staff and other staff members. Sub classes may have some attributes or associations of their own which make them different from others. The Teachers will have a subject they teach, Department they belong to, Expertise they have. The teachers will have associations with different entities like Classes they teach in, Projects they guide etc. These attributes and associations will not be there with other employees sub sets ? Generalization: This is again a similar process as specialization but it is just opposite of that. It is the process of combining the subclasses into a general class and moving the common attributes and associations from subclasses to the general class. It is just the different practical approach. In specialization we start from the general classes and forms the special classes out of them while in generalization we start from various low level classes and forms the general classes by combining several of them identifying the common features in them. So in the above example of Academic Institute we may start thinking of Teachers as an Entity set and then Technical Lab Staff and Then Admin staff and then observing that they have several fields in common like Employee Id, name, Address etc. we combine them to define a general class Employee which will only those attributes which are common in all the above three classes. And then these classes will not have these common fields rather they will be there for all employees collectively in the general entity set Employee. ? The result of both the above process is same. We get a hierarchy of classes and subclasses which can be represented by a tree structure. The result of generalization and specialization will be like this.
Na me EM P I D Em pl oyee I SA Addr e s s DO J

T ea cher

Adm i n S ta f f

La bS t a f f

O therS ta f f

S ubj ect

Deptt.

R ol e

La bN a me

Depa r tm ent ofEl ectr i c a la nd El ectr oni c s

By:S ul a bh Ba ns a l

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

Le c t ur e N ot e sF o rDBM S a nd Da t a M ining a nd Da t a W ar e hous i ng

? Aggregation: Consider a Borrower relationship set that associates customers from Customer entity set to the loans they borrowed in entity set Loan. Suppose the bank decides to attach an employee to some customer-loan relationships of Borrower based on probably the size of loan or status of customer. This employee called the loan officer will be responsible for tracking up and following up the status of the loan time to time. This suggests a relationship that exists between Customer, Borrower and Employee. So we can draw the simple ERD as follows:
Cus tna me L oa n N um ber

Cus tI D

Cus tom er

Bor r ow er

L oa n
A m ount

Addr e s s

L oa nof f i cer Em pl oyee


Em pI D Em pna me Addr e s s

o The diagram above may imply that the relationships Borrower and Loan-Officer may be combined into one. But then it will require that a loan-officer must be combined to every Customer-loan pair, which is not true. o The above diagram also have redundancy as every customer-loan pair in Loanofficer is also in Borrower. ? More appropriate way of representing the above set of relationships would be to consider the entire relationship Borrower with its associated entities Customer and Loan as an entity i.e. an aggregate entity, and then representing relationship Loan-Officer between the entities Employee and the above aggregated entity. As follows:
Cus tna me Cus tI D Addr e s s L oa n N um ber

Cus tom er

Bor r ow er

L oa n
A m ount

L oa nof f i cer Em pl oyee


Em pI D Em pna me Addr e s s

Depa r tm ent ofEl ectr i c a la nd El ectr oni c s

By:S ul a bh Ba ns a l

www.jntuworld.com

www.jntuworld.com

www.jwjobs.net

Le c t ur e N ot e sF o rDBM S a nd Da t a M ining a nd Da t a W ar e hous i ng

? Important Terms related to generalization and specialization: o Attribute inheritance: All the attributes of higher level entity sets are inherited by the respective lower level entity sets. Also the relationships in which higher level entity sets participates all the respective lower level entity level entity sets also participates. o Disjoint: The lower level entity sets corresponding to a higher level entity sets are called disjoint if an entity doesn t belong to more than one lower level entity sets. o Overlapping: When the same entity may belong to more than one lower level entity set. o Complete Generalization: When each higher level entity belongs to at least one lower-level entity set. o Partial Generalization: When some higher-level entities may not belong to any lower-level entity set.

Depa r tm ent ofEl ectr i c a la nd El ectr oni c s

By:S ul a bh Ba ns a l

www.jntuworld.com

You might also like