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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6f80b41b84205927,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-09 22:13:18 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsmi-us.news.garr.it!newsmi-eu.news.garr.it!NewsITBone-GARR!fu-berlin.de!uni-berlin.de!hse-mtl-ppp74279.qc.sympatico.CA!not-for-mail From: Christopher Browne Newsgroups: comp.lang.ada Subject: Re: databases written in ada Date: 10 Aug 2002 05:13:17 GMT Organization: cbbrowne Computing Inc Message-ID: References: <3D53CE34.45F25F4@btinternet.com> <3D547FFD.3030808@cogeco.ca> NNTP-Posting-Host: hse-mtl-ppp74279.qc.sympatico.ca (64.229.208.56) X-Trace: fu-berlin.de 1028956397 42491327 64.229.208.56 (16 [125932]) X-Draft-From: ("nnvirtual:Languages" 699) X-Home-Page: http://www.cbbrowne.com/info/ X-Emacs-Acronym: Emetic Macros Assault Core and Segmentation Microsoft: Making the world a better place... for Microsoft. X-Shopping-List: (1) Contagious fruit emissions (2) Samsonite Carbonated snowbulbs (3) Resurgent companions (4) Irrelevant pincushions X-Uboat-Death-Message: BOMBED BY CORVETTE. UNABLE TO USE RADIO. SINKING. U-348. Xref: archiver1.google.com comp.lang.ada:27913 Date: 2002-08-10T05:13:17+00:00 List-Id: The world rejoiced as "Warren W. Gay VE3WWG" wrote: > tony wrote: > > but in which when something is stored then it is automatically > > stored to disk as well as being available in memory > > This comment, as worded, is difficult to understand precisely. APQ > as well as any other Ada binding to an SQL database gives you the > opportunity to insert rows, perform updates, perform deletes, or > perform SELECT queries and retrieve results. There is also the GNADE > project, which gives you the ability to do "embedded SQL" in Ada > terms. The comment is fairly readily understood, as it is commonly known in OS literature by the term "orthogonal persistence." The idea is that you have a set of datatypes which essentially "store themselves." You don't have to do a "select" or "insert" or "update" in order to get/put values. Instead, by virtue of simply having a declaration like: value1, value2 : INTEGER; Those values are directly tied to the database. If you have the code: value1 := 25; value2 := 17; value1 := value1 + value2; This would, behind the scenes, intersperse the assignments with queries that might resemble: insert into int_table (key, value) values ('value1', 25); insert into int_table (key, value) values ('value2', 17); update int_table set value = 32 where key = 'value1'; It is quite common to set up database-backed classes in Java and C++ that create this sort of tie between objects and SQL databases. The cool part is that if the program were shut down, you could [by some Really Complex magic I'll not imagine too hard about] see the program start back up, and continue where it left off, with the various variables holding their database-backed values. Presumably you could create an Ada class that would allow doing something sort of like this. Presumably you'd not want _all_ variables database-backed, as performance would Suck Spectacularly. But it's a pretty normal exercise using JDBC to design classes to let you define some "database-backed variables." It probably ought to be left as an exercise for the reader :-) -- (reverse (concatenate 'string "moc.enworbbc@" "sirhc")) http://www3.sympatico.ca/cbbrowne/linux.html "So, does this mean goodbye to the "Bluescreen of Death" and hello to the "Bluescreen of Holy Vengeance?"" -- Observed on Slashdot after hearing Al Qaeda terrorists may have hacked on Windows XP...