For the remainder of the course, I want you to imagine that you have been hired by a company called Stories on CD, Inc. to consult on the design of a relational database that will enable the company to
store and
retrieve
information about its business transactions.
To fulfill your obligation to the company, you need to accomplish a number of steps involving
analyzing their business structure,
their needs,
and the best way to organize and store the data to ensure its most efficient retrieval.
This course includes a number of hands-on exercises that enable you to complete these steps incrementally, applying what you learn in the lessons to a real-world situation. These exercises culminate in the completion of an entity-relationship (ER) diagram and completing the conceptual phase of database design. The image below to shows the diagram that will be created.
Purpose: This table stores information about CDs, including their distributor.
LINE ITEM Table
Composite Primary Key (CPK):OrderNo, CDNo
Foreign Keys (FK):
OrderNo (References ORDER table)
CDNo (References CD table)
Columns:
OrderNo (Link to the ORDER table)
CDNo (Link to the CD table)
Quantity (Number of CDs ordered)
SellingPrice (Selling price for the order)
LineCost (Total cost for the line item)
Shipped (Status of shipment)
Purpose: This table is a junction table that stores the details of CDs in each order.
Relationships Between Tables:
CUSTOMER ↔ ORDER
CustID links CUSTOMER and ORDER tables (one-to-many relationship).
ORDER ↔ LINE ITEM
OrderNo links ORDER and LINE ITEM tables (one-to-many relationship).
CD ↔ LINE ITEM
CDNo links CD and LINE ITEM tables (one-to-many relationship).
CD ↔ DISTRIBUTOR
DistID links CD and DISTRIBUTOR tables (many-to-one relationship).
Summary: This database system is designed to manage a CD sales business. It tracks:
Customers and their orders,
CDs and their distributors,
Specific line items within each order, including quantity and cost.
The LINE ITEM table serves as the bridge between ORDERS and CDs, enabling detailed order management.
This concludes the first module of the course. In the next module I will discuss the relational database model and how to describe the structure of a relational database. This material may be a review for many of you and is necessary to establish common terminology.
RelationalDB Course Project
Before moving on to the next module, click the RelationalDB Course Project link below to download the case study on which the course project is based. RelationalDB Course Project