

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Instructor: Dr. Jessica Lin
Problem 1. Suppose a University Database contains an Entity Set named Student. Each Entity in the Entity Set Student has five attributes: Student ID, SSN, Name, Phone number, GPA. Both Student ID and SSN have unique values for each student. (1) Choose a Primary Key for Student. Motivate your choice by making proper assumptions. (2) List all Candidate Keys for Student. Provide the necessary explanations to support your design. (3) List all Superkeys for Student. Problem 2. For each binary relationship given below, indicate its multiplicity (i.e., one-to-one, one- to-many, many-to-one, many-to-many). Clearly state any assumption you make. Entity 1 Entity 2 1 STUDENT SOCIAL_SECURITY_CARD 2 STUDENT TEACHER 3 CLASSROOM WALL 4 COUNTRY CURRENT_PRESIDENT 5 COURSE TEXTBOOK 6 ITEM ORDER 7 STUDENT CLASS 8 CLASS INSTRUCTOR 9 INSTRUCTOR OFFICE 10 EBAY_AUCTION_ITEM EBAY_BID Problem 3. Suppose you are hired by an online store like Amazon.com. Your first task is to design a database that stores and organizes all the products that the company sells. The database stores the following information: For each product that the company sells: (unique) product ID, product name,
manufacturer, unit price, and average customer rating. For each manufacturer whose products are sold by the company: (unique) manufacturer ID, (one or more) address(es), and (one or more) phone number(s). The products are classified into different departments such as Electronics, Home & Garden, Books, DVDs, etc. Each department is given a name (like those just given). A product may belong to more than one department. For each customer: (unique) customer ID, customer name, (one or more) addresses, (one or more) phone numbers, birthday, the total amount of money spent so far, and the departments that the customer tends to like. Draw the ER diagram for the given database, identifying the following: (i) all the entity sets and their attributes; (ii) all the relationship sets; (iii) all the required key constraints and participation constraints; (iv) the primary key for each entity set (and weak entity set, if any). Does your diagram capture all the given requirements? If not, specify which requirement(s) is (are) not captured. Problem 4. The following questions concern the ER diagram resulting from Problem 3: a) Convert the entity-relationship design to a schema for a relational database. List all relational schema. For each relational schema, state (i) the name of the relation, (ii) the names of its attributes, (iii) the domain (or data type) of each attribute, (iv) the primary key, and (v) the foreign key(s). b) Use Oracle on ITE LAB machine to create the tables from a) above and insert at least two tuples to each table. Implement all these in one script (text) file. What/when/how to submit: Submit a hard copy of ALL problems (no loose paper please). The script file for item b) of Problem 4 needs to be submitted also electronically. You’ll receive an email from the TA explaining how to submit electronically. Any violation may cause you to lose points. The deadline for submitting both paper version and the electronic version is September 16, 2008 by 4:35PM. The hardcopy needs to be