Du får lige et sqlite3 dump til at lege med COMPANY eksemplerne i fundamental database systems - sqlite er dette:
http://www.sqlite.org/sqlite.htmldump:
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE EMPLOYEE(Fname TEXT, Minit TEXT,Lname TEXT,Ssn INTEGER NOT NULL PRIMARY KEY, Bdate TEXT, Address T
TEXT, Salary INTEGER, Super_ssn INTEGER, Dno INTEGER);
INSERT INTO "EMPLOYEE" VALUES('John','B','Smith',123456789,'1965-01-09','731 Fondren, Houston, TX','M',30000,33
);
INSERT INTO "EMPLOYEE" VALUES('Franklin','T','Wong',333445555,'1955-12-08','638 Voss, Houston, TX','M',40000,88
);
INSERT INTO "EMPLOYEE" VALUES('Joyce','A','English',453453453,'1972-07-31','5631 Rice, Houston, TX','F',25000,3
5);
INSERT INTO "EMPLOYEE" VALUES('Ramesh','K','Narayan',666884444,'1962-09-15','975 Fire Oak, Humble, TX','M',3800
55,5);
INSERT INTO "EMPLOYEE" VALUES('James','E','Borg',888665555,'1937-11-10','450 Stone, Houston, TX','M',55000,NULL
INSERT INTO "EMPLOYEE" VALUES('Jennifer','S','Wallace',987654321,'1941-06-20','291 Berry, Bellaire, TX','F',430
555,4);
INSERT INTO "EMPLOYEE" VALUES('Ahmad','V','Jabbar',987987987,'1969-03-29','980 Dallas, Houston, TX','M',25000,9
4);
INSERT INTO "EMPLOYEE" VALUES('Alicia','J','Zelaya',999887777,'1968-07-19','3321 Castle, Spring, TX','F',25000,
,4);
CREATE TABLE DEPARTMENT (
Dname TEXT NOT NULL,
Dnumber INTEGER NOT NULL PRIMARY KEY,
Mgr_ssn TEXT,
Mgr_start_date TEXT);
INSERT INTO "DEPARTMENT" VALUES('Headquarters',1,'888665555','1981-06-19');
INSERT INTO "DEPARTMENT" VALUES('Administration',4,'987654321','1998-01-01');
INSERT INTO "DEPARTMENT" VALUES('Research',5,'333445555','1988-05-22');
CREATE TABLE DEPT_LOCATIONS (Dnumber INTEGER NOT NULL,Dlocation TEXT NOT NULL,PRIMARY KEY(Dnumber,Dlocation));
INSERT INTO "DEPT_LOCATIONS" VALUES(1,'Houston');
INSERT INTO "DEPT_LOCATIONS" VALUES(4,'Stafford');
INSERT INTO "DEPT_LOCATIONS" VALUES(5,'Bellaire');
INSERT INTO "DEPT_LOCATIONS" VALUES(5,'Houston');
INSERT INTO "DEPT_LOCATIONS" VALUES(5,'Sugarland');
CREATE TABLE PROJECT (
Pname TEXT NOT NULL,
Pnumber INTEGER NOT NULL PRIMARY KEY,
Plocation TEXT NOT NULL,
Dnum INTEGER NOT NULL);
INSERT INTO "PROJECT" VALUES('ProductX',1,'Bellaire',5);
INSERT INTO "PROJECT" VALUES('ProductY',2,'Sugarland',5);
INSERT INTO "PROJECT" VALUES('ProductZ',3,'Houston',5);
INSERT INTO "PROJECT" VALUES('Computerization',10,'Stafford',4);
INSERT INTO "PROJECT" VALUES('Reorganization',20,'Houston',1);
INSERT INTO "PROJECT" VALUES('Newbenefits',30,'Stafford',4);
CREATE TABLE WORKS_ON (
Essn INTEGER NOT NULL,
Pno INTEGER NOT NULL,
Hours NUMERIC,
PRIMARY KEY(Essn, Pno));
INSERT INTO "WORKS_ON" VALUES(123456789,1,32.5);
INSERT INTO "WORKS_ON" VALUES(123456789,2,7.5);
INSERT INTO "WORKS_ON" VALUES(666884444,3,40);
INSERT INTO "WORKS_ON" VALUES(453453453,1,20);
INSERT INTO "WORKS_ON" VALUES(453453453,2,20.5);
INSERT INTO "WORKS_ON" VALUES(333445555,2,10);
INSERT INTO "WORKS_ON" VALUES(333445555,3,10);
INSERT INTO "WORKS_ON" VALUES(333445555,20,10);
INSERT INTO "WORKS_ON" VALUES(999887777,30,30);
INSERT INTO "WORKS_ON" VALUES(999887777,10,10);
INSERT INTO "WORKS_ON" VALUES(987987987,10,35);
INSERT INTO "WORKS_ON" VALUES(987987987,30,5);
INSERT INTO "WORKS_ON" VALUES(987654321,30,20);
INSERT INTO "WORKS_ON" VALUES(987654321,20,15);
INSERT INTO "WORKS_ON" VALUES(888665555,20,NULL);
CREATE TABLE DEPENDENT (
Essn INTEGER NOT NULL,
Dependent_name TEXT NOT NULL,
Sex TEXT,
Bdate TEXT,
Relationship TEXT,
PRIMARY KEY(Essn, Dependent_name));
INSERT INTO "DEPENDENT" VALUES(333445555,'Alice','F','1986-04-05','DAUGHTER');
INSERT INTO "DEPENDENT" VALUES(333445555,'Theodore','M','1983-10-25','SON');
INSERT INTO "DEPENDENT" VALUES(333445555,'Joy','F','1958-05-03','SPOUSE');
INSERT INTO "DEPENDENT" VALUES(987654321,'Abner','M','1942-02-28','SPOUSE');
INSERT INTO "DEPENDENT" VALUES(123456789,'Michael','M','1988-01-04','SON');
INSERT INTO "DEPENDENT" VALUES(123456789,'Alice','F','1988-12-30','DAUGHTER');
INSERT INTO "DEPENDENT" VALUES(123456789,'Elizabeth','F','1967-05-05','SPOUSE');
COMMIT;