SlideShare ist ein Scribd-Unternehmen logo
1 von 42
DEVELOPING
    AN
ER DIAGRAM
 The process of database design is an
  iterative rather than a linear or sequential
  process.



 The verb iterate means “to do again
  repeatedly.”
 An iterate process is, thus, one based on
  repetition of processes and procedures.
  Building an ERD usually involves the
  following:

• Create a detailed narrative of the
  organization’s description of operations.

• Identify the business rules based on
  description of operations.
• Identify the main entities an
  relationships from the business rules.
• Develop the initial ERD.
• Identify the attributes and the primary
  keys that adequately describe the
  entities.
• Revise and review the ERD.
The interview process yields the following
 business rules:

 1. Tiny College (TC) is divided into several
    schools :
• a school of business
• a school of arts and sciences
• a school of education
• a school of applied sciences
 To illustrate the use of the iterative
  process that ultimately yields a workable
  ERD, let’s start with an initial interview
  with the
Tiny College Administrators.
• Each school is administered by a dean
  who is a professor.
• Each professor can be a dean of only one
  school,
• And a professor is not required to be a
  dean of any school.

Therefore, a 1:1 relationship exist between
 PROFESSOR AND SCHOOL.
 Note that the cardinality can be
  expressed by writing (1,1) next to the
  entity PROFESSOR (0,1) next to the
  entity SCHOOL.
2. Each school comprises several
  departments.
For example the school of business has;
• an accounting department
• a management/marketing department,
• an economics/finance department
• a computer information system
  department.
 Note again the cardinality rules: The
  smallest number of departments operated
  by a school is one, and the largest
  number of departments is indeterminate
  (N).

 On the other hand, each department
  belongs to only single school; thus, the
  cardinality is expressed by (1,1).
 That is the minimum number of schools
  that department belongs to is one, as is
  the maximum number.

 Figure 4.26 illustrates these two business
  rules.
Fig. 4.26   The first Tiny College ERD
            segment

      PROFESSOR                                 SCHOOL
                         is dean of
PK   PROF_NUM                            PK    SCHOOL_CODE
     PROF_SPECIALTY                      FK1   PROF_NUM
     PROF_RANK                                 SCHOOL_NAME
     PROF_LNAME
     PROF_FNAME
     PROF_INITIAL                                operates
     PROF_EMAIL


                                               DEPARTMENT
                                         PK    DEPT_CODE
                                         FK1   SCHOOL_CODE
                                               DEPT_NAME
3. Each department may offer many
  courses. For example, the
  management/marketing department
  offer courses such as;
• Introduction to Management
• Principles of Marketing
• Production Management
The ERD segment for this condition is
  shown in Figure 4.27.
Fig. 4.27   The second Tiny College ERD
            segment


                                           COURSE
      DEPARTMENT                    PK    CRS_CODE
                         offers
 PK    DEPT_CODE                    FK1   DEPT_CODE
                                          CRS_TITLE
       SCHOOL_CODE
                                          CRS_DESCRIPTION
       DEPT_NAME
                                          CRS_CREDIT
 Note that this relationship is based on the
  way Tiny College operates.

 If, for example Tiny College had some
  departments that were classified as
  “research only”, those departments would
  not offer courses; therefore, the
  COURSE entity would be optional to the
  DEPARTMENT entity.
4. The relationship between COURSE and
  CLASS was illustrated in Figure 4.9.
  Nevertheless, it is worth repeating that a
  CLASS is a section of a COURSE.
That is, a department may offer several
  sections (classes) of the same database
  course.
 Each of those classes is taught by a
  professor at a given time in a given
  place.

 In short, a 1:M relationship exist
  between COURSE and CLASS.

 However, because of a course may exist
  in Tiny College’s course catalog even
  when it is not offered as a class in a
  current class schedule.
 CLASS is optional to COURSE.

 Therefore, the relationship between the
  COURSE and CLASS looks like Figure
  4.28.
Fig. 4.28     The third Tiny College ERD
              segment




            COURSE                                CLASS
 PK    CRS_CODE              generates     PK    CLASS_CODE
                                                 CLASS_SECTION
       DEPT_CODE                                 CLASS_TIME
       CRS_TITLE                           FK1   CLASS_CODE
       CRS_DESCRIPTION
       CRS_CREDIT
5. Each department should have one or
  more professors assigned to it.
 One and only one those professors
  chairs department, and no professor is
  required to accept the chair position.
 Therefore, DEPARTMENT is optional to
  PROFESSOR in the “chairs”
  relationship.
 Those relationships are summarized in
  the ER segment shown in Figure4.29.
