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

<!DOCTYPE xmlsql SYSTEM "xmlsql.dtd">

<xmlsql>

<retract construct="table" name="article"/>
<retract construct="table" name="book"/>

<update label="create article">
CREATE TABLE article 
( aid SERIAL NOT NULL,
  author VARCHAR(250) NOT NULL,
  title VARCHAR(250) NULL,
  booktitle VARCHAR(250) NULL,
  volume VARCHAR(10) NULL,
  year INT NULL,
  month VARCHAR(50) NULL,
  pages VARCHAR(20) NULL,
  address VARCHAR(250) NULL,
  note VARCHAR(250) NULL,
  isbn VARCHAR(50) NULL,
  location VARCHAR(150) NULL,
  doi VARCHAR(50) NULL,
  publisher VARCHAR(50) NULL,  
  CONSTRAINT article_pk PRIMARY KEY (title,author)
)
</update>

<update label="create book">
CREATE TABLE book
(  bid SERIAL NOT NULL,
   author VARCHAR(100) NOT NULL,
   title VARCHAR(150) NULL,
   year INT NULL,
   publisher VARCHAR(100) NULL,
   address VARCHAR(100) NULL,
   CONSTRAINT books_pk PRIMARY KEY (title,author)
)
</update>

</xmlsql>
