SlideShare una empresa de Scribd logo
1 de 4
SOLUTIONJUG.COM

CIS/336 iLab 1 of 7 - SQL Course

CLICK HERE TO GET THE SOLUTION !!!!!!!!




LABOVERVIEW
Scenario/Summary

This lab will introduce you to the processes involved in defining one of the key components of a data
model; the relationship diagram (RD). In this lab, you will draw a relationship diagram for two of the
steps shown. Keep in mind when you are trying to decide which side of the relationship should be
the "one" side and which should be the "many" that you must first decide which side has the
primary key, or unique identifier. Once you have decided the primary key of the relationship, you
have identified the "one" side of the relationship. Note that for an RD, the foreign key "many" side
of the relationship points to the primary key "one" side. The "one" side should have the arrowhead
point of the connecting line. This is different than an entity/relationship diagram (ERD) that we will
draw next week, where the "many" side has crow's feet.

This will familiarize you with how to set up MS Visio to draw database diagrams. Steps 1 - 3 below
use the Customer, Order, and Employee tables of a simplified Order Entry database. The Customer
table records clients who have placed orders. The Order table contains the basic facts about
customer orders. The Employee table contains facts about employees who take orders. The primary
keys of the tables are CustNo for Customer, EmpNo for Employee, and OrdNo for Order.

The following are the TABLE definitions for the first three tables showing the PRIMARY KEY
constraints.
TABLE Customer has the following attributes

CustNo                        NUMBER(5)

CustFirstName              VARCHAR2(20)

CustLastName                VARCHAR2(30)

CustCity                      VARCHAR2(30)

CustState                    CHAR(2)

CustZip                        CHAR(10)

CustBal                        NUMBER(12,2)
CustNo is the               PRIMARY KEY




TABLE Employee has the following attributes

EmpNo                          NUMBER(5)

EmpFirstName                VARCHAR2(20)

EmpLastName                 VARCHAR2(30)

EmpPhone                     CHAR(15)

EmpNo is the                 PRIMARY KEY




TABLE Order has the following attributes

OrdNo                          NUMBER(5)

OrdDate                        DATE

CustNo                         NUMBER(5)

EmpNo                          NUMBER(5)

OrdNo is the                PRIMARY KEY




Your task for this lab is to create the required relationship diagram for steps 1 and 2 using Microsoft
Visio. Step 3 will require you to analyze the scenario given and present your own resolution to the
question. Step 4 is an individual assignment that will introduce you to the group project and the
process of identifying entities and attributes. When finished with the lab, you should have a
complete diagram using all 5 entities, a written explanation for #3, and two lists (entities and
attributes) for Step 4.
Deliverables
The deliverable for this lab is a single MS Word document named "Lab1_solution_yourname" with
the diagram for problems 1 and 2, the written answer for the question in Step 3, and the lists of
entities and attributes for the Initial Project Exercise (Step 4). You should copy and paste the
diagram from MS Visio into a Word document and use this document for Steps 3 and 4.
LABSTEPS



STEP 1: Drawing your first ER diagram Title
Identify the foreign key columns in the table structures above and draw a relationship diagram
depicting the relationships between the tables. In the Order table , the CustNo column references
the Customer table and the EmpNo column references the Employee table. For each relationship,
identify the table on the "1" side of the relationship and the table on the "Many" side.
STEP 2: Extending the ER diagram
Extend your relationship diagram from problem 1 by adding two tables (OrdLine and Product). Table
definitions for the table structures and primary keys constraints are shown below. You will need to
identify the FOREIGN KEY(s) to complete this problem. When finished you should have a total of 5
tables represented in your diagram for this problem. To copy and paste the diagram into Word,
select Edit from the menu and then Copy Diagram. Open a Word document and use CTRL-V to
paste the diagram.
TABLE Product has the following attributes

ProdNo                                    CHAR(8)

ProdName                     VARCHAR2(20)

ProdNo is the                PRIMARY KEY

TABLE OrdLine has the following attributes

OrdNo                          CHAR(8)

ProdNo                                    CHAR(8)

Qty                              NUMBER(5)

The combination of OrdNo and Prodno is the
PRIMARY KEY

STEP 3: Should a NULL be allowed?
From examination of the sample data and your current understanding of businesses in which orders
could be placed either in person, over the phone, or over the Internet, determine if it would be
permissible for null values to be allowed for the foreign key EmpNo in the Order table. This column
would reference back to the EmpNo column in the employee table. Why or why not?
OrdNo               OrdDate            CustNo              EmpNo

O1656777        02/11/2000            C8543321
O7959898       02/19/2000             C8543321            E8544399

STEP 4: Initial Project Exercise
Although the overall project itself will be done as a group, this first exercise is designed as an
individual effort and is intended to; (1) get you to read the project specifications, and; (2) introduce
you to the first step in designing a database from scratch. This little exercise will have you see how
many entities and attributes you can find in the project specifications. In week three, you will work
with your assigned project team and compare notes on what you have found. This is not rocket
science here so remember, you are looking for people, places, things, and events (entities) and the
attributes that describe them.



