Project Database Schema Design

Today you will be designing a schema for the database you will be creating and using for the project. Your schema should have at least four tables, but can be much larger. Some of the tables will have five columns or more. There can be foreign keys between columns in different tables. Each column must have a datatype and declared to be either a key or not a key. Choose imaginative column and table names.

The following is a description of what the database should store. Certain aspects of the domain will be mandatory. In addition, you are expected to invent a few other attributes of interest to model in your database. The description of the domain will be given informally, and you will need to prepare a database schema that models the domain.

The Inventory Domain

An inventory in general is a catalog of all the products that a company has. In this case, the company sells books and CDs on its web site. You have been in business for quite some time and your retail business is fairly large. In the interest of efficiency, you have a number of warehouses spread out across the country. Each of these warehouses have different stock quantities of each of the products that are on sale.

The following are the mandatory aspects of the domain that you need to model.

Your inventory schema should model the details of all products you have and their availability at the different warehouses, and the warehouses themselves. Here are some details about each of the data entities that your schema should model.

Books: Every book has a title, author (one or more), and an ISBN (a unique number that is used to identify the book). Clearly you should model the selling price of a book and books may also have discounted prices.

Books are organized by categories (e.g. fiction, drama, fantasy, history, etc.), so that they can be easily searched. Any book typically also has a set of keywords that describe the contents of the books. You should model both the categories and the keywords.

Music: Every CD has an album name, an artist (one or more, may be a group identified by a name), a recording company, some unique identification (like the ISBN for books), and a selling price. Just as books, CDs are also categorized by genre (e.g. rock'n roll, jazz, classical, etc.). Further CDs can be of various types - singles, albums, commemorative editions, etc.

Availability: Each of the books and CDs can be either in-stock or out-of-stock at the different warehouses. You will be definitely interested in the quantity in stock at your warehouses (for each product), so that you have an up-to-date availability information.

Warehouses: Each warehouse has a particular location (street address, city, state, zip code) and contact information (telephone number, fax number, manager's name). Warehouses usually have an estimated capacity in terms of the number of employees, volume of business, etc.

Optional modeling: In addition to the mandatory aspects of the domain, you should add about 4 attributes of your own.

Types of Queries Your Schema Should Be Able to Support

After this class you will be able to start the rest of the first phase of the project which is to (a) create and populate this database and (b) use .NET to create a web front end. More information will be on the website. However, in order to help you think about how to design your schema, the following are the queries that you will have to support. *You do not have to write the queries today.*