Specifications
orderid int unsigned not null auto_increment primary key,
customerid int unsigned not null,
amount float(6,2),
date date not null,
order_status char(10),
ship_name char(40) not null,
ship_address char(40) not null,
ship_city char(20) not null,
ship_state char(20),
ship_zip char(10),
ship_country char(20) not null
);
create table books
(
isbn char(13) not null primary key,
author char(30),
title char(60),
catid int unsigned,
price float(4,2) not null,
description varchar(255)
);
create table categories
(
catid int unsigned not null auto_increment primary key,
catname char(40) not null
);
create table order_items
(
orderid int unsigned not null,
isbn char(13) not null,
item_price float(4,2) not null,
quantity tinyint unsigned not null,
primary key (orderid, isbn)
);
create table admin
(
username char(16) not null primary key,
password char(16) not null
);
Building a Shopping Cart
C
HAPTER 25
25
B
UILDING A
SHOPPING CART
547
LISTING 25.1 Continued
31 7842 CH25 3/6/01 3:38 PM Page 547