Fig. 4.29      The fourth Tiny College ERD
               segment



            PROFESSOR                              DEPARTMENT
                                employs
  PK    PROF_NUM                             PK     DEPT_CODE
  FK1   DEPT_CODE               chairs       FK1    PROF_NUM
        PROF_SPECIALTY                              DEPT_NAME
        PROF_RANK
        PROF_LNAME
        PROF_FNAME
        PROF_INITIAL
        PROF_EMAIL
6. Each professor may teach up four
  classes; each class is a section of a
  course.
 A professor may also be on a research
  contract an teach no class at all.

 The ERD segment in Figure 4.30 depicts
  those conditions.
Fig. 4.30      The fifth Tiny College ERD
               segment




            PROFESSOR
                                                   CLASS
   PK       PROF_NUM            teaches     PK    CLASS_CODE
            PROF_SPECIALTY
                                            FK1   PROF_NUM
            PROF_RANK
                                                  CLASS_TIME
            PROF_LNAME
            PROF_FNAME
            PROF_INITIAL
            PROF_EMAIL
7. A student may enroll in several classes
  but takes each class only once during
  any given enrollment period.
 For example, during the current
  enrollment period, a student may decide
  to take five classes-
•   Statistics
•   Accounting
•   English
•   Database
•   History
-but that student would not enrolled in the
  same Statistics class five times during
  the enrollment period!
 Each student may enroll in up to six
  classes, and each class may have up to
  35 students, thus creating an M:N
  relationship between STUDENT and
  CLASS. Because a class can initially
  exist (at the start of the enrollment
  period) even though no students have
  enrolled in it.
 STUDENT is optional to CLASS in the
  M:N relationship. This M:N relationship
  must be divided into two 1:M
  relationships through the use of the
  ENROLL entity, shown in the ERD
  segment in Figure 4.31.

 But note that the optional symbol is
  shown next to ENROLL. If a class exist
  but has no students enrolled in it, that
  class doesn’t occur in the ENROLL
  table.
Fig. 4.31       The sixth Tiny College ERD
                       segment




     STUDENT                                 ENROLL                            CLASS
                    Is written in                           Is found in
PK   STUD_NUM                       PK,FK1   STUD_NUM                     PK   CLASS_CODE
                                    PK,FK2   CLASS_CODE
     STUD_LNAME                                                                CLASS_TIME
                                             ENROLL _DATE
     STUD_FNAME                                             (0,35)
     STUD_INITIAL        (0,6)               ENROLL GRADE
     STUD_EMAIL
 Note also that the ENROLL entity is
  weak: it is existence-dependent, and its
  (composite) PK is composed of PK’s of
  the STUDENT and CLASS entities. You
  can add cardinalities (0,6) and (0,35)
  next to enroll entity to reflect the
  business rule constraints, as shown in
  Fig. 4.31. (Vision Professional does not
  automatically generate such
  cardinalities, but you can use text box to
  accomplish that task.)
8. Each department has several (or many)
  students whose major is offered by that
  department.

• However, each student has only a
  single major and
  is, therefore, associated with a single
  department. (See Figure 4.32).
Fig. 4.32      The seventh Tiny College ERD
               segment




            DEPATMENT
                                                    STUDENT
   PK       DEPT_CODE            has
                                              PK    STUD_NUM
            DEPT_NAME
                                              FK1   DEPT_CODE
                                                    STUD_LNAME
                                                    STUD_FNAME
                                                    STUD_INITIAL
                                                    STUD_EMAIL
 However in Tiny College environment it
  is possible-at least for a while- student
  not to declare a major field of study.
  Such a student would not be associated
  with a department; therefore,
  DEPARTMENT is optional to
  STUDENT.
 It is worth repeating that the
  relationships between entities and the
  entities themselves reflect the
  organization’s operating environment.
  That is the business rules define the
9. Each student has an advisor in his or
  her department; each advisor counsels
  several students. An advisor is also a
  professor, but not all professors advise
  students.

 Therefore, STUDENT is optional to
  PROFESSORS in the “PROFESSOR
  advises STUDENT” relationship. (See
  Figure 4.33)
Fig. 4.33      The eighth Tiny College ERD
               segment



                                                   STUDENT
            PROFESSOR
                                             PK    STUD_NUM
   PK       PROF_NUM           advises
                                             FK1   PROF_NAME
            DEPT_CODE
                                                   STUD_LNAME
            PROF_SPECIALTY
                                                   STUD_FNAME
            PROF_RANK
                                                   STUD_INITIAL
            PROF_LNAME
                                                   STUD_EMAIL
            PROF_FNAME
            PROF_INITIAL
            PROF_EMAIL
10. As you can see in Figure 4.34, the
 CLASS entity contains ROOM_CODE
 attribute. Given the naming conventions,
 it is clear that ROOM_CODE is an FK to
 another entity.

 Clearly, because a class is taught in a
  room, it is reasonable to assume that
  the ROOM_CODE in CLASS is the FK
  to an entity named ROOM.
Fig. 4.34    The ninth Tiny College ERD
                     segment




     BUILDING                          ROOM                            CLASS
                     contains                     Is used for
PK   BLDG_CODE                  PK    ROOM_CODE                 PK    CLASS_CODE

     BLDG_NAME                  FK1   BLDG_CODE                 FK1   ROOM_CODE
     BLDG_LOCATION                    ROOM_TYPE                       CLASS_TIME
 In turn, each room is located in a
  building. So the last Tiny College ERD
  is created by observing that a
  BUILDING can contain many ROOMS,
  but each ROOM is found in a single
  BUILDING.

 In this ERD segment, it is clear that
  some buildings do not contain (class)
  room. For example, a storage building
  might not any named room at all.
Using the preceding summary, you can
 identify the following entities:
SCHOOL          COURSE
DEPARTMENT            CLASS
PROFESSOR STUDENT
BUILDING              ROOM
ENROLL (the associative entity between
 STUDENT and CLASS)
 Once you have discovered the relevant
  entities, you can define the initial set of
  relationships among them. Next, you
  describe the entity attributes.

 Identifying the attributes of the entities
  helps you to better understand the
  relationships among entities. Table 4.4
  summarizes the ERM’s components,
  and names the entities and your
  relations.
Table.
                     Components of the ERM
       4.4
ENTITY                   RELATIONSHIP             CONNECTIVITY             ENTITY
SCHOOL                   operates                 1:M                      DEPARTMENT
DEPARTMENT               has                      1:M                      STUDENT
DEPARTMENT               employs                  1:M                      PROFESSOR
DEPARTMENT               offers                   1:M                      COURSE
COURSE                   generates                1:M                      CLASS
PROFESSOR                is dean of               1:1                      SCHOOL
PROFESSOR                chairs                   1:1                      DEPARTMENT
PROFESSOR                teaches                  1:M                      CLASS
PROFESSOR                advices                  1:M                      STUDENT
STUDENT                  enrolls in               M:N                      CLASS
BUILDING                 contains                 1:M                      ROOM
ROOM                     is used for              1:M                      CLASS
NOTE: ENROLL is the composite entity that implements the M:N relationships enrolls in CLASS.”
 You must also define the connectivity
  and the cardinality for the just-
  discovered relations based on the
  business rules.

 However, to void the crowding the
  diagram, the cardinalities are not
  shown. Figure 3.35 shows the Crow’s
  Foot ERD for Tiny College. Note that
  this is an implementation model.
  Therefore it shows the ENROLL
  composite entity.
 Figure 4.36 shows the conceptual UML
  class diagram for Tiny College. Note
  that this class diagram depicts the M:N
  relationship between STUDENT and
  CLASS.

 Figure 4.37 shows the implementation-
  ready UML class diagram for Tiny
  College ( note that the ENROLL
  composite entity is shown in this class
  diagram)
THAT’S ALL FOLKS!

          Prepared by:
    JEAN CLYDEE F. LACHICA
       HARRY OCHINANG
        JEDAN TIPURA

Weitere ähnliche Inhalte

Was ist angesagt?

VTU final year project report Main
VTU final year project report MainVTU final year project report Main
VTU final year project report Mainathiathi3
 
Scd type2 through informatica
Scd type2 through informatica Scd type2 through informatica
Scd type2 through informatica Varun Hr
 
Oracle Fusion Role Mappings
Oracle Fusion Role MappingsOracle Fusion Role Mappings
Oracle Fusion Role MappingsFeras Ahmad
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Jismy .K.Jose
 
Leave Management System: Software Requirements Specification Document(SRS)
Leave Management System: Software Requirements Specification Document(SRS) Leave Management System: Software Requirements Specification Document(SRS)
Leave Management System: Software Requirements Specification Document(SRS) Abhilasha Lahigude
 
Leave management system
Leave management systemLeave management system
Leave management systemHemal Joshi
 
College management presentation using Oracle 10G
College management presentation using Oracle 10GCollege management presentation using Oracle 10G
College management presentation using Oracle 10GAIUB
 
Normalization
NormalizationNormalization
Normalizationochesing
 
Super Shop Management System
Super Shop Management SystemSuper Shop Management System
Super Shop Management SystemSohel Sarker
 
Online Library Management
Online Library ManagementOnline Library Management
Online Library ManagementVarsha Sarkar
 
Database normalization
Database normalizationDatabase normalization
Database normalizationJignesh Jain
 
408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docx408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docxsanthoshyadav23
 
Final major project presentation on (10 april2016) aits haldwani
Final major project  presentation on (10 april2016) aits haldwaniFinal major project  presentation on (10 april2016) aits haldwani
Final major project presentation on (10 april2016) aits haldwaniVijay Singh Khatri
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingNilesh Bhaskarrao Bahadure
 
Project Proposal of an Employee Management System
Project Proposal of an Employee Management SystemProject Proposal of an Employee Management System
Project Proposal of an Employee Management SystemNurFathihaTahiatSeeu
 

Was ist angesagt? (20)

VTU final year project report Main
VTU final year project report MainVTU final year project report Main
VTU final year project report Main
 
Scd type2 through informatica
Scd type2 through informatica Scd type2 through informatica
Scd type2 through informatica
 
DATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEMDATABASE MANAGEMENT SYSTEM
DATABASE MANAGEMENT SYSTEM
 
Oracle Fusion Role Mappings
Oracle Fusion Role MappingsOracle Fusion Role Mappings
Oracle Fusion Role Mappings
 
Erd examples
Erd examplesErd examples
Erd examples
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
 
FINAL YEAR PROJECT DOCUMENTATION
FINAL YEAR PROJECT DOCUMENTATIONFINAL YEAR PROJECT DOCUMENTATION
FINAL YEAR PROJECT DOCUMENTATION
 
Leave Management System: Software Requirements Specification Document(SRS)
Leave Management System: Software Requirements Specification Document(SRS) Leave Management System: Software Requirements Specification Document(SRS)
Leave Management System: Software Requirements Specification Document(SRS)
 
Leave management system
Leave management systemLeave management system
Leave management system
 
College management presentation using Oracle 10G
College management presentation using Oracle 10GCollege management presentation using Oracle 10G
College management presentation using Oracle 10G
 
Normalization
NormalizationNormalization
Normalization
 
Super Shop Management System
Super Shop Management SystemSuper Shop Management System
Super Shop Management System
 
Payroll management system boo
Payroll management system booPayroll management system boo
Payroll management system boo
 
Online Library Management
Online Library ManagementOnline Library Management
Online Library Management
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docx408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docx
 
Final major project presentation on (10 april2016) aits haldwani
Final major project  presentation on (10 april2016) aits haldwaniFinal major project  presentation on (10 april2016) aits haldwani
Final major project presentation on (10 april2016) aits haldwani
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programming
 
Students report card for C++ project..
Students report card for C++ project..Students report card for C++ project..
Students report card for C++ project..
 
Project Proposal of an Employee Management System
Project Proposal of an Employee Management SystemProject Proposal of an Employee Management System
Project Proposal of an Employee Management System
 

Andere mochten auch

05 si(systems analysis and design )
05 si(systems analysis and design )05 si(systems analysis and design )
05 si(systems analysis and design )Nurdin Al-Azies
 
Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwalanerudhbalaji
 
Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Shriya agrawal
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramSiti Ismail
 
Software Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and TableSoftware Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and TableNishu Rastogi
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramRakhi Mukherji
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentationSopov Chan
 
Database Normalization
Database NormalizationDatabase Normalization
Database NormalizationRathan Raj
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Mudasir Qazi
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization emailharmeet
 
Important java programs(collection+file)
Important java programs(collection+file)Important java programs(collection+file)
Important java programs(collection+file)Alok Kumar
 

Andere mochten auch (20)

Normalization
NormalizationNormalization
Normalization
 
05 si(systems analysis and design )
05 si(systems analysis and design )05 si(systems analysis and design )
05 si(systems analysis and design )
 
Normalization.riz
Normalization.rizNormalization.riz
Normalization.riz
 
Erd optionality
Erd optionalityErd optionality
Erd optionality
 
Lecture8 Normalization Aggarwal
Lecture8 Normalization AggarwalLecture8 Normalization Aggarwal
Lecture8 Normalization Aggarwal
 
Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf Normalization 1 nf,2nf,3nf,bcnf
Normalization 1 nf,2nf,3nf,bcnf
 
Erd
ErdErd
Erd
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Software Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and TableSoftware Engineering- ERD DFD Decision Tree and Table
Software Engineering- ERD DFD Decision Tree and Table
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Entity Relationship Diagram presentation
Entity Relationship Diagram presentationEntity Relationship Diagram presentation
Entity Relationship Diagram presentation
 
Mest 1 guidance
Mest 1 guidanceMest 1 guidance
Mest 1 guidance
 
Database Normalization
Database NormalizationDatabase Normalization
Database Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)Database - Entity Relationship Diagram (ERD)
Database - Entity Relationship Diagram (ERD)
 
DBMS - Normalization
DBMS - NormalizationDBMS - Normalization
DBMS - Normalization
 
Databases: Normalisation
Databases: NormalisationDatabases: Normalisation
Databases: Normalisation
 
Lecture 04 normalization
Lecture 04 normalization Lecture 04 normalization
Lecture 04 normalization
 
Important java programs(collection+file)
Important java programs(collection+file)Important java programs(collection+file)
Important java programs(collection+file)
 

Ähnlich wie Developing an ER Diagram (ERD) Step-by-Step

Ähnlich wie Developing an ER Diagram (ERD) Step-by-Step (20)

Example for ER diagram part11
Example for ER diagram part11Example for ER diagram part11
Example for ER diagram part11
 
information and communication technology-core.pdf
information and communication technology-core.pdfinformation and communication technology-core.pdf
information and communication technology-core.pdf
 
LDM SESSION 2
LDM SESSION 2LDM SESSION 2
LDM SESSION 2
 
Elective-ICT.pdf
Elective-ICT.pdfElective-ICT.pdf
Elective-ICT.pdf
 
2 Martin Taylor - Outlook Web App
2 Martin Taylor - Outlook Web App2 Martin Taylor - Outlook Web App
2 Martin Taylor - Outlook Web App
 
LDM2_MatiaoNHS_2020-2021_DEAÑO, FRED RYAN.pptx
LDM2_MatiaoNHS_2020-2021_DEAÑO, FRED RYAN.pptxLDM2_MatiaoNHS_2020-2021_DEAÑO, FRED RYAN.pptx
LDM2_MatiaoNHS_2020-2021_DEAÑO, FRED RYAN.pptx
 
MODULE 3A & 3B.pptx
MODULE 3A & 3B.pptxMODULE 3A & 3B.pptx
MODULE 3A & 3B.pptx
 
EAPP Quarter 1 – Module 3 Thesis Statement.pdf
EAPP Quarter 1 – Module 3 Thesis Statement.pdfEAPP Quarter 1 – Module 3 Thesis Statement.pdf
EAPP Quarter 1 – Module 3 Thesis Statement.pdf
 
Educational english modules
Educational english modulesEducational english modules
Educational english modules
 
John Biggs And Catherine Tang 2008
John Biggs And Catherine Tang 2008John Biggs And Catherine Tang 2008
John Biggs And Catherine Tang 2008
 
Blooms taxonomy.pdf
Blooms taxonomy.pdfBlooms taxonomy.pdf
Blooms taxonomy.pdf
 
Revising Module Specifications: A Guidance Booklet
Revising Module Specifications: A Guidance BookletRevising Module Specifications: A Guidance Booklet
Revising Module Specifications: A Guidance Booklet
 
M11GM-Q1Module4.pdf
M11GM-Q1Module4.pdfM11GM-Q1Module4.pdf
M11GM-Q1Module4.pdf
 
M11GM-Q1Module4.pdf
M11GM-Q1Module4.pdfM11GM-Q1Module4.pdf
M11GM-Q1Module4.pdf
 
M11GM-Q1Module4.pdf
M11GM-Q1Module4.pdfM11GM-Q1Module4.pdf
M11GM-Q1Module4.pdf
 
Class material week 10
Class material week 10Class material week 10
Class material week 10
 
M11GM-Q1Module1.pdf
M11GM-Q1Module1.pdfM11GM-Q1Module1.pdf
M11GM-Q1Module1.pdf
 
M11GM-Q1Module1.pdf
M11GM-Q1Module1.pdfM11GM-Q1Module1.pdf
M11GM-Q1Module1.pdf
 
EDU 602 help A Guide to career/Snaptutorial
EDU 602 help A Guide to career/SnaptutorialEDU 602 help A Guide to career/Snaptutorial
EDU 602 help A Guide to career/Snaptutorial
 
Trts
TrtsTrts
Trts
 

Mehr von Janecatalla

My presentation-for-infolit-workshop1
My presentation-for-infolit-workshop1My presentation-for-infolit-workshop1
My presentation-for-infolit-workshop1Janecatalla
 
Relationships within the relational database
Relationships within the relational databaseRelationships within the relational database
Relationships within the relational databaseJanecatalla
 
Object oriented database model
Object oriented database modelObject oriented database model
Object oriented database modelJanecatalla
 
Permuted Title Index
Permuted Title IndexPermuted Title Index
Permuted Title IndexJanecatalla
 
Readers advisory services final
Readers advisory services finalReaders advisory services final
Readers advisory services finalJanecatalla
 
Term paper counseling
Term paper counselingTerm paper counseling
Term paper counselingJanecatalla
 

Mehr von Janecatalla (20)

Bedlibrary4
Bedlibrary4Bedlibrary4
Bedlibrary4
 
Bedlibrary6
Bedlibrary6Bedlibrary6
Bedlibrary6
 
Bedlibrary5
Bedlibrary5Bedlibrary5
Bedlibrary5
 
Bedlibrary4
Bedlibrary4Bedlibrary4
Bedlibrary4
 
Bedlibrary3
Bedlibrary3Bedlibrary3
Bedlibrary3
 
Bedlibrary2
Bedlibrary2Bedlibrary2
Bedlibrary2
 
Bedlibrary
BedlibraryBedlibrary
Bedlibrary
 
My presentation-for-infolit-workshop1
My presentation-for-infolit-workshop1My presentation-for-infolit-workshop1
My presentation-for-infolit-workshop1
 
Pp lis
Pp  lisPp  lis
Pp lis
 
Relationships within the relational database
Relationships within the relational databaseRelationships within the relational database
Relationships within the relational database
 
Object oriented database model
Object oriented database modelObject oriented database model
Object oriented database model
 
Jane catalla
Jane catallaJane catalla
Jane catalla
 
Catalla & cea
Catalla & ceaCatalla & cea
Catalla & cea
 
Dbms
DbmsDbms
Dbms
 
Indexing report
Indexing reportIndexing report
Indexing report
 
Permuted Title Index
Permuted Title IndexPermuted Title Index
Permuted Title Index
 
Indexing report
Indexing reportIndexing report
Indexing report
 
Jane iii
Jane iiiJane iii
Jane iii
 
Readers advisory services final
Readers advisory services finalReaders advisory services final
Readers advisory services final
 
Term paper counseling
Term paper counselingTerm paper counseling
Term paper counseling
 

Kürzlich hochgeladen

ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEaurabinda banchhor
 

Kürzlich hochgeladen (20)

ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Dust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSEDust Of Snow By Robert Frost Class-X English CBSE
Dust Of Snow By Robert Frost Class-X English CBSE
 

Developing an ER Diagram (ERD) Step-by-Step

  • 1. DEVELOPING AN ER DIAGRAM
  • 2.  The process of database design is an iterative rather than a linear or sequential process.  The verb iterate means “to do again repeatedly.”
  • 3.  An iterate process is, thus, one based on repetition of processes and procedures. Building an ERD usually involves the following: • Create a detailed narrative of the organization’s description of operations. • Identify the business rules based on description of operations.
  • 4. • Identify the main entities an relationships from the business rules. • Develop the initial ERD. • Identify the attributes and the primary keys that adequately describe the entities. • Revise and review the ERD.
  • 5. The interview process yields the following business rules: 1. Tiny College (TC) is divided into several schools : • a school of business • a school of arts and sciences • a school of education • a school of applied sciences
  • 6.  To illustrate the use of the iterative process that ultimately yields a workable ERD, let’s start with an initial interview with the Tiny College Administrators.
  • 7. • Each school is administered by a dean who is a professor. • Each professor can be a dean of only one school, • And a professor is not required to be a dean of any school. Therefore, a 1:1 relationship exist between PROFESSOR AND SCHOOL.
  • 8.  Note that the cardinality can be expressed by writing (1,1) next to the entity PROFESSOR (0,1) next to the entity SCHOOL.
  • 9. 2. Each school comprises several departments. For example the school of business has; • an accounting department • a management/marketing department, • an economics/finance department • a computer information system department.
  • 10.  Note again the cardinality rules: The smallest number of departments operated by a school is one, and the largest number of departments is indeterminate (N).  On the other hand, each department belongs to only single school; thus, the cardinality is expressed by (1,1).
  • 11.  That is the minimum number of schools that department belongs to is one, as is the maximum number.  Figure 4.26 illustrates these two business rules.
  • 12. Fig. 4.26 The first Tiny College ERD segment PROFESSOR SCHOOL is dean of PK PROF_NUM PK SCHOOL_CODE PROF_SPECIALTY FK1 PROF_NUM PROF_RANK SCHOOL_NAME PROF_LNAME PROF_FNAME PROF_INITIAL operates PROF_EMAIL DEPARTMENT PK DEPT_CODE FK1 SCHOOL_CODE DEPT_NAME
  • 13. 3. Each department may offer many courses. For example, the management/marketing department offer courses such as; • Introduction to Management • Principles of Marketing • Production Management The ERD segment for this condition is shown in Figure 4.27.
  • 14. Fig. 4.27 The second Tiny College ERD segment COURSE DEPARTMENT PK CRS_CODE offers PK DEPT_CODE FK1 DEPT_CODE CRS_TITLE SCHOOL_CODE CRS_DESCRIPTION DEPT_NAME CRS_CREDIT
  • 15.  Note that this relationship is based on the way Tiny College operates.  If, for example Tiny College had some departments that were classified as “research only”, those departments would not offer courses; therefore, the COURSE entity would be optional to the DEPARTMENT entity.
  • 16. 4. The relationship between COURSE and CLASS was illustrated in Figure 4.9. Nevertheless, it is worth repeating that a CLASS is a section of a COURSE. That is, a department may offer several sections (classes) of the same database course.
  • 17.  Each of those classes is taught by a professor at a given time in a given place.  In short, a 1:M relationship exist between COURSE and CLASS.  However, because of a course may exist in Tiny College’s course catalog even when it is not offered as a class in a current class schedule.
  • 18.  CLASS is optional to COURSE.  Therefore, the relationship between the COURSE and CLASS looks like Figure 4.28.
  • 19. Fig. 4.28 The third Tiny College ERD segment COURSE CLASS PK CRS_CODE generates PK CLASS_CODE CLASS_SECTION DEPT_CODE CLASS_TIME CRS_TITLE FK1 CLASS_CODE CRS_DESCRIPTION CRS_CREDIT
  • 20. 5. Each department should have one or more professors assigned to it.  One and only one those professors chairs department, and no professor is required to accept the chair position.  Therefore, DEPARTMENT is optional to PROFESSOR in the “chairs” relationship.  Those relationships are summarized in the ER segment shown in Figure4.29.
  • 21. Fig. 4.29 The fourth Tiny College ERD segment PROFESSOR DEPARTMENT employs PK PROF_NUM PK DEPT_CODE FK1 DEPT_CODE chairs FK1 PROF_NUM PROF_SPECIALTY DEPT_NAME PROF_RANK PROF_LNAME PROF_FNAME PROF_INITIAL PROF_EMAIL
  • 22. 6. Each professor may teach up four classes; each class is a section of a course.  A professor may also be on a research contract an teach no class at all.  The ERD segment in Figure 4.30 depicts those conditions.
  • 23. Fig. 4.30 The fifth Tiny College ERD segment PROFESSOR CLASS PK PROF_NUM teaches PK CLASS_CODE PROF_SPECIALTY FK1 PROF_NUM PROF_RANK CLASS_TIME PROF_LNAME PROF_FNAME PROF_INITIAL PROF_EMAIL
  • 24. 7. A student may enroll in several classes but takes each class only once during any given enrollment period.  For example, during the current enrollment period, a student may decide to take five classes- • Statistics • Accounting • English • Database • History
  • 25. -but that student would not enrolled in the same Statistics class five times during the enrollment period!  Each student may enroll in up to six classes, and each class may have up to 35 students, thus creating an M:N relationship between STUDENT and CLASS. Because a class can initially exist (at the start of the enrollment period) even though no students have enrolled in it.
  • 26.  STUDENT is optional to CLASS in the M:N relationship. This M:N relationship must be divided into two 1:M relationships through the use of the ENROLL entity, shown in the ERD segment in Figure 4.31.  But note that the optional symbol is shown next to ENROLL. If a class exist but has no students enrolled in it, that class doesn’t occur in the ENROLL table.
  • 27. Fig. 4.31 The sixth Tiny College ERD segment STUDENT ENROLL CLASS Is written in Is found in PK STUD_NUM PK,FK1 STUD_NUM PK CLASS_CODE PK,FK2 CLASS_CODE STUD_LNAME CLASS_TIME ENROLL _DATE STUD_FNAME (0,35) STUD_INITIAL (0,6) ENROLL GRADE STUD_EMAIL
  • 28.  Note also that the ENROLL entity is weak: it is existence-dependent, and its (composite) PK is composed of PK’s of the STUDENT and CLASS entities. You can add cardinalities (0,6) and (0,35) next to enroll entity to reflect the business rule constraints, as shown in Fig. 4.31. (Vision Professional does not automatically generate such cardinalities, but you can use text box to accomplish that task.)
  • 29. 8. Each department has several (or many) students whose major is offered by that department. • However, each student has only a single major and is, therefore, associated with a single department. (See Figure 4.32).
  • 30. Fig. 4.32 The seventh Tiny College ERD segment DEPATMENT STUDENT PK DEPT_CODE has PK STUD_NUM DEPT_NAME FK1 DEPT_CODE STUD_LNAME STUD_FNAME STUD_INITIAL STUD_EMAIL
  • 31.  However in Tiny College environment it is possible-at least for a while- student not to declare a major field of study. Such a student would not be associated with a department; therefore, DEPARTMENT is optional to STUDENT.  It is worth repeating that the relationships between entities and the entities themselves reflect the organization’s operating environment. That is the business rules define the
  • 32. 9. Each student has an advisor in his or her department; each advisor counsels several students. An advisor is also a professor, but not all professors advise students.  Therefore, STUDENT is optional to PROFESSORS in the “PROFESSOR advises STUDENT” relationship. (See Figure 4.33)
  • 33. Fig. 4.33 The eighth Tiny College ERD segment STUDENT PROFESSOR PK STUD_NUM PK PROF_NUM advises FK1 PROF_NAME DEPT_CODE STUD_LNAME PROF_SPECIALTY STUD_FNAME PROF_RANK STUD_INITIAL PROF_LNAME STUD_EMAIL PROF_FNAME PROF_INITIAL PROF_EMAIL
  • 34. 10. As you can see in Figure 4.34, the CLASS entity contains ROOM_CODE attribute. Given the naming conventions, it is clear that ROOM_CODE is an FK to another entity.  Clearly, because a class is taught in a room, it is reasonable to assume that the ROOM_CODE in CLASS is the FK to an entity named ROOM.
  • 35. Fig. 4.34 The ninth Tiny College ERD segment BUILDING ROOM CLASS contains Is used for PK BLDG_CODE PK ROOM_CODE PK CLASS_CODE BLDG_NAME FK1 BLDG_CODE FK1 ROOM_CODE BLDG_LOCATION ROOM_TYPE CLASS_TIME
  • 36.  In turn, each room is located in a building. So the last Tiny College ERD is created by observing that a BUILDING can contain many ROOMS, but each ROOM is found in a single BUILDING.  In this ERD segment, it is clear that some buildings do not contain (class) room. For example, a storage building might not any named room at all.
  • 37. Using the preceding summary, you can identify the following entities: SCHOOL COURSE DEPARTMENT CLASS PROFESSOR STUDENT BUILDING ROOM ENROLL (the associative entity between STUDENT and CLASS)
  • 38.  Once you have discovered the relevant entities, you can define the initial set of relationships among them. Next, you describe the entity attributes.  Identifying the attributes of the entities helps you to better understand the relationships among entities. Table 4.4 summarizes the ERM’s components, and names the entities and your relations.
  • 39. Table. Components of the ERM 4.4 ENTITY RELATIONSHIP CONNECTIVITY ENTITY SCHOOL operates 1:M DEPARTMENT DEPARTMENT has 1:M STUDENT DEPARTMENT employs 1:M PROFESSOR DEPARTMENT offers 1:M COURSE COURSE generates 1:M CLASS PROFESSOR is dean of 1:1 SCHOOL PROFESSOR chairs 1:1 DEPARTMENT PROFESSOR teaches 1:M CLASS PROFESSOR advices 1:M STUDENT STUDENT enrolls in M:N CLASS BUILDING contains 1:M ROOM ROOM is used for 1:M CLASS NOTE: ENROLL is the composite entity that implements the M:N relationships enrolls in CLASS.”
  • 40.  You must also define the connectivity and the cardinality for the just- discovered relations based on the business rules.  However, to void the crowding the diagram, the cardinalities are not shown. Figure 3.35 shows the Crow’s Foot ERD for Tiny College. Note that this is an implementation model. Therefore it shows the ENROLL composite entity.
  • 41.  Figure 4.36 shows the conceptual UML class diagram for Tiny College. Note that this class diagram depicts the M:N relationship between STUDENT and CLASS.  Figure 4.37 shows the implementation- ready UML class diagram for Tiny College ( note that the ENROLL composite entity is shown in this class diagram)
  • 42. THAT’S ALL FOLKS! Prepared by: JEAN CLYDEE F. LACHICA HARRY OCHINANG JEDAN TIPURA