Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: HTML output of schema

Re: HTML output of schema

From: Kent Wayson <waysonkw_at_mail.milwaukee.k12.wi.us>
Date: Wed, 13 Sep 2000 10:50:26 -0500
Message-Id: <10618.116842@fatcity.com>


> Does anyone have a script or tool which will output a database schema
> (tables, indexes, constraints) to html format?

Glenn:

I've got one (based on Oriole Corp's desc8.sql script) that outputs all tables for a user. It lists tables, columns, constraints, and indexes in an html table. I just wrote a shell script to spool through all the tables for a user and call my tweaked version of desc8.sql for each table to generate the html. Each database table is formatted as a separate html table in the page.

The shell script runs on our Unix box. When it's done, it uses the Unix cat command to add some of the html at the beginning and ending of the document. The script also generates an index page, listing all tables in alphabetical order.

It's got a few minor formatting bugs. The column name doesn't repeat, but the formats do repeat. Since there is a row for each constraint, index, etc. related to a column this can be a little annoying. For example:

        STUDENTS

PUPIL_NUMBER * NUMBER(9)    Unique Pupil Number
               NUMBER(9)    *** PK 1/1
               NUMBER(9)    *** FK <-- ADDRESSES(PUPIL_NUMBER) 1/1
SCHOOL *       NUMBER(9)    School
               NUMBER(9)    *** FK --> SCHOOLS(SCHOOL) 1/1
               NUMBER(9)    *** IDX STUDENTS_SCH_IDX 1/1
SURNAME *      VARCHAR2(30) Surname (Last Name)
               VARCHAR2(30) *** IDX IDX_STUDENTS_SN_FN 1/2
               VARCHAR2(30) *** IDX IDX_STUDENTS_SN_PN 1/2
               VARCHAR2(30) *** IDX STUDENT_IDX 1/3
               VARCHAR2(30) *** IDX UK_STUDENTS_IDX(U) 3/5


The 'fractions' show column order in a constraint or index. If anyone wants a copy of the whole package, let me know and I'll email it to you.

Kent
waysonkw_at_mail.milwaukee.k12.wi.us

Boredom, after all, is a form of criticism. Received on Wed Sep 13 2000 - 10:50:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US