Er Model
Er Model
Examples of entities:
ER Diagrams: It mainly contains three basic symbols which are rectangle, oval
and diamond to represent relationships between elements, entities and attributes.
Following are the main components and its symbols in ER Diagrams:
Rectangles: This Entity Relationship Diagram symbol represents entity types
Ellipses : Symbol represent attributes
Diamonds: This symbol represents relationship types
Lines: It links attributes to entity types and entity types with other relationship
types
Primary key: attributes are underlined
Double Ellipses: Represent multi-valued attributes
Components of ER Diagram
Entities
Strong Entity
Weak Entity
Attributes
Key Attribute
Composite Attribute
Multivalued Attribute
Derived Attribute
Relationships
One-to-One Relationships
One-to-Many Relationships
Many-to-One Relationships
Many-to-Many Relationships
1. Strong Entity – A strong entity is an entity type that has a key attribute. It
doesn't depend on other entities in the schema.
Example – roll_number
2.Weak Entity – Weak entity type doesn’t have a key attribute and so we cannot
uniquely identify them by their attributes alone.
For example - the address can't be used to uniquely identify students as there can be many
students from the same locality.
1. Key Attribute
The attribute which uniquely identifies each entity in the entity set is called the key
attribute. For example, Roll_No will be unique for each student. In ER diagram, the key
attribute is represented by an oval with underlying lines.
2. Composite Attribute
An attribute composed of many other attributes is called a composite attribute. For
example, the Address attribute of the student Entity type consists of Street, City, State,
and Country. In ER diagram, the composite attribute is represented by an oval
comprising of ovals.
3. Multivalued Attribute
An attribute consisting of more than one value for a given entity. For example,
Phone_No (can be more than one for a given student). In ER diagram, a
multivalued attribute is represented by a double oval.
4. Derived Attribute
An attribute that can be derived from other attributes of the entity type is
known as a derived attribute. e.g.; Age (can be derived from DOB). In ER
diagram, the derived attribute is represented by a dashed oval.
Relation: