ENTITY
RELATIONSHIP
DESIGN ISSUES
DBMS
In Hindi
We will discuss the basic design issues of ER database schema in
the following points.
Entity vs Attribute
Entity vs Relationship
Binary vs Ternary Relationship
Entity vs Attribute
Is Telephone-No an attribute or an entity set?
Employees
Emp_id
Name Telephone
No.
Employees Telephone
Emp_id
Name
Location
Type
Telephone
No.
Emp_
telephone
Using attribute as Entity
Use of telephone as an entity allows extra information about phone numbers (plus multiple phone numbers.)
Entity vs Attribute
Works_In does not allow an employee to work in a department for two or more periods
Employees Departments
Emp_id
from to
Name Dept_
name. Budget
Dept_
id
Works_In
Employees Departments
Emp_id
from to
Name Dept_
name. Budget
Dept_id
Works_In
2
Duration
Entity vs Relationship
Customer Loan
Account
_no
Name
City
Loan_
no. Amount
Borrower
An alternative is to model a loan not as an entity, but rather as a relationship between
customer and branches
Customer Branches
Account
_no
Name
City
Loan_no Amount
B_name
B_city
Loan
Binary vs Ternary Relationship
Generally, the relationships described in the databases are binary
relationships. However, non-binary relationships can be represented by
several binary relationships.
Ternary (n=3) relationship set R relating entity sets A, B and C.
We replace the relationship set R by an entity set E,
If the relationship set R had any attributes, these are assigned to entity set E.
B C
R
A
B C
RA
A
E RC
RB
Example
Ternary relationship between student, assignment, and submission. Allow multiple
submission for a particular assignment from a particular student.
Student Submission
Stud_id
Name
Due_date Name
url
Sub_id
Date
Data
Submit
Assignment
Example
Can also represent as two binary relationships
Student Submission
Stud_id
Name Due_date
Name
url
Sub_id Date
Data
Complete Assignment
Submit
Entity-relationship model is inexact
Can represent a particular design in several different ways.
Thanks for watching!
If you have a question, you can reach me via e-mail at omega.teched@gmail.com
Social Media Handles:
omega.teched
megha_with
megha-sharma24
OMega TechEd

Entity Relationship design issues

  • 1.
  • 2.
    We will discussthe basic design issues of ER database schema in the following points. Entity vs Attribute Entity vs Relationship Binary vs Ternary Relationship
  • 3.
    Entity vs Attribute IsTelephone-No an attribute or an entity set? Employees Emp_id Name Telephone No. Employees Telephone Emp_id Name Location Type Telephone No. Emp_ telephone Using attribute as Entity Use of telephone as an entity allows extra information about phone numbers (plus multiple phone numbers.)
  • 4.
    Entity vs Attribute Works_Indoes not allow an employee to work in a department for two or more periods Employees Departments Emp_id from to Name Dept_ name. Budget Dept_ id Works_In Employees Departments Emp_id from to Name Dept_ name. Budget Dept_id Works_In 2 Duration
  • 5.
    Entity vs Relationship CustomerLoan Account _no Name City Loan_ no. Amount Borrower An alternative is to model a loan not as an entity, but rather as a relationship between customer and branches Customer Branches Account _no Name City Loan_no Amount B_name B_city Loan
  • 6.
    Binary vs TernaryRelationship Generally, the relationships described in the databases are binary relationships. However, non-binary relationships can be represented by several binary relationships. Ternary (n=3) relationship set R relating entity sets A, B and C. We replace the relationship set R by an entity set E, If the relationship set R had any attributes, these are assigned to entity set E. B C R A B C RA A E RC RB
  • 7.
    Example Ternary relationship betweenstudent, assignment, and submission. Allow multiple submission for a particular assignment from a particular student. Student Submission Stud_id Name Due_date Name url Sub_id Date Data Submit Assignment
  • 8.
    Example Can also representas two binary relationships Student Submission Stud_id Name Due_date Name url Sub_id Date Data Complete Assignment Submit Entity-relationship model is inexact Can represent a particular design in several different ways.
  • 9.
  • 10.
    If you havea question, you can reach me via e-mail at omega.teched@gmail.com Social Media Handles: omega.teched megha_with megha-sharma24 OMega TechEd