Using GraphViz for Database Schema Visualization
By Mihalis Tsoukalos, May 24, 2005
This article will try to combine the power of Perl and GraphViz in order to partly visualize a DBMS. I will provide a quick introduction to GraphViz, and then present the use of GraphViz for illustrating Entity Relation (ER) diagrams. Finally, I will demonstrate a Perl script for visualizing all the tables of a user in an Oracle DBMS using GraphViz.
Listing 3 table_col.sql
REM
REM Author: Mihalis Tsoukalos
REM Date: Friday 04 March 2005
REM
set echo off
set heading off embedded off verify off
set feedback off
spool table_col.log
btitle off
ttitle off
set termout off
SELECT table_name, column_name
FROM user_tab_columns
ORDER BY table_name
/
PROMPT TABLESPACES
SELECT table_name, tablespace_name
FROM user_tables
/
spool off