Re: retrieve rows in a specified order

From: Paul <>
Date: Sun, 21 Dec 2003 17:11:35 -0000
Message-ID: <> says...

> > Imagine that each row represents one product in a shop. Now I need to
> > let the shop owner decide in which order the products appear on a web
> > page. He needs to be able to freely change this order at any time and
> > move any product to any position he wants.

> If you are compelled to use a relational database, then you would need to
> add an attribute that is used for ordering. Relational databases tend to
> have lots of attributes and tons of tables not necessary in other flavors of
> data storage systems.

OK, so your first point is that adding a field is overly complex in some way?  

> So, if you may select any database, then you might want to select one that
> can store ordered collections. Your product table would then not be
> ordered, but a table that stores your web pages could include ordered
> collections of foreign keys to the product database. Databases that would
> permit this are just about all except relational: XML databases (Berkeley
> DB-XML or Xindice, for example), object databases, PICK (such as IBM U2)
> databases and others (adabas, progress?).

Now I'm confused.

First you say that adding an Order_By_Field field to a db is too complex, then you go on to propose what, to me, looks like a very complex solution for what is a relatively simple task.

How is *_ANY_* system supposed to know how to order the products unless you tell the system? AIUI, you are saying to do by "ordered collections of foreign keys to the product database", whatever that means!

Somewhere in the system, an ordering is going to have to be stored.

> Even relational databases now permit arrays or other types of collections in
> attributes. However, SQL-99 is not implemented far and wide (in particular,
> it is not used for ODBC). The non-relational databases typically
> normalize-on-the-fly for SQL or ODBC so that the nested data can be seen
> either as stored or in 1NF.

Can you expand on what you mean here exactly? What is normalising on the fly?


> --dawn


plinehan  x__AT__x  yahoo  x__DOT__x  com

C++ Builder 5 SP1, Interbase IBX 5.04 W2K Pro

Please do not top-post.
Received on Sun Dec 21 2003 - 18:11:35 CET

Original text of this message