Thread: Database schema dumper

Database schema dumper

From
felix@crowfix.com
Date:
I'd like to dump a database schema to a file, probably XML but
anything reasonable is good enough.  By "schema", I don't mean the
narrow postgres keyword, but rather the table names, columns,
foreignkeys, triggers, constraints, etc.

I'd really like something that could work for other databases too,
including O-----, M----, etc.  But that might be asking too much.

A quick google for variations on "dump database schema" didn't find
much.

Whether it be a CPAN module, Java class, etc, or a standalone program,
none of that matters much.

--
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

Re: Database schema dumper

From
Thomas Kellerer
Date:
felix@crowfix.com wrote on 30.06.2009 00:08:
> I'd like to dump a database schema to a file, probably XML but
> anything reasonable is good enough.  By "schema", I don't mean the
> narrow postgres keyword, but rather the table names, columns,
> foreignkeys, triggers, constraints, etc.
>
> I'd really like something that could work for other databases too,
> including O-----, M----, etc.  But that might be asking too much.


Take a look at my SQL Workbench/J, especially the WbReport command:

http://www.sql-workbench.net/index.html

http://www.sql-workbench.net/manual/wb-commands.html#command-schema-report

Regards
Thomas

Re: Database schema dumper

From
Scott Marlowe
Date:
On Mon, Jun 29, 2009 at 4:08 PM, <felix@crowfix.com> wrote:
> I'd like to dump a database schema to a file, probably XML but
> anything reasonable is good enough.  By "schema", I don't mean the
> narrow postgres keyword, but rather the table names, columns,
> foreignkeys, triggers, constraints, etc.
>
> I'd really like something that could work for other databases too,
> including O-----, M----, etc.  But that might be asking too much.

Have you tried pg_dump -s yet?

Re: Database schema dumper

From
felix@crowfix.com
Date:
On Mon, Jun 29, 2009 at 04:32:46PM -0600, Scott Marlowe wrote:

> Have you tried pg_dump -s yet?

Wellll .... I know I said the format is immaterial, and I know I could
write something to convert it into something more useful, but it is on
the low end of what I was looking for, and is very much PostgreSQL
only, not any chance of converting it for use with other databases.

--
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

Re: Database schema dumper

From
felix@crowfix.com
Date:
On Tue, Jun 30, 2009 at 12:21:22AM +0200, Thomas Kellerer wrote:

> Take a look at my SQL Workbench/J, especially the WbReport command:
>
> http://www.sql-workbench.net/index.html
>
> http://www.sql-workbench.net/manual/wb-commands.html#command-schema-report

That just may do the trick.  I'll explore it a bit tonight.  Looks
like a lot of work has gone into it.

--
            ... _._. ._ ._. . _._. ._. ___ .__ ._. . .__. ._ .. ._.
     Felix Finch: scarecrow repairman & rocket surgeon / felix@crowfix.com
  GPG = E987 4493 C860 246C 3B1E  6477 7838 76E9 182E 8151 ITAR license #4933
I've found a solution to Fermat's Last Theorem but I see I've run out of room o

Re: Database schema dumper

From
Mirko Sertic
Date:
Hi

Try Mogwai ERDesignerNG. it can reverse engineer databases like
Postgres, Oracle, MySQL, MSSQL, stores its model as XML files and can
also generate DDL from it.
Supporting schema comparison, schema evolution and data dictionaries.

Regards
Mirko

felix@crowfix.com schrieb:
> I'd like to dump a database schema to a file, probably XML but
> anything reasonable is good enough.  By "schema", I don't mean the
> narrow postgres keyword, but rather the table names, columns,
> foreignkeys, triggers, constraints, etc.
>
> I'd really like something that could work for other databases too,
> including O-----, M----, etc.  But that might be asking too much.
>
> A quick google for variations on "dump database schema" didn't find
> much.
>
> Whether it be a CPAN module, Java class, etc, or a standalone program,
> none of that matters much.
>
>


Re: Database schema dumper

From
"Joshua J. Kugler"
Date:
On Monday 29 June 2009, felix@crowfix.com said something like:
> I'd like to dump a database schema to a file, probably XML but
> anything reasonable is good enough.  By "schema", I don't mean the
> narrow postgres keyword, but rather the table names, columns,
> foreignkeys, triggers, constraints, etc.
>
> I'd really like something that could work for other databases too,
> including O-----, M----, etc.  But that might be asking too much.
>
> A quick google for variations on "dump database schema" didn't find
> much.
>
> Whether it be a CPAN module, Java class, etc, or a standalone
> program, none of that matters much.

You mentioned CPAN, so I assume you're comfortable with Perl.  It's Pg
specific, but it's a GREAT utility:

http://www.rbt.ca/autodoc/

Does output in HTML, Dot, Dia,, and XML.

j

--
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0xDB26D7CE