Hello. I used to work only with the MySQL database. Now he also began to be interested in such databases as MongoDB, SQLite, NoSQL. What are their advantages over the MySQL database? Which database of the above is better to use and for what tasks? Forgive me not to kick much, just today I began to study this question.
Nevertheless, I'll start with a small kick, NoSQL is a whole class, which, by the way, includes MongoDB.
MySQL is not just a database , however, like everything else, it is a DBMS, and a relational one.
NoSQL is not a database at all, but a class of data warehouses that are not related to traditional SQL databases. So, that from the options offered by you only two remain: SQLite and MongoDb.
SQLite is an embedded SQL solution based on files. If on the fingers it is api access to data that is stored in local files by means of SQL syntax, i.e. It is not much different from classic fread / fwrite and has the same disadvantages as storing data on files.
well, now MongoDb remains - it is a data storage system based on the principle of storing documents in BSON (Binary JSON) format. Advantages:
- has distributed access to data located on several servers
- possible parallel retrieval of MapReduce data
- faster retrieval of simple data structures
- can store non-structural information
- less than more stable, not recommended for use in billing
- resource demanding - memory and disk space
- An entire collection is broken if internal functions are used that work with the data of this collection (an analogue of stored procedures). An analog is created with MyISAM.
- problems with resharding
what to use depends largely on the task and the resources available to solve it: somewhere it is better to use MongoDb, somewhere redis, somewhere Reak or Cassandra.
And for this you need to get to know them all closer ... Read blogs, deploy to the server girls, twist the settings and other little hands. Without implementing a single project on them, you can’t talk about strengths and weaknesses.
In one project I implemented, when using MongoDB, pushing it onto a virtual machine, they gave 1GB and 2 cores with the possibility of project growth prospects ... But, having gained some number of users, somewhere over a million, MongoDb began to slow down for lack of resources ... And they never gave out a dedicated server, saying that the project was done incorrectly and slows down ... so you need to be aware of the risks associated with the hardware and the software used on it