Please help me find a way to embed the relational views of a database into the MySQL schema.
I have a database, with 80+ tables, linked through unenforced foreign keys to tables on the left and on the right. Each table has tables that point to it’s primary key as well as tables it points to through secondary keys.
We follow a naming convention (for the most part).
For instance:
Table: AAAA
- AAAA_ID
- AAAA_BBB_ID
Table: BBBB
- BBBB_ID
- BBBB_CCCC_ID
- BBBB_DDDD_ID
Tables: CCCC....ZZZZ
I want to subvert the need to adhere to a naming convention if possible, and I want not to rely on PHP classes to implement the schema. Is there a way to embed the relational criteria into the MySQL Database?
There is no way to embed the schema in to MySQL. Views can be created with MySQL Workbench, but those don’t work outside of that product.
My personal project sliceDB has the ability to build out the relational schema, following this naming convention, and parse it into a set of associative arrays to use any way you wish. Check it out:
http://bpanahij.github.com/sliceDB/