Colin Law wrote: > You might find the arrangement using relationships is actually > significantly > simpler to develop, and with a maximum of a few thousand seats > (presumably) > you are unlikely to notice any difference in lookup. > > The fact that you talk about rows suggests that this is a concept that > is > part of your mental image of the problem, it is often best to map your > mental image of the problem into the application, it makes it a better > representation of the real world, which may be much more important than > a > few milliseconds of database lookup. > > For example, do you wish to keep the number of seats in each row > somewhere? > Put it in the rows table. > > Colin > > 2009/5/15 Tom Z Meinlschmidt <[email protected]>
Well, each row will have the same amount of possible seats. I want to store 1 if there's a seat, or 0 if there's something else, like an alley or some obstacle. a room plan wood look like 111111111 111110111 111110111 111110111 111110111 111110111 222222222 where the 1 signifies a seat, 0 signifies stairs and 2 is the screen. I came up with a model I have a class room which contains a name:string, rows:integer, seats:integer and then I have roomplan which has room_id:integer , row:integer, seat:integer, value:integer to keep those 1s and 0s... What do you think? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

