You are on page 1of 6

Question 1 :

1 a)
Entity-Relationship Model:
city

Address State

Zip

Last_name

First name Phone

Customeromer_Id Customer_Id

Customer

Ordered
for

orders

Order_id Item_ID Customer_ID Quantity


Have

Items

Price
size

Color

1 b) Assigning field names:


(CUSTOMER_NAME includes Customers first name and second name)
Customer id =Customer_id
Address=Customer_add
City=Customer_city
State=Customer_state
Zip= Customer_zip
Phone= Customer_pno
Order id= order_id
Items id=items_id
Items ordered=items_ordered
Order quantity=no_of_items
Size=item_size
Color=item_color
Retail price of item=item_price
1 C) Converting the data into FIRST NORMAL FORM:

CUST_ID CUST_NAME CUST_ADD ITEMS_OREDRED NO_OF_ITEMS ITEM_SIZE ITEM_CLR ITEM_PRICE

43/1
C01 FEY CHINATOWN COLLEGE BAG 1 NA BLUE Rs.500

12,
MIDDLETON
C02 JOE ROW SHOES 1 38 BLACK Rs.2500

12,
MIDDLETON
C02 JOE ROW JACKET 2 L BLACK Rs.6500

78/1,
LINDSAY
C03 BARBARA STREET DRESS 1 M YELLOW Rs.1500

78/1,
LINDSAY
C03 BARBARA STREET NOTEBOOK 12 M NA Rs.525

1 d) 2nd Normal Form:


1st table:

CUST_ID CUST_NAME CUST_ADD

C01 FEY 43/1 CHINATOWN

C02 JOE 12,MIDDLETON ROW

C03 BARBARA 78/1, LINDSAY STREET

2nd table:
CUST_ID ITEMS_OREDRED NO_OF_ITEMS ITEM_SIZE ITEM_CLR ITEM_PRICE

C01 COLLEGE BAG 1 NA BLUE

C02 SHOES 1 38 BLACK

C02 JACKET 2 L BLACK

C03 DRESS 1 M YELLOW

C03 NOTEBOOK 12 M NA

1 e) THIRD NORMAL FORM:


1ST TABLE

CUST_ID CUST_NAME

C01 FEY

C02 JOE

C02 JOE

C03 BARBARA

C03 BARBARA

2ND TABLE
CUST_ID CUST_NAME CUST_ADD

C01 FEY 43/1 CHINATOWN

C02 JOE 12, MIDDLETON ROW

C02 JOE 12, MIDDLETON ROW

C03 BARBARA 78/1, LINDSAY STREET

C03 BARBARA 78/1, LINDSAY STREET

3RD TABLE

CUST_ID ITEMS_OREDRED NO_OF_ITEMS ITEM_SIZE ITEM_CLR ITEM_PRICE

C01 COLLEGE BAG 1 NA BLUE Rs.500

C02 SHOES 1 38 BLACK Rs.2500

C02 JACKET 2 L BLACK Rs.6500

C03 DRESS 1 M YELLOW Rs.1500

C03 NOTEBOOK 12 M NA Rs.525

Question 2
2a)
3 season tents 2 items are left in stock.
here ORDER_ID 1 and 6 have ordered items. The item colors are SKY BLUE and LIGHT
GREY.
2b)
First Name: SHELLA
Last Name: LEWIS
customer id: 5 lives in Georgia State, zip code 37812.
2c)
4 customers have placed an order in May 2006.
The dates are:
5/29/2006
5/29/2006
5/31/2006
5/31/2006.
2d)

Based on the table data


First Name: MYRA
Last Name: SANCHEZ ordered Men's Expedition Parka.

Questions 3:
The primary key could be (Customer_ID)
Contact_No
Specification
Item ID Size Color
C01 M blue
C02 M …..
C02 L Green

Item_ID Size Color


C01 M BLUE
C01 M GREEN
C02 L BLUE
C03 L GREEN

Primary key is combination of Item_ID , size and color.


1. Inp Should be satisfied.
2. Single column primary key.

You might also like