Professional Documents
Culture Documents
Exam I Sample Questions
Exam I Sample Questions
Exam I Sample Questions
ITP 249
Multiple Choice
For each question fill in your answer in the blank provided next to the question number.
4. ___________ An entity with a foreign key as part of its primary key can be described as having:
a. An index relationship
b. A strong relationship
c. A weak relationship
d. None of the above
1
Short Answer
Please fill in your answer to the following questions in the space provided.
5. What is the term for the attribute(s) that creates a relationship in between tables?
_____________________________Foreign key_______________________________________
Long Answer
Please fill in your answer to the following questions in the space provided.
9. What is a recursive or unary relationship? Give an example of one. Include an ERD of the
example
2
Normalization
10. Consider the dependency diagram
a. Show the table in 1NF. Underlined attributes are PK. Italicized attributes are FK.
TABLE1(A, B, C, D, E, F, G)
b. Show the table decomposed into 2NF.
TABLE1(A, B, D, E, F)
TABLE2(B, C)
TABLE3(A, G)
c. Show the table decomposed into 3NF.
TABLE1(A, B, D, E)
TABLE2(B, C)
TABLE3(A, G)
TABLE4(D, F)
ER Diagram
11. Given the following database table listings, create an ERD.
CRS_COD CRS_DESC CRS_CREDITS
E CRS_TITLE
ACCT-211 Basic Accounting An introduction to accounting. Required of all business majors. 3
Database design and implementation issues. Uses CASE tools to 3
generate designs that are then implemented in a major database
CIS-380 Database Techniques 1 management system.
The second half of CIS-380. Basic Web database application 4
CIS-490 Database Techniques 2 development and management issues.
3
12. A laboratory has several chemists who work on one or more projects. Chemists also may use
certain kinds of equipment on each project. Attributes of CHEMIST include Employee ID
(identifier), Name, and Phone Number. Attributes of PROJECT include Project ID (identifier) and
Start Date. Attributes of EQUIPMENT include Serial Number and Cost. The organization wishes
to record Assigned Date – the date when a given equipment item was assigned to an individual
chemist working on a specified project. A chemist must be assigned to at least one project and
one equipment item. A given equipment item need not be assigned, and a given project need
not be assigned either a chemist nor an equipment item.
SQL
Morgan Importing purchases antiques and home furnishings in Asia and ships those items to a
warehouse facility in Los Angeles. Mr. Morgan uses a database to keep a list of items
purchased, shipments and shipment items. His database includes the following tables:
4
ITEM (ItemID, Description, PurchaseDate, Store, City, Quantity, LocalCurrencyAmt,
ExchangeRate)
SHIPMENT Table
SHIPMENT_ITEM Table
ITEM Table
13. List the ShipmentID, ShipperName, and ShipperInvoiceNumber for all shipments with an insured
value greater than 10000.
5
FROM SHIPMENT
WHERE InsuredValue > 10000;
14. List the ShipmentID, ShipperName, and ShipperInvoiceNumber of all shippers whose name starts
with “AB”.
SELECT ShipmentID, ShipperName, ShipperInvoiceNumber
FROM SHIPMENT
WHERE Shipper LIKE 'AB%';
15. Assume DepartureDate and ArrivalDate are in the format MM/DD/YY. List the ShipmentID,
ShipperName, and ShipperInvoiceNumber and ArrivalDate of all shipments that departed on the
10th of any month.
SELECT ShipmentID, ShipperName, ShipperInvoiceNumber, ArrivalDate
FROM SHIPMENT
WHERE DepartureDate LIKE '___10%'; (also accept ‘__10__’)