Uploaded by aparna.gaddam95

rough

advertisement
Connectivity in the Entity relationship Diagram
Relationship between DIVISION and DEPARTMENT – 1: M relationship
Relationship between DEPARTMENT and EMPLOYEE - 1: M relationship
Relationship between EMPLOYEE and PROJECT- M:N relationship
Cardinalities are shown in the above diagram of data model between the identities.
There is M:N relationship between Employee and Project.
Spiting this M:N relationship between Employee and project and creating Crow’s Foot
ERD.
Entities and relationships share:

INSTRUCTOR shares 1.M relation with CLASS.

COURSE shares 1M relation with CLASS.

CLASS shares 1:M relation with ENROLL.

TRAINEE shares 1:M relation with ENROLL.
A COURSE may generate one or more CLASSes, an INSTRUCTOR teaches up to two
CLASSes, and a TRAINEE may enroll in up to two CLASSes.
A trainee can take more than one class, and each class contains many (10 or more) trainees, so
there is a M:N relationship between TRAINEE and CLASS. (We must, therefore, create a
composite entity to serve as the bridge between TRAINEE and CLASS.) A class is taught by
only one instructor, but an instructor can teach up to two classes. Therefore, there is a 1:M
relationship between INSTRUCTOR and CLASS. Finally, a COURSE may generate more than
one CLASS, while each CLASS is based on one COURSE, so there is a 1:M relationship
between COURSE and CLASS. These relationships are all reflected in the following E-R
diagram. Note the optional and mandatory relationships: to exist, a CLASS must have
TRAINEEs enrolled in it, but TRAINEEs do not necessarily take CLASSes. (Some may take
"on the job training.") An INSTRUCTOR may not be teaching any CLASSes, doing research
instead, but each CLASS must have an INSTRUCTOR. If not enough people sign up for a
CLASS, a COURSE may not generate any CLASSes, but each CLASS must represent a
COURSE
\
The relationship communicated by "DEPARTMENT employs EMPLOYEE" is appeared as
required on the EMPLOYEE side. This implies that a DEPARTMENT should have at any rate
one EMPLOYEE to have departmental status. Be that as it may, DEPARTMENT is
discretionary to EMPLOYEE, so a worker can be entered without entering a departmental FK
esteem. On the off chance that the presence of nulls isn't satisfactory, you can make a "No task"
record in the DEPARTMENT table, to be referred to in the EMPLOYEE table if a
representative isn't allocated to an office.
The 1:1 "EMPLOYEE manages DEPARTMENT" relationship. The opposite side of this
relationship is that "each DEPARTMENT is overseen by one EMPLOYEE". Thusly, one of
the EMPLOYEE table's PK esteems should show up as the FK esteem in the DEPARTMENT
table.
In spite of the fact that you should move toward a 1:1 relationship with alert – most 1:1
connections are the consequence of a misidentification of characteristics as elements – the 1:1
connections reflected in the "EMPLOYEE manages DEPARTMENT" and "EMPLOYEE runs
DIVISION" are proper. These 1:1 connections evade the information redundancies you would
experience in the event that you copied representative information – such a names, telephones,
and email addresses – in the DIVISION and DEPARTMENT substances.
Likewise, on the off chance that you have numerous connections between two elements -, for
example, the "EMPLOYEE manages DEPARTMENT" and "DEPARTMENT employs
EMPLOYEE" connections – you should ensure that
Download