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

PHPSVN

PHPTODO

RDBMS

WebBuilder2

  • Foreign Key XML support only needs to be added to the MDB2 XML Parser and Writer.
<index>
  <name>auth_user_id</name>
  <field>auth_user_id</field>
  <field>..</field>
  <foreign>
    <on>
      <table>foo</table>
      <field>bar</field>
      <field>..</field>
    </on>
    <update>cascade|restrict|null|default|noaction</update>
    <delete>cascade|restrict|null|default|noaction</delete>
  </foreign>
</index>

  • Add the necessary MDB2 API calls in MDB2_Schema.
  • Add Foreign Key support to MDB2 methods:
    • Manager Module Class
      • createConstraint()
      • deleteConstraint()
      • listConstraints()
    • Reverse Module Class
      • getTableConstraintDefinition()

References:
http://dev.mysql.com/doc/mysql/en/innodb-foreign-key-constraints.html
http://www.postgresql.org/docs/8.0/interactive/ddl-constraints.html#DDL-CONSTRAINTS-FK

MDB2:ForeignKeys (lsmith)
Sat, 15 Apr 2006, 09:11
[ Links | Source | History | RSS ]

This site powered by YaWiki 0.22 beta.