From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bf02c238a92156a3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Windows Ada database support. Date: Thu, 9 Dec 2004 14:27:35 +0100 Message-ID: References: <5e3e03a7.0411240431.7e037a4e@posting.google.com> <1jrbh30djhwuh$.cpwm02mv7d1d.dlg@40tude.net> <18u46qzjs6s8v.19927r9ay0kkh.dlg@40tude.net> <17dywgfsz1s82.ew4d2rpmnjg9$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: individual.net ql/O5H4+/4KVijBdLPrIuAlaANdRV+Ux4MKil47v6vXO65twc= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:6865 Date: 2004-12-09T14:27:35+01:00 List-Id: On Thu, 9 Dec 2004 11:58:06 +0000 (UTC), Georg Bauhaus wrote: > Dmitry A. Kazakov wrote: >: >: But you can translate into SQL. Why Ada.Database.Relational.Foo cannot call >: My_ Fancy_DB.Execute ("BAZ ...")? I do not propose to write a new DB >: engine. > > This brings us back to the original questions :-) > >: Why should I query? It is for untyped tables. If I have an object at hand >: then I know its type and so everything I can do with it. If I don't, then I >: have another object, a container that refers to my object. That container >: again has a type and that provides operations to access its elements. > > Relations. Records In DB system, as well as records in Ada have components > which can be updated. Relations between 2 or more objects may thus depend > on time. = bad design, if you are you talking about changes unknown during design. In that case you are in trouble anyway! You have to modify all UPDATE statements if just a new column is added. Consider a memory snapshot made before changing the CPU from Intel to PowerPC. This is what your DB is worth. You can still read and write it. But data without semantics is a garbage. But if my language supports interface inheritance I can still deal with reasonable changes. I could derive new types from old bases and throw out old representations: type X is record Foo : Integer; Bar : String (...) end record; type Y is new X without Foo -- (:-)) with record Baz : Float; end record; Of course the compiler will force me to define getter and setter for Y.Foo, otherwise all class-wide methods will be lost. > However, an object's type cannot reflect this, because types > are static. You could associate one different type with each possible > combination of component values in your program... 1. No application uses all possible combinations. They have very concrete things to do. 2. Types are static but values are not. This is why T'Class works so nicely! 3. Remember, I always campaigned for MI and MD in comp.lang.ada! (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de