Re: Generating C structures from data dictionary definitions ?

From: Garth Kennedy <garth_at_.comm.mot.com>
Date: Mon, 12 Jul 1993 22:52:32 GMT
Message-ID: <1993Jul12.225232.18643_at_lmpsbbs.comm.mot.com>


In article <21moes$ofk_at_news.cs.tu-berlin.de> ernst_at_cs.tu-berlin.de (Ernst Kloecker) writes:
>After having used Pro*C for a couple of weeks now, I find it inconvenient
>that it is quite hard to maintain consistency between the table
>definitions and the C structures in my Pro*C program.
>
>So I was thinking of a useful little tool that would generate C structures
>by reading the Oracle data dictionary. Before I start working on it :
>
>Does such a tool already exist ?
>
>Would it take a lot of work getting into the internals of Oracle to
>accomplish this task ?
>
>
>Thanks for any info, Ernst.
>--
>
>-----------------------------------------------------------------------------
>Ernst Kloecker phone: ++49-30-6181635 e-mail: ernst_at_cs.tu-berlin.de
>-----------------------------------------------------------------------------

Do you really want to do this ? It sould seem that all you would need to do would be do something similar to a define to get the table structure and characteristics of the attributes. And then pull this in to set up your  C structures.

I personally have found that some isolation between the database and internal program structures to be helpful. Do an OO type design where all of the DB calls are part of a class, and you may not need to keep the two rigidly in synchroniztion.

My two cents..

+------------------------------------------------------------------+
| Garth Kennedy       garth_at_comm.mot.com     Voice (708) 576-3786  |
| Private Systems Div. Motorola Inc.           FAX (708) 576-6028  |  
 +------------------------------------------------------------------+
-- 
+------------------------------------------------------------------+
| Garth Kennedy       garth_at_comm.mot.com     Voice (708) 576-3786  |
| Private Systems Div. Motorola Inc.           FAX (708) 576-6028  |  
+------------------------------------------------------------------+
Received on Tue Jul 13 1993 - 00:52:32 CEST

Original text of this message