14. ABF Development Example : Guidelines for Creating Tables : The Sample Database
 
Share this page                  
The Sample Database
In the sample Sales Entry Application, you are working within a database called accounts. For this application, you must store three kinds of information:
Information about a particular customer: name, customer number, and address.
Information about a particular order: the type and quantity of the product(s), name and number of the customer, and date ordered.
Information about the marketing of a particular product: the type of product and quantity ordered.
You can most conveniently store the three kinds of data in three separate tables. Then, making use of a relational database management system's flexibility, you can add data to and retrieve data from one or more of the tables.
The following table shows how information about the three objects--customers, orders and products--is organized in three tables: Customer, Orders, and Marketing.
Table Name
Column Name
Data Type
Customer
Name
Number
Address
char(20)
smallint
char(60)
Orders
Product
Quantity
Custname
Custnum
Current_date
char(20)
smallint
char(20)
smallint
date
Marketing
Prod
Quantity
char(20)
smallint
The customer number is a unique identifier and can be used to link the tables on customers and orders. You can also use the product name as a link between the tables on orders and marketing.
If these three tables do not already exist in the accounts database, set them up using the Tables utility. To reach this utility, choose Utilities. From the resulting menu, choose Ingres/Menu. From this menu, choose Tables.
If you need help with the Tables utility, see Character-based Querying and Reporting Tools User Guide.