0% found this document useful (0 votes)
14 views8 pages

Er Model

An Entity-Relationship (ER) Model visually represents the structure of a database using diagrams that include entities, attributes, and relationships. Key components of ER diagrams include rectangles for entities, ellipses for attributes, and diamonds for relationships, with various types of entities (strong and weak) and attributes (key, composite, multivalued, derived). Relationships can be classified into one-to-one, one-to-many, many-to-one, and many-to-many types.

Uploaded by

Vaibhav Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views8 pages

Er Model

An Entity-Relationship (ER) Model visually represents the structure of a database using diagrams that include entities, attributes, and relationships. Key components of ER diagrams include rectangles for entities, ellipses for attributes, and diamonds for relationships, with various types of entities (strong and weak) and attributes (key, composite, multivalued, derived). Relationships can be classified into one-to-one, one-to-many, many-to-one, and many-to-many types.

Uploaded by

Vaibhav Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

What is an ER Model?

An Entity-Relationship Model represents the structure of the database with


the help of a diagram.

Examples of entities:

Person: Employee, Student, Patient


Place: Store, Building
Object: Machine, Car, etc

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

Entities are of two types:

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:

1. One to one (1:1) relationship

2. One to many (1:N) relationship


3. Many to one (M:1) relationship

4. Many to many (M:N) relationship:

You might also like