ER(entity relationship) model in DBMS

0


 ER(Entity Relationship) diagram model


An Entity-Relationship (ER) model is a way of graphically representing the logical relationships between entities in a database. It is used to model the relationships between entities and their attributes.


Components of ER model:

There are three main components in an ER model: 

entities, 

attributes, 

and relationships.


An entity is a real-world object or concept that is represented in a database. For example, a person, a company, or an event can all be considered entities.


Attributes are the properties or characteristics of an entity. For example, a person entity may have attributes such as name, date of birth, and address.


Relationships are the connections that exist between entities. For example, a person may work for a company, or a company may sell a product.


Here is an example of an ER model:


Imagine that you are creating a database for a school. You may have entities for students, teachers, and classes. Each of these entities would have attributes, such as the student's name and date of birth, the teacher's name and subject specialties, and the class's subject and class schedule.


There would also be relationships between these entities. For example, a student may take a class, and a teacher may teach a class.


ER(Entity Relationship) diagram/ features of ER model

An Entity Relationship (ER) diagram is a visual representation of data that describes how entities (or objects) are related to each other. It is used to model the data stored in a database and is a useful tool for understanding how the data is organized and how it is used.


There are several components that can be included in an ER diagram:


Entities: An entity is a real-world object or concept that exists independently. Examples of entities include a person, a company, a book, or an event.


Attributes: An attribute is a characteristic or property of an entity. For example, a person entity might have attributes such as name, address, and phone number.


Relationships: A relationship is a connection or link between two or more entities. For example, a person might have a relationship with a company (e.g., an employee works for a company).


Cardinality: Cardinality refers to the number of occurrences of one entity in relation to another. There are three types of cardinality: one-to-one, one-to-many, and many-to-many.


Example:

Consider a database for a school. Some of the entities in this database might be:


Student


Class


Teacher


Course


Some of the attributes of the Student entity might be:


Student ID


Name


Email


Phone number


There might be a one-to-many relationship between Student and Class, because a student can be enrolled in many classes but a class can only have one student.


There might also be a many-to-many relationship between Class and Teacher, because a class can have multiple teachers and a teacher can teach multiple classes.


An Entity-Relationship (ER) diagram is a graphical representation of the entities and relationships within a database. There are a number of conventions and symbols that are used in constructing an ER diagram, including:

ER diagram notations in DBMS | SKILLS ARENA


ER Diagram Notation 


Rectangles, which represent entity sets.


Diamonds, which represent relationships between entity sets.


Ellipses, which represent attributes.


Lines, which connect attributes to entity sets or relationships.


There are several notations used in Entity Relationship (ER) diagrams:


Entity: This represents a real-world object or concept, such as a customer, employee, or product. It is represented by a rectangle with the entity name written inside.


Attribute: This represents a characteristic or property of an entity, such as a customer's name or an employee's salary. It is represented by an oval with the attribute name written inside.


Relationship: This represents the connection between two or more entities, such as a customer placing an order or an employee working for a company. It is represented by a diamond with the relationship name written inside.


Cardinality: This represents the number of instances of one entity that can be related to a single instance of another entity. It is indicated by a line connecting two entities, with a number or symbol on either end.


Participation: This represents the degree to which an entity is involved in a relationship. It is indicated by a line connecting an entity to a relationship, with a solid or dashed line indicating "total participation" or "partial participation," respectively.


Key: This represents a unique identifier for an entity. It is indicated by an oval with a line around it, placed next to the attribute that serves as the key.


Weak Entity: This represents an entity that cannot exist on its own and is dependent on another entity. It is represented by a double-outlined rectangle.


Inheritance: This represents the relationship between a supertype entity and its subtype entities. It is indicated by a line connecting the supertype entity to its subtype entities, with a triangle pointing towards the supertype entity.


______________________________________



Please share this post and blog link with your friends.For more programs use this blog.


If you have any problem, please comment in comment box, subscribe this blog for notifications of new post on your email and follow this blog.If you have any method of this program or want to give any suggestion send email on hc78326@gmail.com


Created by-- HARSH CHAUHAN


Tags

Post a Comment

0Comments
Post a Comment (0)