Home arrow PHP arrow Page 6 - Doing More with phpMyAdmin (Part 2)

Looking Up the Dictionary - PHP

phpIn the first segment of this two-part tutorial, I gave you a quick overview of some of the interesting new features available in phpMyAdmin. In this concluding segment, find out how to use phpMyAdmin to define relationships between tables, maintain a log of commonly-used queries and create entity-relationship diagrams.

TABLE OF CONTENTS:
  1. Doing More with phpMyAdmin (Part 2)
  2. The Ground Work
  3. Total Recall
  4. Tangled Relationships
  5. Bookmark Bandit
  6. Looking Up the Dictionary
  7. History Lesson
By: Harish Kamath, (c) Melonfire
Rating: starstarstarstarstar / 41
December 08, 2003

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
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.

 
 
>>> More PHP Articles          >>> More By Harish Kamath, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: