On May 16, 7:21 am, Albus Dumbledore <[email protected]> wrote:
> More precisely I wonder where should the `position` column go? To me it
> looks like it should go with the table having the foreign keys, i.e.
> `todo_items` table.

Correct - it is the items that are ordered with respect to each other.

> Then it would seem that there would be no need for a
> `todo_lists` table, right? So it would be all about the todo_items
> table.

You could conceivably do that (and have the todo_list_id just being an
identifier for splitting the items into different lists rather than a
foreign key), but in most use cases you'd want to track some per list
information (for example who created it, the name of the list etc.)

Fred

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to