E-R ( Entity Relationship ) model
- An E-R model was proposed by Peter Chen in 1971.
- An Entity–relationship model describes the structure of a database .
- An ER model is a design or blueprint of a database .
- An E-R model is a high-level data model. it is used to define the data elements and relationship for a specified system.
- An ER model defines the conceptual view of a database.
Suppose we design a college database. In this database, the student and college will be an entity with attributes like address, name, id, age, clg_id , clg_name etc.
Geometric shapes and their meaning in an E-R Diagram :-
Rectangle: Represents Entity sets.
Diamonds: Relationship Set
Lines: They link attributes to Entity Sets and Entity sets to Relationship Set
Double Ellipses: Multi-valued Attributes
Dashed Ellipses: Derived Attributes
Double Rectangles: Weak Entity Sets
Components of a ER Diagram
there are three basic concepts
Entities : A real-world thing either living or non-living that is easily recognizable and nonrecognizable. An entity may be any object, class, person or place. entity can be represented as rectangles.
Attribute : The attribute is used to describe the property of an entity. Eclipse is used to represent an attribute.
For example, id, age, name, address, clg_id, clg_name etc. can be attributes of a student and college.
Relationship: A relationship is used to describe the relation between entities. Diamond is used to represent the relationship.
Types of relationship : there are many types of relationship .
- one – to – one relationship
- one – to – many relationship
- many – to – one relationship
- many – to – many relationship