SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3



                         Systems Analysis and Design
                          Learning Module Series #5
                                        Document version
    Creating an Elementary Entity Relationship Diagram
Overview
In this tutorial we will create an Entity Relationship Diagram (ERD) that contains two entities and
we will customize these entities into a One-to-Many relationship.

       We will:

           •   Initialize a new diagram
           •   Create an Entity Relationship Diagram (ERD) that contains two entities
           •   Customize the fields/columns of these entities and assign primary keys
           •   Adjust the diagram symbols (such as the crows foot symbol)
           •   Link the entities together, and
           •   Decipher the symbols, the semantics of the created ERD


Initializing a new diagram in MS Visio 2007 
                                                                                                        
1. From the Menu Bar, click File… New… Software and Database… Database Model Diagram (US
   units) from the cascading drop down menus.




                                                        1
Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3


Creating two related entities 
                                                                                                          
From the Shapes pane, drag the Entity shape over to the workspace grid.

2. Under Database Properties, click Definition and type: Course in the “Physical name” text box field.




Customize fields and assign Primary Keys

3. Under Database Properties, under Categories, click on Columns and under the “Physical Name column”,
   enter the following attributes: course_ID, course_title, credits, and grading_method.




                                                      2
Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3


4. Locate the row for attribute course_ID and check the box under “PK” to designate this attribute as the
   Primary key. (Notice how the entity Course places the “PK course_ID” above the line.)




5. Repeat steps 3 through 5 for the second entity: Course_Sections. Its column names should be:
   section_ID, course_ID, location, employee_ID, and day_of_week.

   Additionally, section_ID should be designated as the Primary Key.




                                                     3
Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3


Adjusting the diagram symbols 
                                                                                                                       
     Before we create a relationship between these 2 tables, we will need to set the display format options for the
     connector symbols.

6. From the Menu Bar, click on Database and select Options… Document from the cascading drop down
   menu.




7.     The Database Document Options dialog box displays. Under the Relationship tab, check both the
       Relationships and Crow’s feet check boxes. Click OK.




                                                          4
Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3


Creating the relationship 
                                                                                                               
8. From the Shapes pane, drag the Relationship shape and drop it on top of the Course entity. The Course
   entity will appear in Visio with a red box as shown below.




9. The reason we dropped the Relationship shape onto the Course entity, is because the Course entity is the
   Parent entity in the relationship. Since courses and sections share a One-to-Many relationship, we can
   view their relationship as Parent-Child. A course (parent) can have many sections (child-ren) associated
   with it, but a section can only exist if there is a course to which it is associated.




Linking the entities together
                                                                                                               
10. Drag the unattached end of the relationship shape (green box end) over to the Course_Section entity.



                                                     5
Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3




