When do I know its time to stop using the Rails in-built SQLite for my development app and start looking for external DB like Postgres or MySQL?
-
Also how does it affect other components for example Heroku or Github/ Bitbucket?
-
Answer:
SQLite is an impressive database for its size, but it's really not intended for heavy loads such as you might find on a Web site that has many simultaneous users. If you expect your app to be well-used, do make sure it's backed by a decent database. Once you have a proper database in place, you'll have to keep track of the SQL scripts you use to (a) create a new instance of the database, and (b) migrate the database from an older version to a newer one, so you don't lose your existing data as you change the structure of the database. I don't know how Rails apps keep track of that; I know Grails apps use http://www.liquibase.org/ by default, which works decently. These scripts should be committed with your source, as they're effectively part of your source, even if they don't actually get deployed as part of a running Web app. I don't use Heroku, but I can see that they have https://devcenter.heroku.com/articles/heroku-postgresql, which is their database service that they provision as an add-on, so look into that if you're using them. They seem to prefer it over MySQL; they provide instructions on https://devcenter.heroku.com/articles/heroku-mysql, for instance.
Eric Bowersox at Quora Visit the source
Other answers
I would make the transition as soon as possible. It's really not as difficult as it may sound to configure a postgreSQL/MySQL database. Digital Ocean has an easy-to-follow guide for setting up a rails app with postgres: https://www.digitalocean.com/community/tutorials/how-to-setup-ruby-on-rails-with-postgres. Heroku also has a guide for using postgres if you prefer them: https://devcenter.heroku.com/articles/getting-started-with-rails4#use-postgres. Either way, I think the sooner you move on from SQLite the better.
Connor Harwood
I think you switch when the cost/benefit ratio of switching away from SQLite makes sense. I feel like the big benefit of SQLite is administration & backup, because there is none. Well, close to none. Backups are a copy/paste affair. And there is no user management. Now, that last one could also be a negative. Once your app reaches "critical mass", you will need the features of a "real" RDBMS, and that means user administration. The other big negative of SQLite is the inability to change datatypes for a column, this is my big pet peave with SQLite; The ALTER TABLE command is not fully implemented. This is the primary reason I start using Postgres on almost all projects ASAP. SQLite is awesome for quick-prototyping, throw-away kinds of apps, and it's even good for apps that have experienced a sort of "run away" success that the coders didn't expect. But once you reach a certain level of success, the things that make SQLite so awesome at smaller scale will become hinderances. I think it's up to the individuals & their particular circumstances to figure out when the costs of SQLite exceed the benefits, and it's time to switch to a full-featured RDBMS.
Paul Dacus
Related Q & A:
- When should I start my community service for high school?Best solution by Yahoo! Answers
- How do I know when I get my US passport?Best solution by travel.state.gov
- How long should I charge my phone for before using it for the first time?Best solution by Yahoo! Answers
- When will I know when I got accepted into college?Best solution by Yahoo! Answers
- When did you know it was the right time to get pregnant?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.