I have a working copy of the tutorial webapp I wrote,
and before I commit the webapp, I want to make sure
that it works with CVS stuff.  To that end, I need help
setting up the HSQL database to support it.

I need it set up with the included schema.  Any takers?
#
# Tutorial DB
#

#
# Table structure for table 'department'
#
CREATE TABLE department (
  department_id number(12) DEFAULT '0' NOT NULL,
  department_name varchar(64) DEFAULT '' NOT NULL,
  PRIMARY KEY (department_id)
);

#
# Data for table 'department'
#

INSERT INTO department VALUES (1,'Development');
INSERT INTO department VALUES (2,'Management');
INSERT INTO department VALUES (3,'Testors');

#
# Table structure for table 'employee'
#
CREATE TABLE employee (
  employee_id number(12) DEFAULT '0' NOT NULL,
  department_id number(12) DEFAULT '0' NOT NULL,
  employee_name varchar(64) DEFAULT '' NOT NULL,
  PRIMARY KEY (employee_id)
);

#
# Foreign Keys
#
ALTER TABLE employee ADD (
  CONSTRAINT fkdepartment FOREIGN KEY(DEPARTMENT_ID)
  REFERENCES DEPARTMENT(DEPARTMENT_ID)
  ON DELETE CASCADE
);

#
# Data for table 'employee'
#

INSERT INTO employee VALUES (1,1,'Donald Ball');
INSERT INTO employee VALUES (2,1,'Stefano Mazzocchi');
INSERT INTO employee VALUES (3,2,'Pierpaolo Fumagalli');
INSERT INTO employee VALUES (4,4,'Torsten Curdt');

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to