G
G
Gios2013-12-06 19:21:39
Ruby on Rails
Gios, 2013-12-06 19:21:39

What is the best database to use for a future project using the Ruby on Rails framework?

What is the best database to use for a future project using the Ruby on Rails framework? Which is more convenient and promising noSQL or SQL.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Stanislav Katkov, 2013-12-06
@lunaticman

There are not enough conditions in the question to correctly answer it. The base is selected based on the specifics of the project - but most often, "by default", PostgreSql is chosen. But if you have not created a database before, then it will be easiest to start with MongoDb, because. the structure of the database does not have to be thought out in advance.
There are also a bunch of other criteria by which you need to navigate when choosing a base. It is briefly described here:
www.slideshare.net/vanuganti/sqlnosql-how-to-choose
good luck

T
The Whiz, 2013-12-08
@modernstyle

The database must be used the same one that will be on the production server. So if you are planning to deploy to Heroku, Postgres is your choice!

W
webbus, 2013-12-06
@webus

In rails, there seems to be an ORM and it works on the principle of ActiveRecord. I don't know if ORM supports NoSQL, but I suspect not. NoSQL is not a panacea. If you want to store unstructured data in JSON, then you can take the latest PostgreSQL in it, their boxes for working with JSON are. Here you have NoSQL and SQL in one bottle :)
ps NoSQL is Not Only SQL, not No SQL. So don't overdo it :)

M
mardy_bum, 2013-12-06
@mardy_bum

ActiveRecord (standard ORM) does not support noSQL.
If noSQL is needed, third-party solutions can be used, for example, I had a MongoDB project running through Mongoid. I can’t say anything bad about this bundle, except that some things had to be implemented a little longer than when working with ActiveRecord. Mongoid's documentation is rather weak. In addition, it does not yet support Rails 4.
In general, if noSQL "drops" into your project and you are not afraid of small problems, then take it, and if you want stability and trouble-free development, take the good old SQL. In this case, I recommend PostgreSQL.

C
cinic, 2014-01-12
@cinic

NoSQL is more convenient and promising (for example, mongodb, through the mongoid gem).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question