0% found this document useful (0 votes)
16 views19 pages

Spencer Assignment1

Spencer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views19 pages

Spencer Assignment1

Spencer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Assignment 1

How to do this assignment


 Using this powerpoint, create additional slides in
between each question to write your answers.

 When done, save a PDF file from this powerpoint


as yourLastName_assignment1.pdf

 For submission, see the end of this powerpoint for


instructions.
Assignment 1

1. Use the Table below to answer questions 1.1 to 1.4.


 1.1 Using correct terminology, identify and describe all the
components in Table 1a.
 1.2 What is the possible domain for field EmpJobCode?
 1.3 How many records are shown?
 1.4 How many attributes are shown?

Table 1a
Answers 1.1-1.4
 1.1 – EMID lists employee id numbers, EMPLNAME
lists employee last names, EMPINIT lists employee
middle initials, EMPFNAME lists employee first
names, EMPJOBCODE lists what field of the
company the employees work under.

 1.2 - DEPT (department)

 1.3 - There are 4 attributes shown

 1.4 - There are 5 attributes shown


Assignment 1
2. The database below is composed of two tables.
Use these tables to answer questions 2.1 to 2.5.

Table 2a

Table 2b
Assignment 1
 2.1 Identify the primary key for each table.

 2.2 Identify the foreign key in the PLAY table.

 2.3 Identify the candidate keys in both tables.

 2.4 Draw the ER model.

 2.5 Does the PLAY table exhibit referential


integrity? Why or why not?
Answers 2.1-2.5
 2.1 - The primary key for both tables is DIRNUM

 2.2 - The foreign key is PLAYNO

 2.3 - The candidate keys include DIRNAME &


PLAYNAME

 2.4 –

 2.5 – Yes because the DIRNUM in the PLAY table


references the DIRNUM from the DIRECTOR table.
Assignment 1
3. The RRE Trucking Company database includes
the three tables in the diagram below. Use these
tables to answer questions 3.1 to 3.5.

Table 3a

Table 3b

Table 3c
Assignment 1
 3.1 Identify the primary and foreign key(s) for
each table.

 3.2 Does the TRUCK table exhibit entity and


referential integrity? Why or why not? Explain
your answer.

 3.3 What kind of relationship exists between the


TRUCK and BASE tables?

 3.4 How many entities does the TRUCK table


contain?

 3.5 Identify the TRUCK table candidate key(s).


Answers 3.1-3.5
Assignment 1
4. Suppose you are using the database in the next slide,
composed of the two tables. Use these tables to answer
questions 4.1 to 4.6.

 4.1 Identify the primary key in each table.

 4.2 Identify the foreign key in the BookOrders table.

 4.3 Are there any candidate keys in either table?

 4.4 Draw the ER model.

 4.5 Does the BookOrders table exhibit referential


integrity? Why or why not?

 4.6 Do the tables contain redundant data? If so which


table(s) and what is the redundant data?
Assignment 1

Table 4a

Table 4b
Answers 4.1-4.6
 4.1 – The primary key for Customer table is the AccntNo. The
primary key for BookOrders table is OrderID.

 4.2 – The foreign key in the BookOrders table is the CustID.

 4.3 – The candidate keys for Customer table include CustID


and AccntNo. The candidate key for BookOrders table is the
OrderID.

 4.4

 4.5 – The BookOrders table exhibits referential integritry


because it properly lists which customer placed which book
order.

 4.6 – The AccntNo or CustID could be considered redundant


data in the Customer table because they can be
interchanged with each other.
Assignment 1
5. Looking at the student table below, list all the
possible candidate keys. Why did you select
these?

Table 5a
Answer question 5
 The student id and telephone numbers would be
the candidate keys because they can call up a
record without depending on any other data
from the table because no 2 students will have
the same phone number or student id.
Assignment 1
Use the ERD of a school database below to answer
questions 6 to 9.
Assignment 1

6. Identity all the kernels and dependent and


characteristic entities in the ERD.

7. Which of the tables contribute to weak


relationships? Strong relationships?

8. Looking at each of the tables in the school


database on the previous slide, which
attribute could have a NULL value? Why?

9. Which of the tables were created as a result


of many to many relationships?
Answers 6-9
 6 – instructor name, salary, commission, date
hired, mentor id, title, duration, cost, subject id,
site id, start date, max no students, evaluation,
amount paid, tel no, fax no, gender date of birth,
student desc, preferred language, passport
program, company id

 7 – Weak: instructor, attendance Strong: courde,


student, offering

 8 – Company id can have a null value

 9 - Attendance
Assignment 1 Submission
 Upload the PDF to your web host – create a
directory/folder for this class within your server.
 On your wordpress blog, create a post title:
“Assignment 1”

 On this posting, post the URL to your PDF file on


before next class (Week 6).

 Note: Late posting accepted with 30% penalty. It


must be posted no later than 7 days after its due
date. Any posting after the 7 days will not receive
a grade.

You might also like