PHP Classes

File: README.txt

Recommend this page to a friend!
  Classes of Sylvia Sotomayor  >  Data Dictionary  >  README.txt  >  Download  
File: README.txt
Role: Documentation
Content type: text/plain
Description: documentation
Class: Data Dictionary
Output the structure of a MySQL database
Author: By
Last change:
Date: 4 years ago
Size: 2,344 bytes


Class file image Download
Functionality to display a data dictionary for any database on the server.
This defaults to displaying a webpage (index.php) and can also create
csv and xml files.

Developed and tested on a MySQL server; however, since it uses the PDO
library, this ought to be usable on any type of database server that a) is
supported by PDO, and b) uses the information_schema database as per the
ANSI standards.

This is for development use only. Do not use on a production server or
anywhere else publicly accessible. Like phpinfo(), this might give people
information that you don't want them to have. Use at your own risk.

files provided
    displays information_schema's data dictionary as a webpage and
    provides links to all the server's databases' data dictionaries and
    provides functionality to convert displayed data dictionary to csv or xml
    consider this as an example
    colors used: blue, gray, #ddddff
	Class: DataDictionary
	__construct($dsn, $host, $dbase, $user, $pass) 
	    creates a database connection using the PDO library and
	    uses three sql statements to get database information
	    from the information_schema database
	public functions:
	    returns the names of all databases on the server as an array
	    returns table information for the tables in a database as an array
	    returns the names of all tables in a database as an array
	    returns column information for all the tables in a database as an array
	    returns column information for a specific table as an array
	    returns the array keys for an array
	Class: DDConverter extends DataDictionary
	__construct($type, $dsn, $host, $dbase, $user, $pass)
	    calls DataDictionary and
	    based on $type, returns a csv file or an xml document
	no public functions
	Class: DDPresenter
	    html helper functions for index.php
	public functions:
	    creates list of databases as GET links
	    creates list of database tables as internal links
	createTable($array, $headers)
	    creates a table to display information