From: | "Michael Artz" <mlartz(at)gmail(dot)com> |
---|---|
To: | "Aaron Bono" <postgresql(at)aranya(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Storing an ordered list |
Date: | 2006-07-27 00:09:27 |
Message-ID: | e9c163070607261709t6cab87d3h2445712f9303b26b@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On 7/26/06, Aaron Bono <postgresql(at)aranya(dot)com> 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 SQL so your application may have to take on that
> burden. As a result, your application will become more complicated and
> writing reports that use the ordering will become difficult.
Yeah, that was what I wanted to avoid. I wasn't sure if there was a
common approach to this sort of problem.
> When I need something like this I go with your first approach, a simple
> order field. Unless the user is reordering a small number of items in a
> very large list and doing it frequently, is there really a need to worry
> about the number of updates? Are you worrying about a performance problem
> you will never have?
Perhaps it is unnecessary, however I wanted to start out with a decent
design that could scale if need be. Also, I'd like to support
"real-time" reordering, i.e. the user won't have to click "save" ...
as soon as they drag the item to a new position the list is updated.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Artz | 2006-07-27 00:13:03 | Re: Storing an ordered list |
Previous Message | Marc G. Fournier | 2006-07-27 00:05:17 | Re: DBD::Pg ... how would I format this prepare? |