entity relationship diagrams don archer. entity relationship diagram erds – depicts data in terms...

Post on 21-Dec-2015

228 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Entity Relationship Diagrams

Don Archer

Entity Relationship DiagramERDs – depicts data in terms of the

entities and relationships described by the data.

Entity DefinitionEntity - is a person, place, thing, or

event of importance to the organization. Anything that can be a noun can be an entity.

Entity Occurrence - One individual instance of a type of entity - the set of data describing an instance of an entity.

Identifying Entities

Identify the nouns in the conversation:

Students may enroll in 12 courses. Classes are scheduled during 6 sessions throughout the year and are identified by sections. Each class may contain 18 students. Students may have several registrations for these classes that are held at 6 locations.

Qualified faculty are assigned to various sections of of the classes. Not all faculty are qualified to teach all courses.

Identifying Entities

Identify the nouns in the conversation:

STUDENTs may enroll in 12 COURSEs. CLASSes are scheduled during 6 SESSIONs throughout the YEAR and are identified by SECTIONs. Each CLASS may contain 18 STUDENTs. STUDENTs may have several REGISTRATIONs for these CLASSes that are held at 6 LOCATIONs.

QUALIFIED FACULTY are assigned to various SECTIONs of of the CLASSes. Not all FACULTY are qualified to teach all COURSEs.

studentidstudent nameaddresscitystatepostal codefacutlyid (FK)

STUDENT

studentidstudent nameaddresscitystatepostal codefacutlyid (FK)

STUDENT

course nocourse desccredit hours

COURSE

Identifying Relationships

Identify the verbs in the conversation:

STUDENTs may enroll in 12 COURSEs. Classes are scheduled during 6 SESSIONs throughout the YEAR and are identified by SECTIONs. Each class may contain 18 students. Students may have several REGISTRATIONs for these classes that are held at 6 LOCATIONs.

QUALIFIED FACULTY are assigned to various sections of of the classes. Not all FACULTY are qualified to teach all courses.

Identifying Relationships

Identify the verbs in the conversation:

Students may ENROLL in 12 courses. Classes are SCHEDULED during 6 sessions throughout the year and are IDENTIFIED by sections. Each class may CONTAIN 18 students. Students may HAVE several registrations for these classes that are HELD at 6 locations.

Qualified faculty are ASSIGNED to various sections of of the classes. Not all faculty are QUALIFIED to teach all courses.

Identifying Entities & Relations

studentidstudent nameaddresscitystatepostal codefacutlyid (FK)

STUDENT

course nocourse desccredit hours

COURSE

enrolls

Identifying Entities

studentidstudent nameaddresscitystatepostal codefacutlyid (FK)

STUDENT

course nocourse desccredit hours

COURSE

enrolls

Many-to-many

Identifying Entities

studentidstudent nameaddresscitystatepostal codefacutlyid (FK)

STUDENT

course nocourse desccredit hours

COURSE

enrolls

course nostudentidgrade

SCHEDULED CLASS

Enrolls inConsists of

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

consist of/makes up

registers for/registers

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

Is This Correct???

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

consist of/makes up

registers for/registers

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

NO!

Many-t

o-man

y

This is a many-to-many relationship

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

consist of/makes up

registers for/registers

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

How do you fix a M:M relation?

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

consist of/makes up

registers for/registers

has/is for

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

Associative Entity

year

YEAR

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

consist of/makes up

registers for/registers

has/is for

have/is for

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

Refinements

year

YEAR

session

SESSION

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

consist of/makes up

registers for/registers

has/is for

have/is for

have/is for

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

Refinements

year

YEAR

session

SESSION

section no

SECTION

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

consist of/makes up

registers for/registers

has/is for

have/is for

have/is for

have/is for

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

Refinements

year

YEAR

session

SESSION

section no

SECTION

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

facutlyidfaculty nameaddresscitystatezipemphasisfacutlyid/1 (FK) (IE)

FACULTY

consist of/makes up

registers for/registers

has/is for

is assigned to/has assigned

held at/hosts

have/is for

have/is for

have/is for

location codeloc description

LOCATION

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

Location

& Faculty

year

YEAR

session

SESSION

section no

SECTION

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

