<?xml version="1.0" standalone="no"?>

<!DOCTYPE xmlsql SYSTEM "xmlsql.dtd">

<xmlsql>

<retract construct="table" name="male"/>
<retract construct="table" name="female"/>
<retract construct="table" name="person"/>

<update label="create person">
CREATE TABLE person
(  id INTEGER NOT NULL,
   name VARCHAR(20) NOT NULL,
   dname VARCHAR(20) NOT NULL,
   CONSTRAINT person_pk PRIMARY KEY (id)
)
</update>

<update label="create male">
CREATE TABLE male
(  id INTEGER NOT NULL,
   CONSTRAINT male_pk PRIMARY KEY (id),
   CONSTRAINT male_isa_person_fk FOREIGN KEY (id) REFERENCES person
)
</update>

<update label="create female">
CREATE TABLE female
(  id INTEGER NOT NULL,
   CONSTRAINT female_pk PRIMARY KEY (id),
   CONSTRAINT female_isa_person_fk FOREIGN KEY (id) REFERENCES person
)
</update>

<update>
INSERT INTO person VALUES (1,'Alex','CS-BBK')
</update>

<update>
INSERT INTO person VALUES (2,'Dimitri','CS-BBK')
</update>

<update>
INSERT INTO person VALUES (3,'Mike','Computing-IC')
</update>

<update>
INSERT INTO person VALUES (4,'Nerissa','Computing-IC')
</update>

<update>
INSERT INTO person VALUES (5,'Peter','Computing-IC')
</update>

<update>
INSERT INTO female VALUES (1)
</update>

<update>
INSERT INTO male VALUES (2)
</update>

<update>
INSERT INTO male VALUES (3)
</update>

<update>
INSERT INTO female VALUES (4)
</update>

<update>
INSERT INTO male VALUES (5)
</update>

</xmlsql>
