I am wondering... if you were going to create a hosted application for your clients... similar to a 37Signals app or SalesForce.com, how would you structure the database and seperation of the accounts? Would everyone''s data be in the same database (relying on the code to make sure the data does not overflow) or something else? Pointing me to any resources on the topic will be much appreciated. ~ mel --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I am working on a SaaS solution as well. My design has one database and most tables in the database has an organization_id to segregate data. On Jan 9, 9:11 pm, mel ram <mel...-IA9i2KS8NFBpEKysQ+xqfPpXobYPEAuW@public.gmane.org> wrote:> I am wondering... if you were going to create a hosted application for > your clients... similar to a 37Signals app or SalesForce.com, how > would you structure the database and seperation of the accounts? > > Would everyone''s data be in the same database (relying on the code to > make sure the data does not overflow) or something else? Pointing me > to any resources on the topic will be much appreciated. > > ~ mel--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 -~----------~----~----~----~------~----~------~--~---
Mel, Think of it this way. What kind of a maintenance headache would you have if you created a new db for every customer? Assuming you want lots of customers then you are probably going to want to minimise your operational overhead & store all data in a single db. Look at the facebook API as guide, they probably have way more users than your app will, & you can see that they seem to keep all their user data in one db. Although you never know what is going on under the hood. In its simplest form you probably want two tables, organisations & users & have the following relationships. Organisation - has many users User - belongs to organisation rgds, - matt. Tickex - the search engine for concert, theatre, and sports tickets http://www.tickex.com -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks for the feedback. I''m keep it in mind. On Jan 10, 6:29 am, Matt Stone1 <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Mel, > > Think of it this way. What kind of a maintenance headache would you have > if you created a new db for every customer? > > Assuming you want lots of customers then you are probably going to want > to minimise your operational overhead & store all data in a single db. > > Look at the facebook API as guide, they probably have way more users > than your app will, & you can see that they seem to keep all their user > data in one db. Although you never know what is going on under the hood. > > In its simplest form you probably want two tables, organisations & users > & have the following relationships. > > Organisation - has many users > > User - belongs to organisation > > rgds, > - matt. > > Tickex - the search engine for concert, theatre, and sports ticketshttp://www.tickex.com > -- > Posted viahttp://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---