James K. Lowden wrote:
> RSmith <rsm...@rsweb.co.za> wrote:
>> ID | Next  | Data
>> 1  |   4   | 'First Row'
>> 2  |   3   | 'Eventual Fourth Row'
>> 3  |   1   | 'Last Row'
>> 4  |   5   | 'New Second Row'
>> 5  |   2   | 'New Third Row'
>
> The first question I'd have is:  Where are the ordering criteria, and
> why aren't they in the database?  Someone is imposing an order, but
> the basis for it is not included in the database design.
>
> You're generating information instead of recording it.  Include that
> information, and the problem is converted to  nonproblem.

Imagine an MP3 playlist like this:

  Hypnoise          Logical Structures Database
  Graham Cooke      Everything Makes Sense When Everything Is Relational
  Cytadela          Red Sql
  Rj                Schema Things
  Sunny Sweeney     From A Table Away
  Play New Moments  Queries Are the Wave
  Beehaus           Select Baker
  Little Champions  Transactions + Replications
  Shores of Null    Kings of Null

If the ordering is specified by someone doing drag&drop in a list, or
by saying "insert the new entry after *that one*", then there is no
better ordering criteria than the relative order of the entries.

Of course, such lists tend to be short enough that the implemtation does
not really matter, and that an always-updated SortOrder would work just
fine.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to