SQL Programming Manual for Pascal
HP NonStop SQL Programming Manual for Pascal—528614-001
A-1
A
Sample NonStop SQL Database
This appendix describes the sample NonStop SQL database used by some of the
examples in this manual. The SQL statements to create the database are shown in the
SQL/MP Reference Manual.
Figure A-1 shows the names of columns and tables and the relationships among the
tables in the sample database.
Figure A-1. Sample NonStop SQL Database Relations
VSTA01.vsd
One to one
One to many
*
The PARTLOC table is
partitioned by the value
of LOC_CODE.
Legend
PERSNL Subvolume
EMPLOYEE table
DEPT table
JOB table
deptnum
deptname
manager
rptdept
location
jobcode
jobdesc
empnum
first_name
last_name
deptnum
jobcode
salary
custnum
custname
street
city
state
postcode
credit
ordernum
order_date
deliv_date
salesrep
custnum
ordernum
partnum
unit_price
qty_ordered
partnum
partdesc
price
qty_available
SALES Subvolume
CUSTOMER table
ORDERS table
ODETAIL table
PARTS table
partnum
suppnum
partcost
qty_received
errors_date
errors_time
errors_id
errors_sql
errors_text 1
errors_text 2
suppnum
suppname
street
city
state
postcode
loc_code
partnum
qty_on_hand
INVENT Subvolume
ERRORS table
SUPPLIER table
PARTSUPP table
PARTLOC table*