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?

Exception handling in plsql
Exception handling in plsqlException handling in plsql
Exception handling in plsqlArun Sial
 
Object relational and extended relational databases
Object relational and extended relational databasesObject relational and extended relational databases
Object relational and extended relational databasesSuhad Jihad
 
Characteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-abilityCharacteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-abilityMeghaj Mallick
 
Enhanced E-R diagram
Enhanced E-R diagramEnhanced E-R diagram
Enhanced E-R diagramMayank Jain
 
Restaurant Management System Database Project (Oracle)
Restaurant Management System Database Project (Oracle)Restaurant Management System Database Project (Oracle)
Restaurant Management System Database Project (Oracle)Md. Shafaat Jamil Rokon
 
Computer fundamentals tutorial
Computer fundamentals tutorialComputer fundamentals tutorial
Computer fundamentals tutorialEdress Oryakhail
 
SQL Joins.pptx
SQL Joins.pptxSQL Joins.pptx
SQL Joins.pptxAnkit Rai
 
Micro project list dms- 22319
Micro project list dms- 22319Micro project list dms- 22319
Micro project list dms- 22319ARVIND SARDAR
 
Documentation project of college management [1]
Documentation project of college management [1]Documentation project of college management [1]
Documentation project of college management [1]Priyaranjan Verma
 
DBMS 6 | MySQL Practice List - Rank Related Queries
DBMS 6 | MySQL Practice List - Rank Related QueriesDBMS 6 | MySQL Practice List - Rank Related Queries
DBMS 6 | MySQL Practice List - Rank Related QueriesMohammad Imam Hossain
 
18CSL58 DBMS LAB Manual.pdf
18CSL58 DBMS LAB Manual.pdf18CSL58 DBMS LAB Manual.pdf
18CSL58 DBMS LAB Manual.pdfSyed Mustafa
 
8. transactions
8. transactions8. transactions
8. transactionsAmrit Kaur
 

Was ist angesagt? (20)

Sql Functions And Procedures
Sql Functions And ProceduresSql Functions And Procedures
Sql Functions And Procedures
 
Exception handling in plsql
Exception handling in plsqlException handling in plsql
Exception handling in plsql
 
Object relational and extended relational databases
Object relational and extended relational databasesObject relational and extended relational databases
Object relational and extended relational databases
 
Characteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-abilityCharacteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-ability
 
student portal
student portal student portal
student portal
 
Enhanced E-R diagram
Enhanced E-R diagramEnhanced E-R diagram
Enhanced E-R diagram
 
Oracle: Cursors
Oracle: CursorsOracle: Cursors
Oracle: Cursors
 
Restaurant Management System Database Project (Oracle)
Restaurant Management System Database Project (Oracle)Restaurant Management System Database Project (Oracle)
Restaurant Management System Database Project (Oracle)
 
Computer fundamentals tutorial
Computer fundamentals tutorialComputer fundamentals tutorial
Computer fundamentals tutorial
 
SQL Joins.pptx
SQL Joins.pptxSQL Joins.pptx
SQL Joins.pptx
 
Joins And Its Types
Joins And Its TypesJoins And Its Types
Joins And Its Types
 
Micro project list dms- 22319
Micro project list dms- 22319Micro project list dms- 22319
Micro project list dms- 22319
 
Documentation project of college management [1]
Documentation project of college management [1]Documentation project of college management [1]
Documentation project of college management [1]
 
DBMS 6 | MySQL Practice List - Rank Related Queries
DBMS 6 | MySQL Practice List - Rank Related QueriesDBMS 6 | MySQL Practice List - Rank Related Queries
DBMS 6 | MySQL Practice List - Rank Related Queries
 
Joins in SQL
Joins in SQLJoins in SQL
Joins in SQL
 
Views, Triggers, Functions, Stored Procedures, Indexing and Joins
Views, Triggers, Functions, Stored Procedures,  Indexing and JoinsViews, Triggers, Functions, Stored Procedures,  Indexing and Joins
Views, Triggers, Functions, Stored Procedures, Indexing and Joins
 
18CSL58 DBMS LAB Manual.pdf
18CSL58 DBMS LAB Manual.pdf18CSL58 DBMS LAB Manual.pdf
18CSL58 DBMS LAB Manual.pdf
 
ER Model in DBMS
ER Model in DBMSER Model in DBMS
ER Model in DBMS
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
8. transactions
8. transactions8. transactions
8. transactions
 

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
 
Normalization
NormalizationNormalization
Normalizationochesing
 
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
 

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
 
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
 

Ä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

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Kürzlich hochgeladen (20)

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

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