The above diagram represents that one student can enroll for more than one courses. For example, Student enrolls for only one Course but a Course can have many Students. It reflects business rule that many entities can be associated with just one entity. The below example showcases this relationship, which means that 1 student can opt for many courses, but a course can only have 1 student. This is not what you will usually see in real-world relationships. The above example describes that one student can enroll only for one course and a course will also have only one Student. This type of relationship is rarely seen in real world. This is further divided into three types. There are three types of relationship that exist between Entities.īinary Relationship means relation between two Entities. Relationship is represented using diamonds or rhombus. These attributes are known as Composite attributes.Ī Relationship describes relation between entities. Ellipse with the text underlined, represents Key Attribute.Īn attribute can also have their own attributes. Key attribute represents the main characterstic of an Entity. An attribute is represented using eclipse. For example, Name, Age, Address etc can be attributes of a Student. Double rectangle is used to represent a weak entity.Īn Attribute describes a property or characterstic of an entity. Weak entity doesn't have anay key attribute of its own. Weak entity is an entity that depends on another entity. The yellow rhombus in between represents a relationship. Consider an example of an Organisation- Employee, Manager, Department, Product and many more can be taken as entities in an Organisation. In ER Diagram, an entity is represented using rectangles. To represent a derived attribute, another dotted ellipse is created inside the main ellipse.ĭouble Ellipse, one inside another, represents the attribute which can have multiple values.Ī composite attribute is the attribute, which also has attributes.Īn Entity can be any object, place, person or class. To represent a Key attribute, the attribute name inside the Ellipse is underlined.ĭerived attributes are those which are derived based on other attributes, for example, age can be derived from date of birth. It is generally connected to another entity. It is connected to the entity.Ī weak Entity is represented using double rectangular boxes. Rhombus is used to setup relationships between two or more entities.Įllipse is used to represent attributes of any entity. Relationships between Entities - Weak and Strong Simple rectangular box represents an Entity. Let's see how we can represent these in our ER Diagram. In ER Model, we disintegrate data into entities, attributes and setup relationships between entities, all this can be represented visually using the ER diagram.įor example, in the below diagram, anyone can see and understand what the diagram wants to convey: Developer develops a website, whereas a Visitor visits a website.Įntitiy, Attributes, Relationships etc form the components of ER Diagram and there are defined symbols and shapes to represent each one of them.