On 4 April 2013 07:29, Johan Vauhkonen <johan.vauhkonen@gmail.com> wrote:
> Is it possible to dynamically create new databases and tables within them
> with Rails?
>
> Or is that a task best done manually?
>
> I'm creating an application which should allow users to store their own
> statistics information (which can and probably with time will be a lot).
> My initial thought was to give each user their own database to keep their
> data separate from each other due to the possible large quantity of data
> each user will have.
>
> Good idea? Bad idea? Other ways to do it?
What do you mean by a large quantity of data? Modern databases can
manage vast amounts of data efficiently. It is very rare for the
bottlenecks in a system to be where you expect them to be when you
start out and it is very likely that you will find that the extra work
was a waste of time. Start with a single database and make sure you
have good automated test coverage. Then in the unlikely event that
you find that you do have split the database then you can refactor the
code and the tests will help to ensure that you have not messed
anything up.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment