comp.lang.ada
 help / color / mirror / Atom feed
From: l107353@cliffy.lfwc.lockheed.com (Garlington KE)
Subject: Re: Optimizing and Constraint Checks
Date: 1995/03/29
Date: 1995-03-29T00:00:00+00:00	[thread overview]
Message-ID: <3lcl6m$bhd@butch.lmsc.lockheed.com> (raw)
In-Reply-To: edward-2903951038050001@r-618macip27.hac.com

Ed Bruce (edward@igate1.hac.com) wrote:
: The underlining problem is how to represent enumeration types in an
: external database(that is one not implemented directly in Ada).

Without thinking about it very hard, my first impulse is to use a cross-
reference table of the Ada enumeration type values and the values used
in the database, and then bury this table in an appropriate encapsulation.
This way, you should be able to represent the enumeration values as strings,
or numbers, or whatever in the database. If the enumeration type changes,
and you code the aggregate for the cross-reference table properly, you
should be able to control changes fairly well.

I'm not exactly sure what you want done if an enueration value is replaced;
for example, if the third value changes from BLUE to YELLOW. You may want
to encode a version number somewhere in the database and in the encapsulation,
and have it check on elaboration (or some appropriate point).

This should work in Ada-anything.

--------------------------------------------------------------------
Ken Garlington                  GarlingtonKE@lfwc.lockheed.com
F-22 Computer Resources         Lockheed Fort Worth Co.

If LFWC or the F-22 program has any opinions, they aren't telling me.




  reply	other threads:[~1995-03-29  0:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-23 16:04 Optimizing and Constraint Checks Ed Bruce
1995-03-24 13:34 ` Theodore Dennison
1995-03-25 18:09   ` David Wheeler
1995-03-29  0:00   ` Ed Bruce
1995-03-24 20:15 ` Garlington KE
1995-03-26 12:01   ` Robert Dewar
1995-03-27 16:58     ` Garlington KE
1995-03-29  0:00     ` Ed Bruce
1995-03-29  0:00       ` Garlington KE [this message]
1995-03-30  0:00       ` Mike Meier
1995-04-04  0:00       ` Robert Dewar
1995-03-25 17:51 ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox