One,
1, based on distributed file storage
2. Adding more nodes under high load can ensure the performance of the server.
3. Store the data as a document.
Second, comparison.
1, stability
2, index, the index is placed in memory, which can improve the performance of random reading and writing. If the index cannot be completely stored in memory, once the random read-write ratio is high, disks will be frequently exchanged, and the performance of MongoDB will drop sharply.
3. It takes up a lot of space, because it belongs to the typical type of space for time principle. Then its disk space will be wasted compared with ordinary database, and online compression function has not been realized so far.
When adding, deleting and modifying data frequently in MongoDB, if records change, such as data size changes, it is easy to produce some data fragments, and the results caused by fragments will appear.
One is that the index will have performance problems.
The other is that after a certain period of time, the occupied space will increase inexplicably, so it is necessary to repair the database and re-index it regularly, which will improve the stability and efficiency of MongoDB.
The latest version has achieved online compression, which is estimated to be around version 2.0. It should be able to achieve online compression and perform some operations of repairing the database in the background. In that case, the current problem will be solved.
Our big problem.
4.MongoDB has weak support for the transaction relationship between data.
5. It is inconvenient to operate and maintain
Advantages of MongoDB
1. is suitable for demand models that are not clear about the specific data format of the database or the data format of the database changes frequently, and is very friendly to developers.
2. It has a distributed file system and can be easily deployed on a server cluster.
There is a concept of Shard in MongoDB, which is convenient for server fragmentation. Every time a fragment is added, the insertion performance of MongoDB will be improved in a way close to multiple, and the disk capacity can be easily expanded.
3. With the support of map-reduce computing framework, it is also very convenient for data statistics. Similar to grouping basis
Comparison of mongodb and mysql commands The traditional relational database generally consists of three levels of concepts: database, table and record.
MongoDB consists of three levels: database, collection and document.
MongoDB has no concept of columns, rows and relationships for tables in relational databases, which embodies the characteristics of schema freedom.