A while back I had a couple of questions on join tables with additional
columns and I got quite a bit of help here. I'm still working on the library
app in Ramaze and I'm stuck on a piece of the design that I hope someone(s)
here can help with. Here's my tables (the relevant ones anyway).


        create_table(:users) do
            primary_key :id
            String :user_name
            String :password
            String :email
        end

        create_table(:books) do
            primary_key :id
            String :title
        end
        create_table(:locations) do
            primary_key :id
            String :location
        end

        create_table(:book_locations) do
            primary_key :id
            foreign_key :location_id, :locations
            foreign_key :book_id, :books
            Integer :total
            Integer :checked_out
        end
    end

Now I want to add a way to connect the users with the books they've checked
out. Should I add a join table between users and the book_locations table?
If so, what's the best way of doing that? If not, what's a better approach?

Thanks for all the help.

-- 
Scott
http://steamcode.blogspot.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sequel-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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to