In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
First, is the relational database still viable?
In the decades since the emergence of relational database, it has been a leader in the database field. The following figure shows the statistical ranking of the world's most authoritative DB-Engines, which is mainly based on the number of keywords searched by Google and Bing search engines, the number of employees, the number of job searches, the number of questions followed on Stack Overflow, and so on:
Database ranking published by DB-Engines in June 2018
As of June 2018, among the top six databases, only the fifth MongoDB is a document database, and the rest are all relational databases, and the proportion of the top three is far ahead of other databases.
1. Advantages
Relational database is still strong after the bombardment of technological innovations such as big data, NoSQL and NewSQL, which is closely related to its inherent advantages. Its advantages are mainly reflected in the impact on developers, operation and maintenance personnel and the system itself.
Development advantage
For developers, the primary advantage of relational databases is that they are SQL-oriented.
SQL is a structured query language for relational databases. Although different relational databases have different SQL dialects, SQL based on ANSI standard is supported by most relational databases. And SQL is a database-oriented access language, which is very convenient to add, delete, change, check, authorize and manage the database. The query flexibility of SQL is very high, and it is very convenient to convert between online transaction processing (OLTP (https://www.xihefangpei.com)) and online analytical processing (OLAP).
In addition, SQL is a programming language that application development engineers must master. It is so popular that there is little chance of recruiting an application development programmer who can't write SQL at all. As a result, SQL greatly reduces the cost of recruiting developers.
In addition to the SQL language itself, various development languages also have perfect support for relational databases. Take Java as an example: JDBC is the standard interface for Java language to access database, and various relational database manufacturers provide drivers to implement JDBC interface. Engineers who develop in the Java language do not need to be aware of the differences between different relational databases, but can program according to the JDBC interface.
Because it is not easy to correspond one to one between relational database storage and object-oriented Java programs, many object-relational mapping (ORM) frameworks are used to simplify the impedance mismatch of relational object models, such as JPA and its official implementations Hibernate, MyBatis, Jooq, etc., which further simplify the daily development work of application engineers. Most of the ORM frameworks are encapsulated by JDBC and have high compatibility with various relational databases.
Advantages of operation and maintenance
Because the relational database exists for a long time, it is easy to recruit the corresponding database administrator (DBA) for each common relational database, so as to ensure the stability, security, integrity and performance of the relational database, as well as the system bottleneck of monitoring and analyzing the relational database and the rationality of the design.
Mature relational databases have their own perfect biosphere, which are used to ensure high availability, data backup, performance monitoring and analysis and other mature supporting tools. Large-scale enterprises and important business systems generally need special DBA for operation and maintenance work.
System advantage
Only time is the standard for testing the maturity and stability of the technology. After decades of tests, relational database has been used on a very large scale, and its storage engine has been very mature. The database engine based on MVCC achieves a good balance between performance and correctness, and greatly improves the efficiency of query through B+tree index. In the face of critical nodes such as data, careful selection of relational databases is the first choice for architects.
Transaction based on ACID is another strong guarantee that relational database brings to application system. ACID refers to the acronym of the four basic elements that a database transaction can execute correctly. It includes atomicity, consistency, isolation and persistence. Only the database that supports transactions can guarantee the correctness and integrity of the data to the maximum extent.
Atomicity (Atomicity). All operations in the same transaction are either completed (commit) or all are not completed (rollback) and cannot be stuck in some intermediate link. If an error occurs during the execution of the transaction, the data will be restored to the state it was before the transaction started.
Consistency (Consistency). Non-read-only transactions should encapsulate the transition of the database state from one consistent state to another. Consistent state means that the data in the database should meet integrity constraints, and the intermediate state of the transaction should not be perceived outside the transaction.
Isolation (Isolation). When multiple transactions are executed concurrently, they should not affect other transactions, as if only this one operation is executed in parallel by the database.
Persistence (Durability). After the transaction is completed, all changes made by the transaction to the database will be persisted in the database.
It is not difficult to use transactions in programming, and various development frameworks such as Spring have made it very simple and elegant at the AOP level.
2. Deficiency
The performance and access carrying capacity of relational databases are impeccable in the era of enterprise applications oriented to a single data node. However, with the rapid expansion of access volume and data volume, relational database has been difficult to become the underlying support of such a large-scale system, and even become the bottleneck of the application system.
Relational database mainly has the following three shortcomings:
The number of concurrent visits to a single node is limited. At the same time of arbitrary expansion and split of services, because the data stored in the database is stateful, it is difficult to split and expand arbitrarily like services. A single database node carries a large number of query and update requests from service nodes, which is not a peer-to-peer architecture deployment model.
The data carrying capacity of single node is limited. The carrying capacity of a single database node to data is limited. The larger the amount of data, the deeper the index created for querying the data. The depth of the index determines the number of IO accesses. The deeper the index, the slower the lookup.
The performance of distributed transactions is in serious decline. After splitting the database, you need to use distributed transactions instead of local transactions. The distributed transaction based on XA adopts two-phase commit, and the resource is locked in the preparation phase until the end of the whole transaction. When the concurrency of the system increases, the performance will deteriorate sharply.
To sum up, the deficiency of relational database is caused by the original intention of the design in the final analysis. It is not a distributed product, and it is inherently unfriendly to distributed systems, which makes it difficult to adapt to the architecture model of the Internet. In the face of stateless services that can be flexibly expanded at any time, relational databases have become a little bulky.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
[oracle@up ~] $sqlplus / as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Tue Nov 10 19:26:05 201
© 2024 shulou.com SLNews company. All rights reserved.