Colin Law wrote: > I know it is not the question you want the answer to but I feel there is > something not right about the database organisation. Warning bells ring > when > you say that you have stocks in two tables.
Bells of all sorts... Users may have multiple "lots" of the same stock purchased at different times and prices, which affects the decision to hold or sell specific "lots"... User has_many lots Lot belongs_to user belongs_to stock # simple user_id, stock_id is insufficient? may also want to include purchase date, quantity, purchase price, minimum hold period, blah, blah, blah Stock has_many lots Fun, fun, fun... -- 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 -~----------~----~----~----~------~----~------~--~---

