ER DIAGRAMS in tamil | unit -2 cse sem -4 | epi-2.2 |
HTML-код
- Опубликовано: 7 окт 2024
- topic covered in this video :-
ER-DIAGRAMS unit -2 DATABASE DESIGN for computer science engineering in 4th sem
playlist of dbms subject :-
• Database Management sy...
join to our telegram channel to download the pdf used in this video:
t.me/cseengine...
DATABASE MANAGEMENT SYSTEMS
unit-2
ER-DIAGRAMS
2
Course Outline:-
UNIT II DATABASE DESIGN
- E-R Diagrams
Working with ER Diagrams
ER Diagram is a visual representation of data that describes how data is related to
each other. In ER Model, we disintegrate data into entities, attributes and setup
relationships between entities, all this can be represented visually using the ER
diagram.
Components of ER Diagram
Entitiy , Attributes, Relationships etc form the components of ER Diagram and there are defined symbols
and shapes to represent each one of them. Let's see how we can represent these in our ER Diagram. Entity
Simple rectangular box represents an Entity.
4
Relationships between Entities - Weak and Strong
Rhombus is used to setup relationships between two or more entities.
Attributes for any Entity Ellipse is used to represent attributes of any entity. It is
connected to the entity.
5
ER Diagrams
Weak Entity: A weak Entity is represented using double rectangular boxes. It is
generally connected to another entity.
Key Attribute for any Entity: To represent a Key attribute, the attribute name inside
the Ellipse is underlined.
6
ER Diagrams
Derived Attribute for any Entity: Derived attributes are those which are derived based
on other attributes, for example, age can be derived from date of birth. To represent a
derived attribute, another dotted ellipse is created inside the main ellipse.
Multivalued Attribute for any Entity: Double Ellipse, one inside another, represents the
attribute which can have multiple values.
7
ER Diagrams
Composite Attribute for any Entity : A composite attribute is the attribute, which also
has Attributes.
8
ER Diagrams-ENTITY
An Entity can be any object, place, person or class. In ER-Diagram, an entity is
represented using rectangles. Consider an example of an Organisation- Employee,
Manager, Department, Product and many more can be taken as entities in an
Organisation.
The yellow rhombus in between represents a relationship.
9
ER Diagram: Key Attribute
Key attribute represents the main characteristic of an Entity. It is used to represent a
Primary key. Ellipse with the text underlined, represents Key Attribute.
10
ER Diagram: Binary Relationship
Binary Relationship means relation between two Entities. This is further divided into
three types.
One to One Relationship : This type of relationship is rarely seen in real world.
In the above examples, one person can have only one passport,also one passport can
belongs to only one person. One driver can be the driver of one car at a time. A car can
have only one driver at a time.
11
ER Diagram: Binary Relationship
One to Many Relationship: The below example showcases this relationship, which
means that 1 student can opt for many courses, but a course can only have 1 student.
Sounds weird! This is how it is.
Many to One Relationship: It reflects business rule that many entities can be
associated with just one entity. For example,Student enrolls for only one Course but a
Course can have many Students.
12
ER Diagram: Binary Relationship
Many to Many Relationship: The below diagram represents that one student can enroll
for more than one courses. And a course can have more than 1 student enrolled in it.
13
ER Diagram: Recursive Relationship
When an Entity is related with itself it is known as Recursive Relationship.
14
ER Diagram: Ternary Relationship
Relationship of degree three is called Ternary relationship. A Ternary relationship involves three
entities. In such relationships we always consider two entites together and then look upon the third.
For example, in the diagram above,we have three related entities, Company, Product and Sector. To
understand the relationship better or to define rules around the model, we should relate two entities
and then derive the third one. A Company produces many Products/ each product is produced by
exactly one company. A Company operates in only one Sector/each sector has many companies
operating in it. Considering the above two rules or relationships, we see that although the complete
relationship involves three entities, but we are looking at two entities at a time.
15
ER Diagram
16
ER Diagram simple example:-
DATABASE MANAGEMENT SYSTEMS
Thanks for watching
=Enhanced-ER Model
Thanks sir 🤎