in reply to MySQL Table Creation using DBI
Create a few Metadata tables that are populated by Class::DBI or by other methods. Then write programs that read the Metadata and create SQL scripts on the fly. Pass parameters to this Generator so that you can generate CREATE, DROP, etc scripts or SQL queries and for specific databases or tables. Once you have this Generator program written, you only have to populate the Metadata tables to create new tables or make modification. This Metadata system is then reusable for other database projects and you can spend your time enhancing the Generator instead of writing scripts and debugging syntax.
META_MAST is the master table that contains the definition of each column. META_KYS is the table that contains the list of keys. META_REL is the table that contains relationships between tables.
First create a table called META_MAST, with the following columns:
Create a table called META_KYS:
Create a table called META_REL:
Richard
There are three types of people in this world, those that can count and those that cannot. Anon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: MySQL Table Creation using DBI
by the_Don (Scribe) on Sep 05, 2002 at 14:28 UTC | |
by richardX (Pilgrim) on Sep 06, 2002 at 05:21 UTC |