database.dtd: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES

database.dtd

Copyright 2011 Ziminji
Copyright 2007 Apache Software Foundation (ASF)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.



<database> Root element

This defines the database element as the root element.

<database>'s children
NameCardinality
indexAny number
tableAny number
triggerAny number
viewAny number
<database>'s attributes
NameValuesDefault
description
name
Element's model:

(index*, table*, trigger*, view*)


@name Attribute of database

This defines the database element's attributes.

Required


@description Attribute of database

This defines the database element's attributes.


<index> Child of database

This defines a index element, which is a child of the database element.

<index>'s children
NameCardinality
columnAt least one
<index>'s attributes
NameValuesDefault
description
name
table
uniquetrue, falsefalse
Element's model:

(column+)


@name Attribute of index

This defines a index element's attributes.

Required


@description Attribute of index

This defines a index element's attributes.


@table Attribute of index

This defines a index element's attributes.

Required


@unique Attribute of index

This defines a index element's attributes.

Possible values: true, false - Default value: false


<table> Child of database

This defines a table element, which is a child of the database element.

<table>'s children
NameCardinality
columnAt least one
foreign-keyAny number
<table>'s attributes
NameValuesDefault
description
name
temporarytrue, falsefalse
Element's model:

(column+, foreign-key*)


@name Attribute of table

This defines a table element's attributes.

Required


@description Attribute of table

This defines a table element's attributes.


@temporary Attribute of table

This defines a table element's attributes.

Possible values: true, false - Default value: false


<trigger> Child of database

This defines a trigger element, which is a child of the database element.

<trigger>'s children
NameCardinality
actionAt least one
columnAny number
whenAny number
<trigger>'s attributes
NameValuesDefault
advicebefore, after, instead-of
description
eventdelete, insert, update
name
table
temporarytrue, falsefalse
Element's model:

(column*, when*, action+)


@name Attribute of trigger

This defines a trigger element's attributes.

Required


@description Attribute of trigger

This defines a trigger element's attributes.


@temporary Attribute of trigger

This defines a trigger element's attributes.

Possible values: true, false - Default value: false


@advice Attribute of trigger

This defines a trigger element's attributes.

Possible values: before, after, instead-of - Required


@event Attribute of trigger

This defines a trigger element's attributes.

Possible values: delete, insert, update - Required


@table Attribute of trigger

This defines a trigger element's attributes.

Required


<view> Child of database

This defines a view element, which is a child of the database element. This element contains an SQL select statement in a CDATA block.

<view>'s attributes
NameValuesDefault
description
name
temporarytrue, falsefalse

@name Attribute of view

This defines a view element's attributes.

Required


@description Attribute of view

This defines a view element's attributes.


@temporary Attribute of view

This defines a view element's attributes.

Possible values: true, false - Default value: false


<action> Child of trigger

This defines a action element, which is a child of the trigger element. This element contains an SQL select statement in a CDATA block.


<column> Child of trigger, index, table

This defines a column element, which is a child of either the index element, the table element, or the trigger element.

<column>'s children
NameCardinality
EMPTY
<column>'s attributes
NameValuesDefault
auto-incrementtrue, false
default
description
keyprimary, unique
name
nullabletrue, false
orderASC, DESCASC
scale
size
typeBINARY, BLOB, VARBINARY, CHAR, CHARACTER, CLOB, NATIONAL_VARYING_CHARACTER, NATIVE_CHARACTER, NCHAR, NVARCHAR, TEXT, VARCHAR, VARYING_CHARACTER, DATE, DATETIME, TIME, TIMESTAMP, BIGINT, BIT, BOOL, BOOLEAN, INT, INT2, INT8, INTEGER, MEDIUMINT, SMALLINT, TINYINT, NULL, DECIMAL, DOUBLE, DOUBLE_PRECISION, FLOAT, NUMERIC, REALNUMERIC
unsignedtrue, false
Element's model:

()


@name Attribute of column

This defines a column element's attributes.

Required


@description Attribute of column

This defines a column element's attributes.


@type Attribute of column

This defines a column element's attributes.

Possible values: BINARY, BLOB, VARBINARY, CHAR, CHARACTER, CLOB, NATIONAL_VARYING_CHARACTER, NATIVE_CHARACTER, NCHAR, NVARCHAR, TEXT, VARCHAR, VARYING_CHARACTER, DATE, DATETIME, TIME, TIMESTAMP, BIGINT, BIT, BOOL, BOOLEAN, INT, INT2, INT8, INTEGER, MEDIUMINT, SMALLINT, TINYINT, NULL, DECIMAL, DOUBLE, DOUBLE_PRECISION, FLOAT, NUMERIC, REAL - Default value: NUMERIC


@unsigned Attribute of column

This defines a column element's attributes.

Possible values: true, false


@size Attribute of column

This defines a column element's attributes.


@scale Attribute of column

This defines a column element's attributes.


@default Attribute of column

This defines a column element's attributes.


@nullable Attribute of column

This defines a column element's attributes.

Possible values: true, false


@key Attribute of column

This defines a column element's attributes.

Possible values: primary, unique


@auto-increment Attribute of column

This defines a column element's attributes.

Possible values: true, false


@order Attribute of column

This defines a column element's attributes.

Possible values: ASC, DESC - Default value: ASC


<when> Child of trigger

This defines a when element, which is a child of the trigger element.

<when>'s children
NameCardinality
EMPTY
<when>'s attributes
NameValuesDefault
operand-1
operand-2
operator
Element's model:

()


@operand-1 Attribute of when

This defines a when element's attributes.

Required


@operator Attribute of when

This defines a when element's attributes.

Required


@operand-2 Attribute of when

This defines a when element's attributes.

Required


<foreign-key> Child of table

This defines a foreign-key element, which indicates a relation between the table this element is declared and another table.

<foreign-key>'s children
NameCardinality
referenceAt least one
<foreign-key>'s attributes
NameValuesDefault
description
foreign-table
name
on-deletecascade, setnull, restrict, nonenone
on-updatecascade, setnull, restrict, nonenone
Element's model:

(reference+)


@name Attribute of foreign-key

This defines a foreign-key element's attributes.

Required


@description Attribute of foreign-key

This defines a foreign-key element's attributes.


@foreign-table Attribute of foreign-key

This defines a foreign-key element's attributes.

Required


@on-update Attribute of foreign-key

This defines a foreign-key element's attributes.

Possible values: cascade, setnull, restrict, none - Default value: none


@on-delete Attribute of foreign-key

This defines a foreign-key element's attributes.

Possible values: cascade, setnull, restrict, none - Default value: none


<reference> Child of foreign-key

This defines a reference element. A foreign key is specified by one or more references which put a column in the current table and a column in the foreign table into relation.

<reference>'s children
NameCardinality
EMPTY
<reference>'s attributes
NameValuesDefault
foreign
local
Element's model:

()


@local Attribute of reference

This defines a reference element's attributes.

Required


@foreign Attribute of reference

This defines a reference element's attributes.

Required