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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,ac193220dd94f402 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-02 10:41:02 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: "Juergen Pfeifer" Newsgroups: comp.lang.ada Subject: Re: Ada and Database Date: Tue, 2 Jan 2001 19:36:20 +0100 Organization: T-Online Message-ID: <92t73d$91m$06$1@news.t-online.com> References: <3A520C8A.4BC39537@edf.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.t-online.com 978460590 06 9270 hB1i2QTShYs+g 010102 18:36:30 X-Complaints-To: abuse@t-online.com X-Sender: 340028232866-0001@t-dialin.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: supernews.google.com comp.lang.ada:3568 Date: 2001-01-02T19:36:20+01:00 List-Id: > I have a some "naive" questions regarding Ada and data bases (in SQL) : > 1 - How can I implement a SQL data base in an Ada program developped > with > GNAT ? I mean is there some free package implementing a data base engine > in Ada that can directly understand a request in SQL something like : > SQL_request(" SELECT ... FROM ...."); > 2 - More generaly, but tell me if I'm wrong, I suppose that it would be > usefull to extend the Ada langage with some data base facilities, a bit > like what has been done for tasking : a clear syntax directly > understandable at upper level and consistent with the rest of the > langage, and an implementation depending on what exists on the target : > if a good database engine already exists, then simply creates a binding > (like the binding bewteen Ada tasks and some OS thread) or if nothing > exists use the one provided by the compiler (like GNAT under Ms-DOS)... > The ISO92 Standard for SQL clearly defines some of these interfaces to specific languages, especially to Ada (Ada83 in mind). One of these interfaces is the "Command Level Interface" (CLI) which has been added to the standard after 1992 (if I remember correctly around 1994 or 1995). This CLI was heavily influenced by Microsofts ODBC and most implementations of this interface are actually ODBC implementations. Another interface is embedded SQL (which is part of the original 1992 standard). Here the idea is to embed the SQL language into various host languages (Ada is one of them) and let a preprocessor translate this embedded statements into some DB specific interface calls. A further interface is so called "SQL Module Language" and there has been an associated ISO Standard "SameDL" dealing with the integration of this approach and Ada83. This was for sure the most sophisticated approach and therefore there virtually was no relevant implementation (too heavy stuff). "SameDL" has expired and probably there will be no successor dealing with Ada95. There exist of course proprietary call level APIs for various databases (OCI for Oracle, libpq for PostgreSQL etc.) and on the WEB you can find bindings to these APIs. But that's rather lowlevel and non-portable stuff. Most database vendors today don't provide embedded SQL preprocessors for Ada, I guess due to low commercial interest in such products. Just a few weeks ago a free software project codenamed GNADE has started (GNu Ada Database Environment) which tries to implement some of the standard APIs for use with GNAT. It is in a very early prototyping stage and not really usable at the moment. But maybe you want to monitor the efforts. Please have a look at http://www.snafu.de/~boavista/gnade.html or http://www.familiepfeifer.de/software/GNADE.html for some partial efforts. If you feel you can contribute, please contact me by Email. Cheers J�rgen