The Contacts database illustrates why and how to partition tables that do not contain the subscription expression.
Here is a simple database that illustrates the problem.
Each sales representative sells to several customers. At some customers there is a single contact, while other customers have several contacts.
The three tables are described in more detail as follows:
Table | Description | ||
---|---|---|---|
SalesReps |
All sales representatives that work for the company. The SalesReps table has the following columns:
The SQL statement creating this table is as follows:
|
||
Customers |
All customers that do business with the company. The Customers table includes the following columns:
The SQL statement creating this table is as follows:
|
||
Contacts |
All individual contacts that do business with the company. Each contact belongs to a single customer. The Contacts table includes the following columns:
The SQL statement creating this table is:
|
The goals of the design are to provide each sales representative with the following information:
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |