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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,229ea0001655d6a2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.glorb.com!gegeweb.org!usenet-fr.net!proxad.net!proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Generic Package Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1177539306.952515.222940@s33g2000prh.googlegroups.com> <1177601484.444701.171560@r35g2000prh.googlegroups.com> Date: Thu, 26 Apr 2007 20:54:14 +0200 Message-ID: NNTP-Posting-Date: 26 Apr 2007 20:54:02 CEST NNTP-Posting-Host: 83db5e34.newsspool1.arcor-online.net X-Trace: DXC=USH7U8UoY=YaAeROF2PWMQic==]BZ:af^4Fo<]lROoRQFl8W>\BH3YRkoF<@50ADNUDNcfSJ;bb[UIRnRBaCd On 26 Apr 2007 08:31:24 -0700, andrew.carroll@okstate.edu wrote: > I discovered a possble design mistake in the program I wrote for my > Master's course this semester. It's working and all that but I think > I could have saved myself many hours of work had I recognized (and > regurgitated from my undergraduate knowledge in 2002) the "is a" > concept. With respect to databases a tuple "is a" collection of > attributes and a table "is a" collection of tuples and a schema "is a" > collection of tables. I could have used a generic "collection" to > satisfy tuple, table and schema and I wouldn't have had to write code > to iterate, add, delete, etcetera from them. Uhm, these containers are quite different in nature. You cannot iterate a relational table, because there is no order defined on it. Otherwise, yes you could implement everything on the basis of an unordered set [see the set theory (:-))]. Alas, unordered sets are close to useless in practice because they are O(N). This is where your crystal abstraction gets broken by the reality. You need some indexing to improve performance. An the way you index things heavily depends on what you index. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de