Re: [SQL] Storing an ordered list

2006-07-28 Thread Aaron Bono
On 7/26/06, Michael Artz <[EMAIL PROTECTED]> wrote: On 7/26/06, Bruno Wolff III <[EMAIL PROTECTED]> wrote:> If you use numeric instead of int, then it is easy to insert new values.Hmm, hadn't thought about that.  How would you normally implement it? I'm thinking that, if I wanted to insert between

Re: [SQL] Storing an ordered list

2006-07-27 Thread Bruno Wolff III
On Wed, Jul 26, 2006 at 20:13:03 -0400, Michael Artz <[EMAIL PROTECTED]> wrote: > On 7/26/06, Bruno Wolff III <[EMAIL PROTECTED]> wrote: > >If you use numeric instead of int, then it is easy to insert new values. > > Hmm, hadn't thought about that. How would you normally implement it? > I'm thi

Re: [SQL] Storing an ordered list

2006-07-26 Thread Michael Artz
On 7/26/06, Bruno Wolff III <[EMAIL PROTECTED]> wrote: If you use numeric instead of int, then it is easy to insert new values. Hmm, hadn't thought about that. How would you normally implement it? I'm thinking that, if I wanted to insert between A and B, I could take (A.order + B.order)/2, whi

Re: [SQL] Storing an ordered list

2006-07-26 Thread Michael Artz
On 7/26/06, Aaron Bono <[EMAIL PROTECTED]> wrote: If you use the linked list, remember this: to reduce the updates you are going to need more code in the application as it will have to keep track of what to update and what to not update. It will also be more difficult to order the items using SQ

Re: [SQL] Storing an ordered list

2006-07-26 Thread Bruno Wolff III
On Tue, Jul 25, 2006 at 22:58:47 -0400, Michael Artz <[EMAIL PROTECTED]> wrote: > > I figure that one choice is to explicitly code the order as an integer > column in the predicate table which has the advantage of being very > easy and fast to query/order but *very* slow to reorder as all of the

Re: [SQL] Storing an ordered list

2006-07-26 Thread Aaron Bono
On 7/25/06, Michael Artz <[EMAIL PROTECTED]> wrote: What is the best way to store and ordered list that can be updatedOLTP-style?  A simplified problem is that I have an event, and theevent has an ordered list of predicates and I need to preserve theorder of the predicates.  All of the data is ente

[SQL] Storing an ordered list

2006-07-25 Thread Michael Artz
What is the best way to store and ordered list that can be updated OLTP-style? A simplified problem is that I have an event, and the event has an ordered list of predicates and I need to preserve the order of the predicates. All of the data is entered via a web application, and I would like to s