Database Assessment

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Question 1

1. Convert the following table into an equivalent collection of tables that are in third normal
form, 3NF.
Student ( StudNum, StudLastName, StudFirstName, StudBirthDate, StudDegree1, StudDegree2,
CourseID, CourseClassification, CourseTitle, StudGrade1, EmpGrade2, DeptCode, DeptName)

2. Develop the following:
1. 1NF Relation, primary key and functional dependencies
2. 2NF Relations, primary key and functional dependencies
3. 3NF Relations, primary key and functional dependencies
3. Underline the primary key and clearly label your answer for #1, #2, and #3, i.e., use the
numbers above

Question 2
Given the tables below and their different attributes, clearly define the relationship between
them to create a relational database.
o Identify the Foreign Key (FK) column that link(s) the tables together.
o Justify your choice of FK.
o Identify the type of relationship (1:1, 1:M, M:1, or M:M) between the objects.

o Entity Relationship Design
Draw the relational Database Schema that represents the design. Clearly map out the
relationships.

o Order of Table Creation/Table Drop
List the tables in the order of table creation
List the tables in the order of table drop

VENDOR PRODUCT ORDERS
VCODE PCODE ORDERNUM
VNAME PDESCRIPTION CUSTNUM
VCONTACT PDATE ORDERDATE
VPHONE PQTY ORDERQTY
VSTATE P_PRICE PCODE
VCODE
Question 3
Write the below queries in T/SQL or SQL Server using the NorthWind database (Get it from
here http://northwinddatabase.codeplex.com/ )
1. Write a sub-query that returns all orders placed on the last day of activity that can be
found in the Orders table. Include the orderid, orderdate, customerid, and the employeeid.

2. Write a sub-query that returns the total number of orders placed by the customer with the
highest number of orders. Include the customerid and the number of orders placed.

3. Write a sub-query that returns employees who did not place orders on or after May 1st,
1998. Include the employeeid, last and first names.

You might also like