Re: A Question on query efficiency



I've a db containing two tables which every item in table one is linked [sic] to 1--200 items in table 2. <<

In RDBMS we have references; links is a concept from older network
databases.

I want to generate a report like this:

Item in table 1
---------------------------------------
1st-related Item in table2
2nd related Item in table2 <<

Another conceptual error! Tables have no ordering, so ordinal
numbering makes no sense. That is from file systems or network
databases.

I've generated a third table with a text-column to hold the report text. Using an small procedure, .. <<

The purpose of SQL is to return data. Period. It is not for
formatting it for display. You are still writing COBOL programs in
RDBMS. This is why we have report writers and front end
applications.

the third table contains a single ID field [sic: columns are not fields] which is a unique index. <<

An index is not exposed to the user; did you mimic a sequential file
by using some silly auto-numbering scheme? There is no such thing as
a magical, universal "id" data element in a correct data model; each
identifier is for a *particular* kind of entity.

Please stop writing 1950's COBOL in SQL. What you have done is take
an automobile and hitched your old horse to it.
.



Relevant Pages

  • Re: SQL
    ... >My point is that these features are useful non-persistence features ... >organization of data according to the relational model. ... appropriate data in the RDBMS. ... >> Do you have any examples of relational databases that have specific features ...
    (comp.object)
  • Re: Managing outlook archive settings using exchange/gpo
    ... Archiving or deleting items reduces the used space in the databases, ... Get the ADM files and install the Outlook 2003 ... then copy the archive.pst files to a network share for backup or other ...
    (microsoft.public.windows.server.sbs)
  • Re: Managing outlook archive settings using exchange/gpo
    ... Archiving or deleting items reduces the used space in the databases, ... Get the ADM files and install the Outlook 2003 ... then copy the archive.pst files to a network share for backup or other ...
    (microsoft.public.windows.server.sbs)
  • Re: Which non SQL Database ?
    ... two NoSQL databases that I have some experience with are MongoDB ... people in the RDBMS world call a "materialized view". ... by running JavaScript function on every document in the database. ...
    (comp.lang.python)
  • Re: How proprietary is the "COBOL file system"
    ... RDBMS is oriented toward declaratives and thus data, ... Foreign keys add a third dimension, yet no one objects to that. ... all but huge databases. ... Query expressions are a new name for multithreading. ...
    (comp.lang.cobol)