Doing More with phpMyAdmin (Part 2) - Looking Up the Dictionary
(Page 6 of 7 )
One of the most interesting features to be introduced in the latest version of phpMyAdmin is the ability to create a database dictionary in PDF format. For the uninformed, this is a comprehensive document that offers an overview of all the objects in a database - tables, columns, primary keys - together with a neat little relationship diagram that outlines the foreign key references between the tables.
In order to accomplish this Herculean task, phpMyAdmin leverages off the information provided when creating the foreign key relationships (discussed earlier). Table and column comments entered by the table designers are also included in the dictionary, thus making it a good reference document for all developers working with the database.
The best way to understand what a database dictionary is, is with an example. Select a database - I'll use the
accounts database created earlier - and use the
Edit PDF Pages link at the bottom of the page to obtain
this screen.
Specify a name for the PDF document, (say, “Accounting Database") and select the
Automatic layout option. After clicking
Go, the same page will reload and display some supplementary information,
as shown here.
You can now select the tables to be included in the dictionary, together with some ancillary settings related to the formatting of the relationship diagram. You can either change the locations of the tables in the final diagram using X and Y coordinates, or use the
Toggle Scratchboard button to open up a WYSIWYG editor that allows you to place each table exactly where you want it (note that this feature needs Internet Explorer 6.0 or equivalent).
Example.
You can also adjust various formatting options for the PDF file,
using the options available. - Show grid - turn the grid on or off in the relationships diagram
- Show color - turn colors on or off in the relationships diagram
- Show dimension of tables - turn the display of the table dimensions on or off in the relationships diagram
- Display all Tables with same width? - specifies whether the width of the table image be the same for all tables?
- Data Dictionary - specifies whether table descriptions should be included
- Data Dictionary Format - specifies whether the dictionary should be formatted as landscape or portrait
- Paper size - specifies the paper size to be used for creating the document
All done? Click
Go, and you should get a PDF file
which contains this.
Next: History Lesson >>
More PHP Articles
More By Harish Kamath, (c) Melonfire