------------------------------------------------------------- -- Example SQLite commands for 45881/70455 Modern Data Management -- Wolfgang Gatterbauer -- v151127 ------------------------------------------------------------- ------------------------- -- The following command enables foreign key constraints in SQLite. -- They are not activated by default. -- More details: http://code.google.com/p/sqlite-manager/wiki/ForeignKeys ------------------------- PRAGMA foreign_keys=ON; ------------------------- -- Drop tables if they already exist ------------------------- drop table if exists Car; ------------------------- -- Create the tables ------------------------- create table Car ( name varchar(20) PRIMARY KEY, price int, maker varchar(20) ); --------------------------- -- Populate the tables --------------------------- insert into Car values ('M3', 120, 'BMW'); insert into Car values ('M5', 150, 'BMW'); insert into Car values ('Prius', 50, 'Toyota'); insert into Car values ('Lexus1', 75, 'Toyota'); insert into Car values ('Lexus2', 100, 'Toyota');