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,ccec7cf654f5e8c3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!proxad.net!fr.ip.ndsoftware.net!213.239.142.2.MISMATCH!feeder.xsnews.nl!news.jgaa.com!news.hacking.dk!pnx.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: creating database Date: 08 May 2005 20:17:08 +0200 Organization: hacking.dk - Doing fun stuff with open source Sender: sparre@hugin.crs4.it Message-ID: References: <1115570998.707181.84650@o13g2000cwo.googlegroups.com> <87sm0xmxhb.fsf@insalien.org> NNTP-Posting-Host: 80.241.165.50 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: xyzzy.adsl.dk 1115576514 17090 80.241.165.50 (8 May 2005 18:21:54 GMT) X-Complaints-To: usenet@news.hacking.dk NNTP-Posting-Date: Sun, 8 May 2005 18:21:54 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Xref: g2news1.google.com comp.lang.ada:10955 Date: 2005-05-08T20:17:08+02:00 List-Id: Ludovic Brenta writes: > Your question is not specific to Ada or any particular language. It > is a design question. If I understand well, you're trying to store > a variable (and unknown at compile time) number of "things" in > memory. There are many well-known data structures to choose from, > or you could roll your own. The simplest data structure you can try > is called a "linked list". Look it up on Google. A linked list is > simple and efficient when adding new "things", but inefficient when > searching for one particular "thing". Most industrial-strength > database engines use more sophisticated data structures such as > B-trees (q.v., on Google). And some of these types of data-structures exist as a part of the standard library in the upcoming revision of the Ada standard. If you want to take a look at the current version of this extension of the standard library, "AI302" and "Ada.Containers" are the keywords to search for. In one of the most recent Ada journals (I can't remember if it was the ACM or the Ada Europe one), there was an overview of the trade-offs related to selecting different kinds of containers. That's probably a good reference for anybody choosing which variant of "Ada.Containers" to use. Jacob -- �By becoming continuous, war has fundamentally changed its character. In past ages, a war, almost by definition, was something that sooner or later came to an end, usually in unmistakable victory or defeat.� -- Nineteen Eighty-Four, George Orwell �I don't think you can win [the war on terror].� -- George W. Bush