11. After the relationship shape is dropped it will display the red end-boxes (indicated by the blue arrow
    below. Click anywhere on the grid to have it appear as shown by the red arrow.




Deciphering the Symbols 
                                                                                                                   
      Notice the symbols at each end of the relationship join. There are four symbols on a dotted line.
      The One-to-Many relationship between Course and Course_Section is represented by a “1” designated
      to the end of the dotted line that connects to the Course (Parent) entity – see item 1 below; and a
      “crows foot” symbol designated to the end of the dotted line that connects to the Course_Section
      (Child) entity – see item 4 below. These two symbols reflect the maximum cardinality of the
      relationship. The “O” symbol shown below in items 2 and 3, are the defaults that Visio supplies. These
      reflect the minimum cardinality of the relationship, the “O” representing an Optional relationship.

      Since we know that a course may or not have a section associated with it, the default “Optional”
      minimum cardinality remains true for the Course entity. Therefore ‘reading’ the symbolism from the
      perspective of Course: (Left to Right) A course may have as few as zero sections associated with it (item
      3 below), or as many as numerous (item 4 below).




                                                      6
Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3




       We know that any given section can belong only to one course. Therefore ‘reading’ the symbolism from
       the perspective of Course_Section: (Right to Left), sections have a maximum cardinality of one (item 1
       above). However, we also know that a course section cannot exist without an associated course. To put
       this differently, if a section of a course exists, then that course must exist. So for any course section, at
       least one instance of the course must exist, even if a maximum of one course exists for that section. In
       this case then, the default symbol supplied by Visio (item 2 above) is inaccurate and must be changed
       from an optional “O”, to a mandatory “1”. In this next step then, we will make this change.

12.   Click on the Relationship shape to highlight it. Under Database Properties… Categories, click on the
      Miscellaneous category and select the Identifying radio button under “Relationship Type”.

       Notice how the Parent-to-child relationship now reflects “1-0 or more” and the symbol (circled below
       in purple) has changed from optional, to accurately reflect a minimum cardinality of mandatory “1”.




13. In many schools, course-sections are cross-listed to two or more courses listed in different departments.
    We will need therefore an additional adjustment.

                                                         7
Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3


    Click on the Course_Section entity to highlight it. Under Database Properties… Categories, click on the
    Columns category to display the entity attributes. Locate the row that has the “Physical Name”:
    course_ID and uncheck the PK check box. Notice how course_ID now becomes a Foreign Key (FK).




14. If we think about it though, a course cannot really exist without it ever being offered! Therefore,
    even if it should have many sections associated to it, at least one of those sections must be offered.
    The minimum cardinality of a course to a course_section then, is really “1”.

     Click on the Relationship shape to highlight it. Under Database Properties… Categories, click on the
     Miscellaneous category and select the One or more radio button under “Cardinality”. Notice the “O”
     symbol has now changed to a “1”, indicating the mandatory minimum.




                                                       8
Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3




                                This Completes

                  Systems Analysis and Design
                   Learning Module Series #5
                               Document version

Creating an Elementary Entity Relationship Diagram




                                              9

Más contenido relacionado

La actualidad más candente

02 sm3 xml_xp_03
02 sm3 xml_xp_0302 sm3 xml_xp_03
02 sm3 xml_xp_03Niit Care
 
ECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxmiftah88
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship modelJafar Nesargi
 
5. Other Relational Languages in DBMS
5. Other Relational Languages in DBMS5. Other Relational Languages in DBMS
5. Other Relational Languages in DBMSkoolkampus
 
02 sm3 xml_xp_04
02 sm3 xml_xp_0402 sm3 xml_xp_04
02 sm3 xml_xp_04Niit Care
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Typesaakanksha s
 
04 sm3 xml_xp_07
04 sm3 xml_xp_0704 sm3 xml_xp_07
04 sm3 xml_xp_07Niit Care
 
Database Management System
Database Management System Database Management System
Database Management System FellowBuddy.com
 
3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMSkoolkampus
 
03 sm3 xml_xp_05
03 sm3 xml_xp_0503 sm3 xml_xp_05
03 sm3 xml_xp_05Niit Care
 
The relational data model part[1]
The relational data model part[1]The relational data model part[1]
The relational data model part[1]Bashir Rezaie
 
03 sm3 xml_xp_06
03 sm3 xml_xp_0603 sm3 xml_xp_06
03 sm3 xml_xp_06Niit Care
 

La actualidad más candente (20)

ch14
ch14ch14
ch14
 
02 sm3 xml_xp_03
02 sm3 xml_xp_0302 sm3 xml_xp_03
02 sm3 xml_xp_03
 
Dbms ER Model
Dbms ER ModelDbms ER Model
Dbms ER Model
 
ECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptxECEG 4702-Class7-Entity-Relationship modeling.pptx
ECEG 4702-Class7-Entity-Relationship modeling.pptx
 
Data modeling using the entity relationship model
Data modeling using the entity relationship modelData modeling using the entity relationship model
Data modeling using the entity relationship model
 
5. Other Relational Languages in DBMS
5. Other Relational Languages in DBMS5. Other Relational Languages in DBMS
5. Other Relational Languages in DBMS
 
02 sm3 xml_xp_04
02 sm3 xml_xp_0402 sm3 xml_xp_04
02 sm3 xml_xp_04
 
Database design
Database designDatabase design
Database design
 
Database Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity TypesDatabase Modeling Using Entity.. Weak And Strong Entity Types
Database Modeling Using Entity.. Weak And Strong Entity Types
 
EER Model
EER ModelEER Model
EER Model
 
Object oriented data model
Object oriented data modelObject oriented data model
Object oriented data model
 
04 sm3 xml_xp_07
04 sm3 xml_xp_0704 sm3 xml_xp_07
04 sm3 xml_xp_07
 
Chapt 1 odbms
Chapt 1 odbmsChapt 1 odbms
Chapt 1 odbms
 
Database Management System
Database Management System Database Management System
Database Management System
 
3. Relational Models in DBMS
3. Relational Models in DBMS3. Relational Models in DBMS
3. Relational Models in DBMS
 
03 sm3 xml_xp_05
03 sm3 xml_xp_0503 sm3 xml_xp_05
03 sm3 xml_xp_05
 
The relational data model part[1]
The relational data model part[1]The relational data model part[1]
The relational data model part[1]
 
03 sm3 xml_xp_06
03 sm3 xml_xp_0603 sm3 xml_xp_06
03 sm3 xml_xp_06
 
Ooad ch 4
Ooad ch 4Ooad ch 4
Ooad ch 4
 
Ooad ch 3
Ooad ch 3Ooad ch 3
Ooad ch 3
 

Similar a S5 elementary erd pdf

S1 relational database pdf
S1 relational database pdfS1 relational database pdf
S1 relational database pdfaviy1966
 
Database Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docxDatabase Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docxtheodorelove43763
 
S2 intersection table pdf
S2  intersection table pdfS2  intersection table pdf
S2 intersection table pdfaviy1966
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship ModellingBhandari Nawaraj
 
Introductin to Data Modeling.
Introductin to Data Modeling.Introductin to Data Modeling.
Introductin to Data Modeling.Cloudbells.com
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramSiti Ismail
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Maniguest1e0229a
 
Analyzing and Visualizing Data Chapter 6Data Represent.docx
Analyzing and Visualizing Data Chapter 6Data Represent.docxAnalyzing and Visualizing Data Chapter 6Data Represent.docx
Analyzing and Visualizing Data Chapter 6Data Represent.docxdurantheseldine
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization TechniquesNishant Munjal
 
Logical ERD 2022.pptx
Logical ERD  2022.pptxLogical ERD  2022.pptx
Logical ERD 2022.pptxJeff Jacobs
 
OOAD with UML (Interaction Diagramming)
OOAD with UML (Interaction Diagramming)OOAD with UML (Interaction Diagramming)
OOAD with UML (Interaction Diagramming)jsm1979
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...Mustafa Kamel Mohammadi
 
So Far (Schematically) yet So Near (Semantically)
So Far (Schematically) yet So Near (Semantically)So Far (Schematically) yet So Near (Semantically)
So Far (Schematically) yet So Near (Semantically)Amit Sheth
 
Tutorial - how to create a wheel view
Tutorial - how to create a wheel viewTutorial - how to create a wheel view
Tutorial - how to create a wheel viewMichael Warner
 
Contextual Ontology Alignment - ESWC 2011
Contextual Ontology Alignment - ESWC 2011Contextual Ontology Alignment - ESWC 2011
Contextual Ontology Alignment - ESWC 2011Mariana Damova, Ph.D
 

Similar a S5 elementary erd pdf (20)

S1 relational database pdf
S1 relational database pdfS1 relational database pdf
S1 relational database pdf
 
Database Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docxDatabase Systems Design, Implementation, and Manageme.docx
Database Systems Design, Implementation, and Manageme.docx
 
S2 intersection table pdf
S2  intersection table pdfS2  intersection table pdf
S2 intersection table pdf
 
Entity Relationship Modelling
Entity Relationship ModellingEntity Relationship Modelling
Entity Relationship Modelling
 
Introductin to Data Modeling.
Introductin to Data Modeling.Introductin to Data Modeling.
Introductin to Data Modeling.
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
L7 er2
L7 er2L7 er2
L7 er2
 
Er Model Nandha&Mani
Er Model Nandha&ManiEr Model Nandha&Mani
Er Model Nandha&Mani
 
Er Modeling
Er ModelingEr Modeling
Er Modeling
 
Unit 3 final.pptx
Unit 3 final.pptxUnit 3 final.pptx
Unit 3 final.pptx
 
Unit 2 DBMS
Unit 2 DBMSUnit 2 DBMS
Unit 2 DBMS
 
Analyzing and Visualizing Data Chapter 6Data Represent.docx
Analyzing and Visualizing Data Chapter 6Data Represent.docxAnalyzing and Visualizing Data Chapter 6Data Represent.docx
Analyzing and Visualizing Data Chapter 6Data Represent.docx
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization Techniques
 
Logical ERD 2022.pptx
Logical ERD  2022.pptxLogical ERD  2022.pptx
Logical ERD 2022.pptx
 
OOAD with UML (Interaction Diagramming)
OOAD with UML (Interaction Diagramming)OOAD with UML (Interaction Diagramming)
OOAD with UML (Interaction Diagramming)
 
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...Fundamentals of database system  - Data Modeling Using the Entity-Relationshi...
Fundamentals of database system - Data Modeling Using the Entity-Relationshi...
 
So Far (Schematically) yet So Near (Semantically)
So Far (Schematically) yet So Near (Semantically)So Far (Schematically) yet So Near (Semantically)
So Far (Schematically) yet So Near (Semantically)
 
Datamodelling
DatamodellingDatamodelling
Datamodelling
 
Tutorial - how to create a wheel view
Tutorial - how to create a wheel viewTutorial - how to create a wheel view
Tutorial - how to create a wheel view
 
Contextual Ontology Alignment - ESWC 2011
Contextual Ontology Alignment - ESWC 2011Contextual Ontology Alignment - ESWC 2011
Contextual Ontology Alignment - ESWC 2011
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

S5 elementary erd pdf

  • 1. Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3 Systems Analysis and Design Learning Module Series #5 Document version Creating an Elementary Entity Relationship Diagram Overview In this tutorial we will create an Entity Relationship Diagram (ERD) that contains two entities and we will customize these entities into a One-to-Many relationship. We will: • Initialize a new diagram • Create an Entity Relationship Diagram (ERD) that contains two entities • Customize the fields/columns of these entities and assign primary keys • Adjust the diagram symbols (such as the crows foot symbol) • Link the entities together, and • Decipher the symbols, the semantics of the created ERD Initializing a new diagram in MS Visio 2007    1. From the Menu Bar, click File… New… Software and Database… Database Model Diagram (US units) from the cascading drop down menus. 1
  • 2. Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3 Creating two related entities    From the Shapes pane, drag the Entity shape over to the workspace grid. 2. Under Database Properties, click Definition and type: Course in the “Physical name” text box field. Customize fields and assign Primary Keys 3. Under Database Properties, under Categories, click on Columns and under the “Physical Name column”, enter the following attributes: course_ID, course_title, credits, and grading_method. 2
  • 3. Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3 4. Locate the row for attribute course_ID and check the box under “PK” to designate this attribute as the Primary key. (Notice how the entity Course places the “PK course_ID” above the line.) 5. Repeat steps 3 through 5 for the second entity: Course_Sections. Its column names should be: section_ID, course_ID, location, employee_ID, and day_of_week. Additionally, section_ID should be designated as the Primary Key. 3
  • 4. Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3 Adjusting the diagram symbols    Before we create a relationship between these 2 tables, we will need to set the display format options for the connector symbols. 6. From the Menu Bar, click on Database and select Options… Document from the cascading drop down menu. 7. The Database Document Options dialog box displays. Under the Relationship tab, check both the Relationships and Crow’s feet check boxes. Click OK. 4
  • 5. Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3 Creating the relationship    8. From the Shapes pane, drag the Relationship shape and drop it on top of the Course entity. The Course entity will appear in Visio with a red box as shown below. 9. The reason we dropped the Relationship shape onto the Course entity, is because the Course entity is the Parent entity in the relationship. Since courses and sections share a One-to-Many relationship, we can view their relationship as Parent-Child. A course (parent) can have many sections (child-ren) associated with it, but a section can only exist if there is a course to which it is associated. Linking the entities together   10. Drag the unattached end of the relationship shape (green box end) over to the Course_Section entity. 5
  • 6. Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3 11. After the relationship shape is dropped it will display the red end-boxes (indicated by the blue arrow below. Click anywhere on the grid to have it appear as shown by the red arrow. Deciphering the Symbols    Notice the symbols at each end of the relationship join. There are four symbols on a dotted line. The One-to-Many relationship between Course and Course_Section is represented by a “1” designated to the end of the dotted line that connects to the Course (Parent) entity – see item 1 below; and a “crows foot” symbol designated to the end of the dotted line that connects to the Course_Section (Child) entity – see item 4 below. These two symbols reflect the maximum cardinality of the relationship. The “O” symbol shown below in items 2 and 3, are the defaults that Visio supplies. These reflect the minimum cardinality of the relationship, the “O” representing an Optional relationship. Since we know that a course may or not have a section associated with it, the default “Optional” minimum cardinality remains true for the Course entity. Therefore ‘reading’ the symbolism from the perspective of Course: (Left to Right) A course may have as few as zero sections associated with it (item 3 below), or as many as numerous (item 4 below). 6
  • 7. Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3 We know that any given section can belong only to one course. Therefore ‘reading’ the symbolism from the perspective of Course_Section: (Right to Left), sections have a maximum cardinality of one (item 1 above). However, we also know that a course section cannot exist without an associated course. To put this differently, if a section of a course exists, then that course must exist. So for any course section, at least one instance of the course must exist, even if a maximum of one course exists for that section. In this case then, the default symbol supplied by Visio (item 2 above) is inaccurate and must be changed from an optional “O”, to a mandatory “1”. In this next step then, we will make this change. 12. Click on the Relationship shape to highlight it. Under Database Properties… Categories, click on the Miscellaneous category and select the Identifying radio button under “Relationship Type”. Notice how the Parent-to-child relationship now reflects “1-0 or more” and the symbol (circled below in purple) has changed from optional, to accurately reflect a minimum cardinality of mandatory “1”. 13. In many schools, course-sections are cross-listed to two or more courses listed in different departments. We will need therefore an additional adjustment. 7
  • 8. Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3 Click on the Course_Section entity to highlight it. Under Database Properties… Categories, click on the Columns category to display the entity attributes. Locate the row that has the “Physical Name”: course_ID and uncheck the PK check box. Notice how course_ID now becomes a Foreign Key (FK). 14. If we think about it though, a course cannot really exist without it ever being offered! Therefore, even if it should have many sections associated to it, at least one of those sections must be offered. The minimum cardinality of a course to a course_section then, is really “1”. Click on the Relationship shape to highlight it. Under Database Properties… Categories, click on the Miscellaneous category and select the One or more radio button under “Cardinality”. Notice the “O” symbol has now changed to a “1”, indicating the mandatory minimum. 8
  • 9. Copyright © 2009 Bahn, D., Yardley, A. & Tang, H. All Rights Reserved. ISBN: 978-1-936203-09-3 This Completes Systems Analysis and Design Learning Module Series #5 Document version Creating an Elementary Entity Relationship Diagram 9