head	1.4;
access;
symbols;
locks; strict;
comment	@# @;


1.4
date	2001.08.17.22.51.23;	author dlr;	state Exp;
branches;
next	1.3;

1.3
date	2001.08.11.09.08.12;	author dlr;	state Exp;
branches;
next	1.2;

1.2
date	2001.03.22.21.45.00;	author lucas;	state dead;
branches;
next	1.1;

1.1
date	2001.02.27.01.45.45;	author lucas;	state Exp;
branches;
next	;


desc
@@


1.4
log
@A name parameter will now be allowed for foreign-key constraints, and
the index entity will have an optional name (just like unique does).
@
text
@<!-- 
    Torque XML database schema DTD 
    $Id: database.dtd,v 1.2 2001/08/17 21:47:32 dlr Exp $
-->

<!ELEMENT app-data (database+)>

<!--
For: database.defaultIdMethod and table.idMethod

Do not use autoincrement or sequence. They are deprecated in favor of
using native which will use the Turbine Connection pool to determine
which database it is talking to (yes, it knows that) and then use
whatever native database methodology for insert increments that it can.
Otherwise, you should use idbroker or none. none is good if you have a
table that is just a join table. idbroker is good if you want a
centralized repository for brokering out clumps of id's in a database
agnostic way.
-->
<!ELEMENT database (table+)>
<!ATTLIST database
  name CDATA #IMPLIED
  defaultIdMethod (idbroker|native|autoincrement|sequence|none) "none"
  package CDATA #IMPLIED
  baseClass CDATA #IMPLIED
  basePeer CDATA #IMPLIED
>

<!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter)*)>
<!ATTLIST table 
  name CDATA #REQUIRED
  javaName CDATA #IMPLIED
  idMethod (idbroker|native|autoincrement|sequence|none|null) "null"
  skipSql (true|false) "false"
  abstract (true|false) "false"
  baseClass CDATA #IMPLIED
  basePeer CDATA #IMPLIED
  alias CDATA #IMPLIED
>

<!ELEMENT id-method-parameter EMPTY>
<!ATTLIST id-method-parameter
  name CDATA "default" 
  value CDATA #REQUIRED
>
  
<!ELEMENT column (inheritance*)>
<!ATTLIST column 
  name CDATA #REQUIRED
  javaName CDATA #IMPLIED
  primaryKey (true|false) "false"
  required (true|false) "false"
  type
    (
          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT
        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR
        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY
        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY
        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR
    ) "VARCHAR"       
  size CDATA #IMPLIED
  default CDATA #IMPLIED
  autoIncrement (true|false) "false"
  inheritance (single|false) "false" 
  inputValidator CDATA #IMPLIED
>

<!ELEMENT inheritance EMPTY>
<!ATTLIST inheritance
  key CDATA #REQUIRED 
  class CDATA #REQUIRED
  extends CDATA #IMPLIED
>
                  
<!ELEMENT foreign-key (reference+)>
<!ATTLIST foreign-key 
  foreignTable CDATA #REQUIRED
  name CDATA #IMPLIED
  onUpdate (cascade|setnull|restrict|none) "none" 
  onDelete (cascade|setnull|restrict|none) "none" 
>
  
<!ELEMENT reference EMPTY>
<!ATTLIST reference 
  local CDATA #REQUIRED
  foreign CDATA #REQUIRED
>

<!ELEMENT index (index-column+)>
<!ATTLIST index 
  name CDATA #IMPLIED
>

<!ELEMENT index-column EMPTY>
<!ATTLIST index-column
  name CDATA #REQUIRED
  size CDATA #IMPLIED
>

<!ELEMENT unique (unique-column+)>
<!ATTLIST unique
  name CDATA #IMPLIED
>

<!ELEMENT unique-column EMPTY>
<!ATTLIST unique-column
  name CDATA #REQUIRED
>
@


1.3
log
@Upgrading to Turbine 3.0-dev, Fulcrum 1.0, and Torque 1.0.
@
text
@d3 1
a3 1
    $Id: database.dtd,v 1.1.1.1 2001/08/02 05:08:16 jvanzyl Exp $
d78 1
d91 1
a91 1
  name CDATA #REQUIRED
@


1.2
log
@the file has moved to an uglier place
@
text
@d3 1
a3 1
    $Id: database.dtd,v 1.1 2001/02/27 01:45:45 lucas Exp $
d8 12
d23 1
d29 1
a29 1
<!ELEMENT table (column+,foreign-key*,index*,unique*,id-method-parameter*)>
d33 6
a38 1
  idMethod (idbroker|autoincrement|sequence|none) "none"
d55 5
a59 5
          BIT  | TINYINT | SMALLINT    | INTEGER    | BIGINT    | FLOAT 
        | REAL | NUMERIC | DECIMAL     | CHAR       | VARCHAR   | LONGVARCHAR 
        | DATE | TIME    | TIMESTAMP   | BINARY     | VARBINARY | LONGVARBINARY 
        | NULL | OTHER   | JAVA_OBJECT | DISTINCT   | STRUCT    | ARRAY 
        | BLOB | CLOB    | REF         | BOOLEANINT | BOOLEANCHAR 
d65 1
d78 2
@


1.1
log
@Added the ability for torque to be called from within the Helm build procedure.  The only major restructure is that the helm-schema.xml file will now live in the sql/schema directory instead of sql/org/tigris/helm.
@
text
@d3 1
a3 1
    $Id: database.dtd,v 1.15 2001/02/18 05:14:46 mcnally Exp $
@

