Thursday, 21 September 2017
Generalization,Specialization And Aggregration
The ER Model has the power of expressing database entities in a
conceptual hierarchical manner. As the hierarchy goes up, it generalizes
the view of entities, and as we go deep in the hierarchy, it gives us
the detail of every entity included.
Going up in this structure is called generalization, where entities are clubbed together to represent a more generalized view. For example, a particular student named Mira can be generalized along with all the students. The entity shall be a student, and further, the student is a person. The reverse is called specialization where a person is a student, and that student is Mira.
Going up in this structure is called generalization, where entities are clubbed together to represent a more generalized view. For example, a particular student named Mira can be generalized along with all the students. The entity shall be a student, and further, the student is a person. The reverse is called specialization where a person is a student, and that student is Mira.
Generalization
As mentioned above, the process of generalizing entities, where the generalized entities contain the properties of all the generalized entities, is called generalization. In generalization, a number of entities are brought together into one generalized entity based on their similar characteristics. For example, pigeon, house sparrow, crow and dove can all be generalized as Birds.Specialization
Specialization is the opposite of generalization. In specialization, a group of entities is divided into sub-groups based on their characteristics. Take a group ‘Person’ for example. A person has name, date of birth, gender, etc. These properties are common in all persons, human beings. But in a company, persons can be identified as employee, employer, customer, or vendor, based on what role they play in the company.Aggregration
Aggregration is a process when relation between two entity is treated as a single entity. Here the relation between Center and Course, is acting as an Entity in relation with Visitor.E-R Diagram symbols and Notations
E-R Diagram
ER-Diagram is a visual representation of data that describes how data is related to each other.Symbols and Notations
Components of E-R Diagram
The E-R diagram has three main components.1) Entity
An Entity can be any object, place, person or class. In E-R Diagram, an entity is represented using rectangles. Consider an example of an Organisation. Employee, Manager, Department, Product and many more can be taken as entities from an Organisation.Weak Entity
Weak entity is an entity that depends on another entity. Weak entity doen't have key attribute of their own. Double rectangle represents weak entity.2) Attribute
An Attribute describes a property or characterstic of an entity. For example, Name, Age, Address etc can be attributes of a Student. An attribute is represented using eclipse.Key Attribute
Key attribute represents the main characterstic of an Entity. It is used to represent Primary key. Ellipse with underlying lines represent Key Attribute.Composite Attribute
An attribute can also have their own attributes. These attributes are known as Composite attribute.3) Relationship
A Relationship describes relations between entities. Relationship is represented using diamonds.There are three types of relationship that exist between Entities.
- Binary Relationship
- Recursive Relationship
- Ternary Relationship
Binary Relationship
Binary Relationship means relation between two Entities. This is further divided into three types.One to One : This type of relationship is rarely seen in real world. The above example describes that one student can enroll only for one course and a course will also have only one Student. This is not what you will usually see in relationship.
One to Many : It reflects business rule that one entity is associated with many number of same entity. The example for this relation might sound a little weird, but this menas that one student can enroll to many courses, but one course will have one Student. The arrows in the diagram describes that one student can enroll for only one course.
Many to One : It reflects business rule that many entities can be associated with just one entity. For example, Student enrolls for only one Course but a Course can have many Students.
The above diagram represents that many students can enroll for more than one courses.
Recursive Relationship
Ternary Relationship
Relationship of degree three is called Ternary relationship
Subscribe to:
Posts (Atom)
WHAT IS .NET,CLR,CLS,CTS,MSIL CODE,JIT COMPILER
.NET Framework (.NET) Definition - What does .NET Framework (.NET) mean? ...
-
Network Switching Switching is process to forward packets coming in from one port to a port leading towards the destination. When data ...
-
Network Devices (Hub, Repeater, Bridge, Switch, Router and Gateways) 1. Repeater – A repeater operates at the physical layer. Its jo...
-
E-R Diagram ER-Diagram is a visual representation of data that describes how data is related to each other. Symbols and Notations ...