CLICK HERE TO GET THE SOLUTION !!!!!!!!

Más contenido relacionado

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
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
vu2urc
 

Ú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
 
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
 
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
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Destacado

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destacado (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Cis 336 i lab 1 of 7

  • 1. SOLUTIONJUG.COM CIS/336 iLab 1 of 7 - SQL Course CLICK HERE TO GET THE SOLUTION !!!!!!!! LABOVERVIEW Scenario/Summary This lab will introduce you to the processes involved in defining one of the key components of a data model; the relationship diagram (RD). In this lab, you will draw a relationship diagram for two of the steps shown. Keep in mind when you are trying to decide which side of the relationship should be the "one" side and which should be the "many" that you must first decide which side has the primary key, or unique identifier. Once you have decided the primary key of the relationship, you have identified the "one" side of the relationship. Note that for an RD, the foreign key "many" side of the relationship points to the primary key "one" side. The "one" side should have the arrowhead point of the connecting line. This is different than an entity/relationship diagram (ERD) that we will draw next week, where the "many" side has crow's feet. This will familiarize you with how to set up MS Visio to draw database diagrams. Steps 1 - 3 below use the Customer, Order, and Employee tables of a simplified Order Entry database. The Customer table records clients who have placed orders. The Order table contains the basic facts about customer orders. The Employee table contains facts about employees who take orders. The primary keys of the tables are CustNo for Customer, EmpNo for Employee, and OrdNo for Order. The following are the TABLE definitions for the first three tables showing the PRIMARY KEY constraints. TABLE Customer has the following attributes CustNo NUMBER(5) CustFirstName VARCHAR2(20) CustLastName VARCHAR2(30) CustCity VARCHAR2(30) CustState CHAR(2) CustZip CHAR(10) CustBal NUMBER(12,2)
  • 2. CustNo is the PRIMARY KEY TABLE Employee has the following attributes EmpNo NUMBER(5) EmpFirstName VARCHAR2(20) EmpLastName VARCHAR2(30) EmpPhone CHAR(15) EmpNo is the PRIMARY KEY TABLE Order has the following attributes OrdNo NUMBER(5) OrdDate DATE CustNo NUMBER(5) EmpNo NUMBER(5) OrdNo is the PRIMARY KEY Your task for this lab is to create the required relationship diagram for steps 1 and 2 using Microsoft Visio. Step 3 will require you to analyze the scenario given and present your own resolution to the question. Step 4 is an individual assignment that will introduce you to the group project and the process of identifying entities and attributes. When finished with the lab, you should have a complete diagram using all 5 entities, a written explanation for #3, and two lists (entities and attributes) for Step 4. Deliverables The deliverable for this lab is a single MS Word document named "Lab1_solution_yourname" with the diagram for problems 1 and 2, the written answer for the question in Step 3, and the lists of
  • 3. entities and attributes for the Initial Project Exercise (Step 4). You should copy and paste the diagram from MS Visio into a Word document and use this document for Steps 3 and 4. LABSTEPS STEP 1: Drawing your first ER diagram Title Identify the foreign key columns in the table structures above and draw a relationship diagram depicting the relationships between the tables. In the Order table , the CustNo column references the Customer table and the EmpNo column references the Employee table. For each relationship, identify the table on the "1" side of the relationship and the table on the "Many" side. STEP 2: Extending the ER diagram Extend your relationship diagram from problem 1 by adding two tables (OrdLine and Product). Table definitions for the table structures and primary keys constraints are shown below. You will need to identify the FOREIGN KEY(s) to complete this problem. When finished you should have a total of 5 tables represented in your diagram for this problem. To copy and paste the diagram into Word, select Edit from the menu and then Copy Diagram. Open a Word document and use CTRL-V to paste the diagram. TABLE Product has the following attributes ProdNo CHAR(8) ProdName VARCHAR2(20) ProdNo is the PRIMARY KEY TABLE OrdLine has the following attributes OrdNo CHAR(8) ProdNo CHAR(8) Qty NUMBER(5) The combination of OrdNo and Prodno is the PRIMARY KEY STEP 3: Should a NULL be allowed? From examination of the sample data and your current understanding of businesses in which orders could be placed either in person, over the phone, or over the Internet, determine if it would be permissible for null values to be allowed for the foreign key EmpNo in the Order table. This column would reference back to the EmpNo column in the employee table. Why or why not? OrdNo OrdDate CustNo EmpNo O1656777 02/11/2000 C8543321
  • 4. O7959898 02/19/2000 C8543321 E8544399 STEP 4: Initial Project Exercise Although the overall project itself will be done as a group, this first exercise is designed as an individual effort and is intended to; (1) get you to read the project specifications, and; (2) introduce you to the first step in designing a database from scratch. This little exercise will have you see how many entities and attributes you can find in the project specifications. In week three, you will work with your assigned project team and compare notes on what you have found. This is not rocket science here so remember, you are looking for people, places, things, and events (entities) and the attributes that describe them. CLICK HERE TO GET THE SOLUTION !!!!!!!!