Entity-Relationship (E/R) diagrams use various notations to represent entities, attributes, relationships, and other components within a database model. Here are some commonly used notations in E/R diagrams:
1. Entity:
Entities are represented as rectangles with rounded corners. The entity name is written inside the rectangle. For example:
+-------------------+
| Student |
+-------------------+
2. Attribute:
Attributes are represented as ovals or ellipses connected to their respective entities. The attribute name is written inside the oval. For example:
+-------------------+
| Student |
+-------------------+
| StudentID |
| Name |
| DateOfBirth |
+-------------------+
3. Primary Key:
The primary key attribute is typically underlined within the attribute oval or listed separately below the entity with the primary key label. For example:
+-------------------+
| Student |
+-------------------+
| StudentID (PK) |
| Name |
| DateOfBirth |
+-------------------+
4. Relationships:
Relationships between entities are depicted using lines connecting the related entities. The relationship name is written near the line. The cardinality of the relationship can be indicated using notations such as crow's foot or Chen notation. For example:
+-------------------+
| Student |
+-------------------+
| StudentID (PK) |
| Name |
| DateOfBirth |
+-------------------+
|
| Enrolls In
|
+-------------------+
| Course |
+-------------------+
| CourseID (PK) |
| Title |
| DepartmentID |
+-------------------+
5. Cardinality:
Cardinality constraints specify the number of instances participating in a relationship. Common cardinality notations include "1" for one, "N" for many, and the crow's foot notation for one-to-many relationships. For example:
+-------------------+
| Student |
+-------------------+
| StudentID (PK) |
| Name |
| DateOfBirth |
+-------------------+
|
| 1---N
|
+-------------------+
| Course |
+-------------------+
| CourseID (PK) |
| Title |
| DepartmentID |
+-------------------+
These notations provide a basic understanding of how entities, attributes, and relationships are represented in an E/R diagram. It's important to note that there are variations in notations and symbols used in different E/R diagramming methodologies.
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc