Design a database for a world-wide package delivery company (e.g., DHL or FedEX). The database must be able to keep track of customers (who ship items) and customers (who receive items); some customers may do both.

50 0

Get full Expert solution in seconds

$1.97 ONLY

Unlock Answer

Design a database for a world-wide package delivery company (e.g., DHL or FedEX). The database must be able to keep track of customers (who ship items) and customers (who receive items); some customers may do both.

Each package must be identifiable and trackable, so the database must be able to store the location of the package and its history of locations. Locations include trucks, planes, airports, and warehouses. Your design should include an E-R diagram, a set of relational schemas, and a list of constraints, including primary-key and foreign-key constraints.

EXPERT ANSWER

Relational Schema:

1. Customer(ID(PK),name,address,phone,ShippedCustomerID(FK),ReceivedCustomerID(FK))

2. Package(packageID(PK),date,time)

3. PackageSends(CustomerID(FK),packageID(FK))

4. Location(locationNo(PK),date,time)

5. Locate(locationNo(FK),packageID(FK))

6. Truck(truckNo(PK),locationNo(FK),licenseNo)

7. Plane(planeID(PK),name,locationNo(FK))

8. Warehouse(wh-code(PK),address,locationNo(FK))

9. Airport(airportID(PK),locationNo(FK),name,city)