Re: Generating code based on data dictionary

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 2000/01/05
Message-ID: <3873916d.2263505_at_news.demon.nl>#1/1


On Wed, 5 Jan 2000 12:36:37 -0600, "Nathan Banks" <Nathan.Banks_at_iona.com> wrote:

>Hi,
>
>My client's software is suffering from being out of synch with the schema.
>This disease appears to be rampant across the system.
>Primarily, the problem appears to be in constants used to define the upper
>and lower bounds of columns in a table. This is used in an attempt to
>validate the data prior to expending energy to update a table with faulty
>data.

Which could have been handled by check constraints on database level and no problem synching the app.

>
>I suggested the client build a meta file from which one could generate both
>C++ definitions as well as SQL which would represent the schema.
>
>This was not an acceptable solution as the schema is owned by another
>department not willing to participate in such an endeavor.
>
>Alternatively, I suggested that the C++ definitions be generated from a perl
>and sqlplus script which interrogated the data dictionary and generated the
>C++ constants from this. I have been assured that the development database
>shall remain in sync with the production database.
>
>Has anyone seen this done before and are there better ways of doing this?

1 exp rows=n followd by imp show=y and a little grepping.

2 Using TOAD ( www.toadsoft.com)

>
>Is there a system table in Oracle from which I could obtain information on
>the version of a table.
No as there are no versions. The best you can get is the creation time and the last_ddl_time.

>Is there a system table from which I could determine
>when a table was CREATEd (e.g. DBO.DBA_OBJECT)?

Hot! sys.dba_objects

>This information could be
>instrumental in generating the header file using make(1).
>
>Please reply directly (remove ".nospamonme" from reply-to address), I will
>summarise should there be sufficient interest.
>
>Cheers,
>Nathan Banks
>nathan_banks_at_consultant.com
>
>

Hth,

Sybrand Bakker, Oracle DBA Received on Wed Jan 05 2000 - 00:00:00 CET

Original text of this message