--  MySQL dump 4.0
-- 
--  Host: localhost    Database: train01
-- --------------------------------------------------------

-- 
--  Table structure for table 'customer'
-- 
CREATE TABLE customer (
  id integer DEFAULT '0' NOT NULL primary key autoincrement,
  name varchar(80),
  address varchar(255),
  suburb varchar(50),
  state char(3),
  postcode char(4)
);

-- 
--  Dumping data for table 'customer'
-- 

INSERT INTO customer VALUES (1,'Wile E. Coyote','10 Smith St','Melbourne','VIC','3000');
INSERT INTO customer VALUES (2,'Anathema Device','13 Lucky Avenue','Smallville','VIC','3456');
INSERT INTO customer VALUES (3,'Newton Pulsifer','500 Long St','Sydney','NSW','2000');

-- 
--  Table structure for table 'sales'
-- 
CREATE TABLE sales (
  id integer DEFAULT '0' NOT NULL primary key autoincrement,
  sale_date date,
  customer_id integer,
  salesperson_id integer,
  stock_item_id integer,
  quantity integer,
  price float(4,2)
);

-- 
--  Dumping data for table 'sales'
-- 


-- 
--  Table structure for table 'salesperson'
-- 
CREATE TABLE salesperson (
  id integer DEFAULT '0' NOT NULL primary key autoincrement,
  name varchar(80)
);

-- 
--  Dumping data for table 'salesperson'
-- 

INSERT INTO salesperson VALUES (1,'Raven Sable');
INSERT INTO salesperson VALUES (2,'Carmine Zuigiber');

-- 
--  Table structure for table 'stock_item'
-- 
CREATE TABLE stock_item (
  id integer DEFAULT '0' NOT NULL primary key autoincrement,
  description varchar(80),
  price float(4,2),
  quantity integer
);

-- 
--  Dumping data for table 'stock_item'
-- 

INSERT INTO stock_item VALUES (1,'widget',9.95,12);
INSERT INTO stock_item VALUES (2,'gadget',3.27,20);
INSERT INTO stock_item VALUES (3,'doodad',49.95,7);
INSERT INTO stock_item VALUES (4,'dynamite sticks',100.15,27);
INSERT INTO stock_item VALUES (5,'parachute',599.00,13);

