MDB2

PEAR::MDB2 database abstraction layer

AdvancedSearch | AreaMap ]

Search:

  MDB2 Homepage   MDB2News   Documentation   ToDo   ChangeLog   MDB2Tools  
  ToDo   Character Set   ForeignKeys   MDB2_Schema  

Username:

Password:


Areas In
This Wiki

BEPHPUG

Conferences

emPHPower

LiveUser

Main

MDB2

PDO

PEARThinkTank

PHPSVN

PHPTODO

RDBMS

WebBuilder2

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

  • {fieldDef} is:

<field>
 <name/>
 <was/>
 <type/>
 <default/>
 <notnull/>
 <autoincrement/>
 <unsigned/>
 <description/>
 <comments/>
 <length/>
</field>

  • {index} is:
<index>
 <name/>
 <was/>?
 <unique/>?
 <primary/>?
 <field>
  <name/>
  <sorting/>
 </field>+
</index>

  • {field} is:
<field>
 <name/>
 <value/> or <column/> or {function} or {expression}
</field>

  • {where} is:
<where>
 {expression}
</where>

Inner Elements LEVEL 2

  • {function} is:

<function>
 <name/>
 <value/>* or <column/>* or {function}* or {expression}*
</function>

  • {expression} is:
    • Some Operators example:
      1. NOT, AND, OR, XOR
      2. EQUAL, LIKE, LESS THAN, GREATER THAN
      3. IS NULL, BETWEEN
      4. etc.
<expression>
 <value/> or <column/> or {function} or {expression}
 <operator>OPERATOR</operator>
 <value/> or <column/> or {function} or {expression}
</expression>

Legend

  1. {tag} inner element
  2. <tag/> stands for <tag>STRING</tag>
  3. ? Zero or one
  4. * Zero or more
  5. + More than one

MDB2:MDB2_Schema (201.79.68.206)
Sun, 24 Sep 2006, 05:06
[ Links | Source | History | RSS ]

This site powered by YaWiki 0.22 beta.