PHP Classes

Data Dictionary: Output the structure of a MySQL database

Recommend this page to a friend!

  Author Author  
Picture of Sylvia Sotomayor
Name: Sylvia Sotomayor <contact>
Classes: 1 package by
Country: United States United States
Age: ???
All time rank: 2693361 in United States United States
Week rank: 577 Up63 in United States United States Up

  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This package can output the structure of a MySQL database.

The main class performs queries to retrieve the list of databases in a MySQL server, the information and the list of tables of a database, and the information and list of fields of a table.

It uses the PDO extension access a MySQL server but it can be adapted to support other types of database servers.

The package comes also with separate classes to display the retrieved databases, tables and fields in HTML tables, as well export that information in XML or CSV formats.

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

  Classes of Sylvia Sotomayor  >  Data Dictionary  >  Download Download .zip .tar.gz  >  Support forum Support forum (2)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Data Dictionary
Base name: data-dictionary
Description: Output the structure of a MySQL database
Version: 1.0.0
PHP version: 5.0
License: Free for non-commercial use
All time users: 765 users
All time rank: 4390
Week users: 0 users
Week rank: 197 Equal
  Groups   Rate classes User ratings   Applications   Files Files  

Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Databases Database management, accessing and searching View top rated classes

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (95%) Good (90%) Good (80%) Good (80%) - - Sufficient (72%) 258
Month: Not yet rated by the users

  Applications that use this package  
No pages of applications that use this class were specified.

Add link image If you know an application of this package, send a message to the author to add a link here.

  Files folder image Files  
File Role Description
Plain text file DataDictionary.class.php Class Data Dictionary main class
Plain text file DDConverter.class.php Class Converts Data Dictionary to csv or xml
Plain text file DDPresenter.class.php Class HTML helper class
Accessible without login Plain text file index.php Example main example page
Accessible without login Plain text file README.txt Doc. documentation
Accessible without login Plain text file schemas.css Data style sheet

Install with Composer Install with Composer - Download Download all files: data-dictionary.tar.gz
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.
For more information send a message to info at phpclasses dot org.