You are on page 1of 3

Todays Erd Basic.

Question 1. Draw an ER diagram that captures the following scenario. (6 marks)

The Fun-to-Learn company is a member of the Direct Marketing Association, and sells
their early learning products exclusively through their network of distributors. Each
distributor registered with Fun-to-Learn has a unique distributor number, and their
name, address and telephone number is also kept.

Distributors order products from Fun-to-Learn. Each order has its own unique order
number, the order date and the shipping date. A number of products can be ordered on one
order, each product appearing on an order-line. The order-line has an order-line number,
which is only unique for its order, as well as the quantity of the product ordered and the
order-line cost.

A product has a unique product ID, and we also wish to keep a title, age group and a price
for it. Fun-to-Learn stocks 2 different kinds of products: books and CD-ROMs. For
books the ISBN, primary author, year published and publisher details are needed, and for
CD-ROMs the platform (e.g. Windows 2000, or Mac) and the minimum system
requirements are recorded.

Each product can be stored in a number of different warehouses, each of which are
identified by a warehouse number and also have an address. More than one product is kept
in one warehouse. Several product attributes will take on different values when the same
product is kept in a different warehouse. These are the stock-on-hand, the minimum stock
level and the reorder level.

Each order-line will be filled with its ordered product from only one warehouse.

1
Data modeling - draw an ER diagram below that captures the given scenario

ORDER LINE
DISTRIBUTOR ORDER
Order#,
Distrib# OLine#
Dname Order#
OrderDate QtyOrdered
Daddress
ODateShipped Cost
DTel

PRODUCT WAREHOUSE
ProdID PRODUCT
Whouse#,
ProdTitle
ProdID
AgeGroup
StockOnHand
Price
MinStockLevel
ReorderLevel

D, C
BOOK CDROM
WAREHOUSE

BookProdID CDProdID Whouse#


ISBN Platform WAddress
PrimaryAuthor MinSysReq
Year
Publisher

for correct non-key attributes in


associative and hierarchy entities.

2
Question 2 ( 3 marks) Transform from ERD into BCNF relations, and write one
relation in each row of the following table.

Student(sid, sname, semail)


Do((subno, assetitle)*, sid* mark)
Assessment(subno*, assetitle, weight, due)
Subject(subno, subname, credit, lid*)
Lecturer(lid, lname)
PTlecturer(lid*, lorganization)
FTlecturer(lid*, loffice, ltel)

Question 3 ( 3 marks) Normalization

1NF: Invoice (Invoice#, Cust#, CustName, CustAddress, Salesman#, SalesName, Date)


InvoicePart (Invoice#, Part#, PartName, Price, Qty)
2NF: Invoice (Invoice#, Cust#, CustName, CustAddress, Salesman#, SalesName, Date)
InvoicePart (Invoice#*, Part#*, Qty)
Part (Part#, PartName, Price)
3NF: Invoice (Invoice#, Cust# *, Salesman# *, Date)
Customer (Cust#, CustName, CustAddress)
Salesman (Salesman#, Salesman)
InvoicePart (Invoice#*, Part#*, Qty)
Part (Part#, PartName, Price)

You might also like