; First load the JDBC driver and open a database.
d jdbc.idbDriver;
o jdbc:idb=jspTutorial.prp;

; Create the table and its index
e DROP TABLE pizza;

e CREATE TABLE pizza (
	 id long primary key,
   name varchar(255),
   	size varchar(20),
   baseprice decimal(8,2)) ;

;e IMPORT pizza FROM "pizza.txt" USING "import_pizza_schema.txt";
e IMPORT pizza FROM "pizza.txt" ;

e DROP TABLE ingredient;

e CREATE TABLE ingredient (
	 id long primary key,
   name varchar(255),
   price decimal(8,2));

;e IMPORT ingredient FROM "ingredient.txt" USING "import_ingredient_schema.txt";
e IMPORT ingredient FROM "ingredient.txt" ;

e DROP TABLE customer ;

e CREATE TABLE customer (
	 id long primary key,
   firstname varchar(30),
   lastname varchar(30),
   address1 varchar(50),
   address2 varchar(50),
   town varchar(50),
	  zip varchar(10),
	 email varchar(80));

e DROP TABLE pizzaorder;
e CREATE TABLE pizzaorder (
	 id long primary key,
	 price decimal(8,2),
	 customerid long) ;

e DROP TABLE personalpizza;
e CREATE TABLE personalpizza (
	 id long ,
	 pizzaorderid long,
   name varchar(255),
   baseprice decimal(8,2),
   size varchar(20) );

e DROP TABLE personalingredient;
e CREATE TABLE personalingredient (
	 id long ,
   name varchar(255),
   price decimal(8,2),
   pizzaorderid long);

e DROP TABLE sequence;

e CREATE TABLE sequence (
	 seqnum long
	) ;

e INSERT INTO sequence (seqnum) VALUES (1);


c close;