Database Xcessory Tutorials

Setting up the Tutorials

If you haven't yet installed DX, click here for Installation Notes. Code for the tutorial examples is located in the following directory: /examples/ These examples are based on a small order-entry database. A script is provided to create and populate the database directories: Informix users

  • If you are an Informix user, the script is in the following directory: /examples/OrderEntry/
  • informix

Sybase users

  • If you are a Sybase user, the script is in the following directory: /examples/OrderEntry/
  • sybase

Oracle users

  • If you are an Oracle user, the script is in the following directory: /examples/OrderEntry/oracle

About the OrderEntry Sample Database

The tutorials in this chapter use the OrderEntry database. The OrderEntry database is a simple set of tables intended to support an invoicing application for a sports equipment sales company. The database consists of several tables with keys that allow rapid joining of the tables. Some of the tutorials use joined tables to demonstrate some of the more sophisticated features of Database Xcessory and DBPak. This distribution includes command files to create the OrderEntry database. If you choose to build these sample applications, create the databases on your own system by using the scripts Oracle users

  • Because Oracle is not case-sensitive, the Schema Browser renders all names uniformly in uppercase.

Informix users

  • The Schema Browser renders all names in lowercase.
  • OrderEntry tables The tables in the OrderEntry database are listed as follows:
    Accounts A list of all customers who have ordered or might plan to order from the company. Indexed by Account_Number, an integer key which should be unique for each record.
    Inventory A list of all items that may be ordered. Part_Number is the key and should be unique.
    Invoice A table of orders placed with the company. Keyed on Invoice_Number, an integer key which should be unique for each record. Also refers to the Account table through the Account_Number field.
    InvoiceDetail Has one record for every line on an order form. Related to the Invoice table through the Invoice_Number column. Invoice_Number column and the Line column together make a unique key, allowing records to be updated.
    Sales Contains name of every sales employee in the company, keyed on the Employee_Id, a unique integer field. Territory field is a territory name that can be used later for generating statistics on sales by territory.
    SalesByTerritory A view and not an actual table. Data in the view is constructed when the application requests it, an is based on the Invoice and Sales tables.
    keys Used to help generate unique keys for other tables. Each row of keys table has a tablename and nextkey pair where the nextkey is the next unique key value for the table in the tablename field. For example, the first record of keys has: Tablename: Nextkey: Accounts 3000 where 3000 is the value of the next available unique key for the Accounts table.