-- create.sql
-- SQL statements for table creation for CAP database
-- written in Entry SQL-92, should work for all full-feature databases

drop table customers;
create table customers (cid char(4) not null, cname varchar(13),
  city varchar(20), discnt real, primary key(cid));

drop table agents;
create table agents (aid char(3) not null, aname varchar(13),
  city varchar(20), percent smallint, primary key (aid));

drop table products;
create table products (pid char(3) not null, pname varchar(13),
  city varchar(20), quantity integer, price double precision,
  primary key(pid));

drop table orders;
create table orders (ordno integer not null, month char(3),
  cid char(4), aid char(3), pid char(3),
  qty integer, dollars double precision, primary key(ordno));

