Re: [Rails] How to structure my database
On 19 November 2011 10:11, Linus Pettersson <linus.pettersson@gmail.com> wrote:
> Thank you for the answer!
> Yes, I was thinking about just having the reseller categories (raw
> categories) as a lookup table. So for each product I import I just check
> what category it should be in.
> One issue with this is that it might get a bit messy if I would change the
> relations between a reseller category and a category. If I would change this
> I have to go through all the products and update them accordingly. If I
> would use the suggestion in my original post it would work automatically.
Yes, if there is the slightest possibility of wanting to do this then
that is the way to go.
> On the other hand, it might be very inefficient to do it like that... It
> would save some database work with a direct relation between products and my
> categories.
Don't worry about efficiency. I can virtually guarantee that the
critical issues for performance will not be those you imagine at the
start of a project. You can worry about that much later in the
unlikely event that you need to.
Colin
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home