facutlyidfaculty nameaddresscitystatezipemphasisfacutlyid/1 (FK) (IE)

FACULTY

course nofacutlyid (FK)

QUALIFIED FACULTY

consist of/makes up

registers for/registers

has/is for

becomes/consitst of

held at/hosts

have/is for

have/is for

have/is for

location codeloc description

LOCATION

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

qualified for/qualified by

year

YEAR

session

SESSION

section no

SECTION

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

facutlyidfaculty nameaddresscitystatezipemphasisfacutlyid/1 (FK) (IE)

FACULTY

course nofacutlyid (FK)

QUALIFIED FACULTY

consist of/makes up

registers for/registers

has/is for

becomes/consitst of

is assigned to/has assigned

held at/hosts

have/is for

have/is for

have/is for

location codeloc description

LOCATION

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

qualified for/qualified by

year

YEAR

session

SESSION

section no

SECTION

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

facutlyidfaculty nameaddresscitystatezipemphasisfacutlyid/1 (FK) (IE)

FACULTY

course nofacutlyid (FK)

QUALIFIED FACULTY

consist of/makes up

registers for/registers

has/is for

advised by/advises

becomes/consitst of

is assigned to/has assigned

held at/hosts

have/is for

have/is for

have/is for

location codeloc description

LOCATION

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

qualified for/qualified by

year

YEAR

session

SESSION

section no

SECTION

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

facutlyidfaculty nameaddresscitystatezipemphasisfacutlyid/1 (FK) (IE)

FACULTY

course nofacutlyid (FK)

QUALIFIED FACULTY

mentors/is mentored by

consist of/makes up

registers for/registers

has/is for

advised by/advises

becomes/consitst of

is assigned to/has assigned

held at/hosts

have/is for

have/is for

have/is for

location codeloc description

LOCATION

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

qualified for/qualified by

Recursive

Business rules Each STUDENT may HAVE one or more CLASS REGISTRATIONS. Each CLASS REGISTRATION must be ASSIGNED to one & only one

STUDENT.

Each CLASS may HAVE one or more CLASS REGISTRATIONs. Each CLASS REGISTRATION must BE FOR one & only one CLASS.

Each COURSE may BE ASSIGNED to one or more SCHEDULED CLASSes.

Each SCHEDULED CLASS must CONSIST on one & only one COURSE.

Business rules Each LOCATION may be ASSIGNED one or more SCHEDULED

CLASSes. Each SCHEDULED CLASS must BE ASSIGNED to one & only one

LOCATION.

Each YEAR may be ASSIGNED one or more SCHEDULED CLASSes. Each SCHEDULED CLASS must BE ASSIGNED to one & only one

YEAR.

Each SECTION may be ASSIGNED one or more SCHEDULED CLASSes.

Each SCHEDULED CLASS must BE ASSIGNED to one & only one SECTION.

Business rules Each FACULTY may ADVISE one or more STUDENTs. Each STUDENT must be ADVISED BY one & only one ADVISOR.

Each QUALIFIED FACULTY must be ASSIGNED to one & only one COURSE.

Each COURSE may be QUALIFIED by one or more QUALIFIED FACULTY.

Each QUALIFIED FACULTY must CONSIST of one & only one FACULTY.

Each FACULTY may be QUALIFIED for one or more QUALIFIED FACULTY positions.

year

YEAR

session

SESSION

section no

SECTION

yearsessionsection nocourse nostudentid/1studentid (FK) (IE)

CLASS REGISTRATION

studentidstudent nameaddresscitystatepostal codefacutlyid (FK) (IE)

STUDENT

course nocourse desccredit hours

COURSE

facutlyidfaculty nameaddresscitystatezipemphasisfacutlyid/1 (FK) (IE)

FACULTY

course nofacutlyid (FK)

QUALIFIED FACULTY

mentors/is mentored by

consist of/makes up

registers for/registers

has/is for

advised by/advises

becomes/consitst of

is assigned to/has assigned

held at/hosts

have/is for

have/is for

have/is for

location codeloc description

LOCATION

yearsessionsection nocourse nofacultyidlocation code

SCHEDULED CLASS

qualified for/qualified by

Visio

Other Questions?

top related