ER Diagram in DBMS: Entities, Attributes, Keys & Relationships (FYBSc IT Practical)

Conceptual Designing using ER Diagrams in DBMS — FYBSc IT Practical

Explanation of entities, attributes, keys, relationships, cardinalities, and generalization & specialization with ER diagram example for FYBSc IT DBMS practical.

Aim

To study conceptual database designing using Entity-Relationship (ER) Diagrams, and understand entities, attributes, keys, relationships, cardinalities, generalization and specialization.

Theory

Conceptual Design is the first stage of database design where we create a high-level model of the real-world problem. The most common tool is the Entity-Relationship Diagram (ERD), which shows entities, attributes, keys, and relationships.

  • Entity: Real-world object (e.g., Student, Course).
  • Attribute: Property of entity (e.g., Name, RollNo).
  • Key: Attribute(s) that uniquely identify entity records (e.g., RollNo).
  • Relationship: Association between entities (e.g., Student enrolls in Course).
  • Cardinality: Type of relationship: One-to-One, One-to-Many, Many-to-Many.
  • Generalization: Combining lower entities into a higher entity.
  • Specialization: Dividing higher entities into sub-entities.

Example: University Database

Entities & Attributes

  • Student (RollNo PK, Name, Email, Phone)
  • Course (CourseID PK, CourseName, Credits)
  • Teacher (TeacherID PK, Name, Department)
  • Department (DeptID PK, DeptName)

Relationships

  • Student — enrolls in — Course (Many-to-Many, M:N)
  • Teacher — teaches — Course (One-to-Many, 1:M)
  • Department — offers — Course (One-to-Many, 1:M)

ER Diagram

Student RollNo (PK), Name Course CourseID (PK), Name Teacher TeacherID (PK) Enrollment EnrollID (PK), RollNo (FK), CourseID (FK) enrolls in (M:N) teaches (1:M)

Generalization & Specialization

Generalization: Combining common features of lower entities into a higher-level entity. Example: Student and Teacher generalized as Person.

Specialization: Breaking down higher-level entities into sub-entities. Example: Employee → PermanentEmployee, ContractEmployee.

Conclusion

Conceptual design with ER diagrams is an important theory-based DBMS practical. It helps in identifying entities, attributes, keys, relationships, cardinalities, and applying generalization/specialization before moving to relational schema. For FYBSc IT practicals, students should write definitions, explanations, and draw neat ER diagrams in their practical book.

FYBSc IT DBMS Practical – Conceptual Designing using ER Diagrams
🔗