MDB2_Schema
http://pear.php.net/package/MDB2_Schema
PEAR::MDB2_Schema enables users to maintain RDBMS independant schema files in XML that can be used to create, alter and drop database entities and insert data into a database.
This page is intended to be a common place for MDB2_Schema development discussion.
If you have any feature request and/or comment regarding this package please place them here.
Complete XML syntax including UPDATEs and DELETEs addition
<database>
<name/>
<create/>?
<overwrite/>?
<description/>?
<comments/>?
<table>
<name/>
<was/>
<description/>
<comments/>
<declaration>
{fieldDef}+
{index}*
</declaration>
<initialization>
<insert>
{field}+
</insert>*
<update>
{field}+
{where}?
</update>*
<delete>
{where}
</delete>*
</initialization>
</table>+
<sequence>
<name/>
<was/>?
<start/>?
<on>
<table/>
<field/>+
</on>
<description/>?
<comments/>?
</sequence>?
</database>
Inner Elements LEVEL 1
<field>
<name/>
<was/>
<type/>
<default/>
<notnull/>
<autoincrement/>
<unsigned/>
<description/>
<comments/>
<length/>
</field>
<index>
<name/>
<was/>?
<unique/>?
<primary/>?
<field>
<name/>
<sorting/>
</field>+
</index>
<field>
<name/>
<value/> or <column/> or {function} or {expression}
</field>
<where>
{expression}
</where>
Inner Elements LEVEL 2
<function>
<name/>
<value/>* or <column/>* or {function}* or {expression}*
</function>
- {expression} is:
- Some Operators example:
- NOT, AND, OR, XOR
- EQUAL, LIKE, LESS THAN, GREATER THAN
- IS NULL, BETWEEN
- etc.
<expression>
<value/> or <column/> or {function} or {expression}
<operator>OPERATOR</operator>
<value/> or <column/> or {function} or {expression}
</expression>
Legend
- {tag} inner element
- <tag/> stands for <tag>STRING</tag>
- ? Zero or one
- * Zero or more
- + More than one
This site powered by YaWiki 0.22 beta.
|