Structure for the Schema Viewer/Builder
+-- code/ | |-- buildSchema.php (view source) |-- buildSchema.inc (view source) |-- viewSchema.php | +-- schema/ | | | |-- t.sql | |-- nfs.sql | +-- data/ | |--- t.sql
- Each CREATE TABLE statement goes in a separate file in the schema directory.
- Put a table's CREATE INDEX statements in the given table's file.
- If a table has data that needs to be in place upon installation, put its INSERT queries in a file in the data directory.
- The files are named for the table they relate to.
- The files are plain old ASCII text.
- Use single quotes to delimit literals.
- If a literal contains a single quote, escape it with another single quote.
You can obtain this source code and presentation as a gzipped tar file.