Identify the foreign key columns in the table structures

Assignment Help Database Management System
Reference no: EM13949551

The problems below use the Customer, OrderTbl, and Employee tables of a simplified Order Entry database.  The Customer table records clients who have placed orders. The OrderTbl 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 OrderTbl.

The following is the TABLE definitions for the first three tables showing the PRIMARY KEY constraints. 

TABLE Customer has the following attributes
CustNo            CHAR(8)
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             CHAR(8)
EmpFirstName      VARCHAR2(20)
EmpLastName       VARCHAR2(30)
EmpPhone          CHAR(15)

EmpNo is the PRIMARY KEY

 

TABLE OrderTbl has the following attributes
OrdNo             CHAR(8)
OrdDate           DATE
CustNo            CHAR(8)
EmpNo             CHAR(8)

OrdNo is the PRIMARY KEY

 

Step 1 - Drawing the first ER Diagram

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 (OrderTbl in the diagram), 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 - 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 OrderTbl 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 3 - Drawing the second ER Diagram

In a separate 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.

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

Reference no: EM13949551

Questions Cloud

Maximum theoretical value of the number : An inventor claims to have developed a power cycle operating between hot and cold reservoirs at 1000 K and 250 K, respectively, that develops net work equal to a multiple of the amount of energy, QC, rejected to the cold reservoir-that is Wcycle 5 ..
What were the reasons offered for implementing abc : What were the reasons offered for implementing ABC? What implementation procedures were used? How many activities were identified?
Determine the net work developed : 1. A reversible power cycle operating between hot and cold reservoirs at 1000 K and 300 K, respectively, receives 100 kJ by heat transfer from the hot reservoir for each cycle of operation. Determine the net work developed in 10 cycles of operatio..
Descriptions of the cost accounting system : Descriptions of the cost accounting system used in the organization - Pros and cons of this cost accounting system
Identify the foreign key columns in the table structures : The problems below use the Customer, OrderTbl, and Employee tables of a simplified Order Entry database.
Why the behavior of the production manager is unacceptable : Explain why the behavior of the production manager is unacceptable for a continuous improvement environment. How an activity-based responsibility accounting approach would discourage the kind of behavior described.
Students expectations in regards prospective jobs : you will need t identify clearly and specifically what you intend to study by formulating a research question. be specific as you can. you must also identify key concepts and their use in your study.
What is the effect size of the anova : Null Hypothesis (Ho): There is no significant difference between the population average scores of mathematics among these three groups with different teaching method.
Determine the resistance : A 10-V battery supplies a constant current of 0.5 amp to a resistance for 30 min. (a) Determine the resistance, in ohms. (b) For the battery, determine the amount of energy transfer by work, in kJ.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd