Databases Reference
In-Depth Information
INSERT INTO CATEGORY(CATEGORYID, CATEGORYNAME, DESCRIPTION) VALUES('C3','COMPUTERS','Computer
Books Selection')
/
INSERT INTO CATEGORY(CATEGORYID, CATEGORYNAME, DESCRIPTION) VALUES('C4','HORROR','Best Horror
Selections')
/
How It Works
The Books table is the main table that stores the list of books in the topic catalog; the Inventory table
stores the stockcount of each available book; and the Category table stores the full list of book categories
(genres) available in the catalog. Table 10-1 describes the mapping between the various keys in each
respective table.
Table 10-1. Foreign Key Mapping Between Different Tables in the topic Catalog Application
Foreign key mapping
Description
Books.BookID = Inventory.BookID
Each book has a corresponding entry in
the Inventory table that stores the
stockcount details for the topic.
Books.BookCategory = Category.CategoryID Each book belongs to a genre/category,
the details of which are stored in the
Category table. The ID stored in the
Books.BookCategory column looks up the
corresponding entry in the Category
table.
10-2. Creating the Pages to Manage the List of Books
Problem
The storekeeper needs a way to manage the list of books in his book catalog.
Solution
You must first create the forms that allow the storekeeper to add, edit, and delete book titles in the topic
catalog.
To create the page that allows the storekeeper to add/edit/delete books, please follow these
instructions:
Create a new Database application named Book catalog .
1.
 
Search WWH ::




Custom Search