Database Scene Selection

Source: Internet
Author: User
Tags sqlite

This article does not discuss SQLite, this thing is almost as XML configuration to use, that is, some of the software configuration can be used to save, although it read and write fast, but it is a lot of database of necessity (full transaction) does not support, the measurement database is not just read and write performance, and finally, The project how to fit how to use it, there is no special restrictions.

SQLite Disadvantage:

1. Write granularity is coarse, write is the full table exclusive lock, will lock the other connection's write operation until the completion of writing, so high concurrency to be finished.

2. File I/O-based, direct read and write DB file, lack of management and optimization, there is no network connection database this layer, lack of security.

SQLite Advantages:

1. Based on file Io, fast.

2. Simple, no configuration, mobile and embedded side is the best use.

Other databases are based on network connections, so bottlenecks are mostly stuck on network IO. So it feels slow.

First, the database selection should consider the following issues:

1. What are the requirements for data Consistency (ACID) (the higher the requirement, the less appropriate to use MySQL), and if it is a payment correlation, it should be Oracle

2. What are the requirements for data protection (the higher the requirement, the less appropriate to use MySQL)

3. How the data reads and writes (the higher, the more you need to consider using MySQL)

4. What is the size of the data (smaller data is MySQL-only, medium-sized, Oracle may be more economical, and when it is large, it needs to be considered at the overall architectural level)

5. How frequently business changes (frequent business changes mean frequent data structure changes mean higher relative costs of using MySQL)

6. What are their technical capabilities (Oracle's third-party services are better, they do not have the technical capabilities to compare NB, or the use of mature products Oracle is more appropriate)

Of course, the birth of the relational database, mainly for the enterprise design, because the enterprise internal system needs change unpleasant, so with a two-dimensional table structure of the relational database (RDBMS) is appropriate, and with this year's internet Big Data and other Web applications, has spawned a bunch of nosql database (non-relational), Because data structures are more flexible, they are more suitable for scenarios where demand changes quickly.

Example:

If it is an intranet project, it also has hundreds of terminals every day, then MySQL is a good choice. Now the hot start-up Web application Internet companies also use MySQL, the user is not too much also shows and views

And, of course, in the end, there may be a reason for the money (one):

References

https://www.zhihu.com/question/29088685

https://www.zhihu.com/question/31417262

https://www.zhihu.com/question/22798301

https://www.zhihu.com/question/21771941

Database Scene Selection

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.