Database Design
Database Design
SUMA . R
Database Design
2
Entity - Relationship Models (E-R Model)
● It is a high level data model .
● This model is used to define the data elements and relationships
for a specified system.
● It develops a conceptual design for the database.
● It also develops a very simple and easy to design view of data.
● The database is represented as a diagram called
entity-relationship diagram.
3
● Entity - An entity may be any object, class, person or place. An
entity can be represented as rectangles.
Example- student, teacher, employee, department etc. can be taken
an entity.
● Attribute - is used to describe the property of an entity. Eclipse is
used to represent an attribute.
Example - name, roll no, total mark etc. can be attributes of a
student.
● Relationship - is used to describe the relation between entities.
Diamond or rhombus is used to represent the relationship.
4
Entity Relationship Diagram
Here Student and College are Entities and
StudyIn is the relationship.
5
Types Of Relationships
One-to-One Relationship
When only one instance of an entity is associated with the
relationship, then it is known as one to one relationship.
For example, A female can marry to one male, and a male can
marry to one female.
6
Types Of Relationships
One-to-Many Relationship
● When only one instance of the entity on the left, and more
than one instance of an entity on the right associates with the
relationship then this is known as a one-to-many relationship.
● For example, Scientist can invent many inventions, but the
invention is done by the only specific scientist.
7
Types Of Relationships
Many-to-One relationship
● When more than one instance of the entity on the left, and
only one instance of an entity on the right associates with the
relationship then it is known as a many-to-one relationship.
● For example, Student enrolls for only one course, but a
course can have many students.
8
Types Of Relationships
Many-to-Many relationship
● When more than one instance of the entity on the left, and
more than one instance of an entity on the right associates
with the relationship then it is known as a many-to-many
relationship.
● For example, Employee can assign by many projects and
project can have many employees.
9
THANK YOU