
--- sqlite3 commands to create the database
--- from http://en.wikibooks.org/wiki/SQL_Exercises/The_warehouse
---
---    $ sqlite3 warehouse.db < create.sql
---

 CREATE TABLE Warehouses (
   Code INTEGER PRIMARY KEY NOT NULL,
   Location TEXT NOT NULL ,
   Capacity INTEGER NOT NULL 
 );
 
 CREATE TABLE Boxes (
   Code TEXT PRIMARY KEY NOT NULL,
   Contents TEXT NOT NULL ,
   VALUE REAL NOT NULL ,
   Warehouse INTEGER NOT NULL 
     CONSTRAINT fk_Warehouses_Code REFERENCES Warehouses(Code)
 );