![]() ![]() In multiple inheritance, the attributes of the subclass will be the union of all the superclass attributes which are associated with it. ![]() When one subclass is associated with more than one superclass, then this phenomenon is known as multiple inheritance. Note: The above two constraints are independent of each other, and they follow the transitive property. If any entity from the superclass is associated with more than one subclass, then it is known as overlapped subclassing, and if it is associated with zero or only one subclass, then it is called disjoint subclassing. If all the entities of a superclass are not associated with a subclass, then it is called a partial subclass relationship. In the above example, it is a total relationship. Let's suppose if the union of all the subclasses ( engineer, clerk, lab assistant) is equal to the total employee. It means if every superclass entity has some subclass entity, then it is called a total subclass relationship. There are two types of constraints on subclasses which are described below:Ī total subclass relationship is one where the union of all the subclasses is equal to the superclass. Each subclass inherits all the attributes from its superclass so that a lab assistant will have all its attributes, like its name, salary, etc. In the above example, we have one superclass and three subclasses. The Enhanced ER diagram of the above example will look like this: Let's suppose we have a superclass Employee and subclasses as a clerk, engineer, and lab assistant. We can draw the ER diagram for these relationships. So an employee is a generalized class, and all others are its subclass. For example, in a university, a faculty member or clerk is a specialized class of employees. In this relationship, one entity is a subclass or superclass of another entity. For example, 'Laptop IS-A computer.' Or 'Clerk IS-A employee.' We can learn the concept of subclass by 'IS-A' analysis. Specialized classes are called subclasses, and generalized classes are called superclasses or base classes. These are inspired by the object-oriented paradigm, where we divide the code into classes and objects, and in the same way, we have divided entities into subclass and superclasses. These are two normal kinds of relationships that were added to the normal ER model for enhancement. The SubClass and SuperClass, Specialization and Generalization, Union or Category, Aggregation, etc., are displayed using this diagrammatic style. ![]() The requirements and complexity of complicated databases are represented using enhanced entity-relationship diagrams, which are sophisticated database diagrams very similar to standard ER diagrams. The existing ER model needs to be enhanced or improved in order for it to better handle the complicated application in order to reduce the modeling complexity. It is getting harder and harder to apply the conventional ER paradigm for database modeling as data complexity rises today. We use an oval shape to represent the entity and a diamond shape to represent the relationships between entities. In ER diagrams, we use attributes, entities, and the relationships between entities. ER diagrams are converted into the tabular form then they are inserted into the computer using any query language. We cannot use the ER diagram directly on the computer. The ER diagram is just for understanding the purpose of the database administrator. When we draw the relationships between entities using a diagram, then it is called an entity relationship diagram. Next → ← prev Enhanced ER Model ER DiagramĮR diagram stands for Entity Relationship diagram. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |