View Single Post
Old Oct 19th, 2007, 11:39 PM   #1
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
Storing an ordered list in Oracle

Surely there is some kind of built in feature for maintaining the order of a set of items?

Here's what I don't want, but I have a feeling I'll end up having to do anyway.
1. Linked list. Too much logic to replicate in any app using the database. Even just displaying the items in order would require processing of the query results.

2. Numeric indexes. Items will frequently be inserted, not just added. Displaying or paginating the sequence could be done with one query and no special processing. Shifting items down for an insert could be done with one extra query. This is actually potentially better than 1, though.

Seems like I'm having to reinvent the wheel here, so surely I'm missing something.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote