The demo database

Many of the queries and code samples in this document use the demo database included with Sybase IQ as a data source. The demo database (iqdemo.db) is stored in $IQDIR15/demo on UNIX or %ALLUSERSPROFILE%\SybaseIQ\demo on Windows.

Tables in the demo database are delineated by ownership. Tables owned by GROUPO contain information about a fictional company; tables owned by the DBA include utility and sample data tables.

Figure 1-1: Tables in the sample database

demo database table view

GROUPO tables in the database

GROUPO tables (see below) contain internal information about a fictional company (employees, departments, and financial data), as well as product information (products) and sales information (sales orders, customers, and contacts).

Table name

Contents

Contacts

Customer contacts and sales leads.

Customers

Customer names and addresses.

Departments

Company departments, such as manager and name.

Employees

Employee information, such as name, salary, and location.

FinancialCodes

Each expense and revenue item has a financial code.

FinancialData

Quarter-by-quarter financial information about the company.

Products

Product information, such as price and quantity available.

SalesOrderItems

Sales order items. Each order consists of one or more items. Information about sales order items is held in a separate table.

SalesOrders

Individual sale orders, including customer ID, OrderDate, FinancialCode, Region, and SalesRepresentative.

DBA tables in the database

Tables owned by the DBA in iqdemo.db include utility and sample data tables.

Table

Description

iq_dummy

iq_dummy is a one-row, one-column dummy table that you can use to extract information from the database. For example, running the NOW() function against iq_dummy returns the current date and time:

SELECT NOW() FROM iq_dummy

Use of the DUMMY system table in Sybase IQ is implied for all queries that do not have a FROM clause. For more information, see DUMMY system table in Reference.

emp1

Sample employee table that includes dept_id, start_date, name, and salary columns.

sale

Sample sales table that includes prod_id, month_num, rep_id, and sales columns.

SYSOPTIONDEFAULTS

SYSOPTIONDEFAULTS is a utility table that contains all Sybase IQ option names and values. You can query this table, if you need to see all option default values.

Case sensitivity

The sample database is case insensitive. This means that case is not considered in comparison and string operations. For example, you can type user IDs and passwords in either uppercase or lowercase when using the sample database. Note that, unlike the sample database, any Sybase IQ databases you create are case sensitive by default.