The emergence and disappearance of domestic databases are not technical issues

Recently, the topic of localization and replacement of databases has been very hot. OSCHINA Open Source China specially invited Xue Xiaogang, chief database officer of Ouye Cloud Commerce Co., Ltd. to express his views on this topic.

Why replace Oracle?

The background of going to IOE starts with Alibaba going to IOE. I is IBM minicomputer and mainframe, O is Oracle database, and E is EMC storage. The combination of these allowed Ali to easily pass through the initial stage of technological development. This configuration combination was also the most handsome boy on this street that year. This outfit is also common among large banks and operators. The advantage of this combination is that it is stable and very stable. There may be only one disadvantage, which is that it is expensive.

As Alibaba's business increases, Alibaba people consider the cost of continuing to use it this way high. In addition, Alibaba started planning for cloud computing, so it put forward the slogan of going to IOE. This is not possible in other Internet companies. Because other Internet companies did not have IOE from the beginning, there was no need to go. Only Alibaba’s initial structure was like this. So only Ali proposed it.

Alibaba builds Alibaba Cloud and hopes users will migrate to the cloud. The core of migrating to the cloud is migrating data to the cloud. Where is the data stored after it is uploaded to the cloud? Naturally, in the database, if the database used is Oracle, then the profit may have to be allocated to Oracle (a license must be purchased). Therefore, Alibaba plans to replace Oracle with MySQL and later self-development.

From the very beginning IOE, I still often see mention of O in various conferences. It took more than ten years to get rid of I and E. Some companies have completed the removal of O, while some companies are still using O.

Then why only mention O? Then don’t you need to go to DB2 and SQLServer? Essentially, I have to go. It’s just that other databases are not as widely used as Oracle. For example, there are very few people using and maintaining DB2 now. The reason why no one mentions DB2 is because overall DB2 has been removed. Therefore, removing O in the narrow sense means removing the Oracle database, while removing O in the broad sense can actually be expanded to removing M (Americanization).

Many people today believe that it is meaningless to replace Oracle with MySQL. Because MySQL and Oracle both belong to Oracle. On some occasions, it is even mentioned to get rid of MySQL.

What is the current status of the database localization process?

Currently, under the trends of Xinchuang and Encore, domestic databases are springing up like mushrooms after a rain. There are already more than 280 databases on the ranking list of an authoritative domestic database. The actual number may be a little higher than this.

There are some localized replacements in some government, financial, and operator industries. These replacements are not just databases, but also servers, CPUs, operating systems, etc. From the publicity point of view, some are full-stack replacements, and some are partial replacements. There are also some companies or enterprises that have not been replaced. However, these are all propaganda by domestic manufacturers. As for the actual replacement situation, only the users themselves know. Even the replaced users did not carry out relevant publicity, which made the whole situation very vague. However, this process is still going on, and there will still be some systems that switch from Oracle, DB2, SQLServer and other databases to localization. It’s just that there are too many uncertainties now.

At the beginning of this year, four leaders in the database industry, TiDB, TDengine, TDSQL, and OceanBase, roughly agreed in a live broadcast that no more than 20 databases will be operating healthily in China in three years. The so-called healthy operation means that the company can have normal revenue and employees can get paid normally. Currently, there are more than 280 products in the domestic database, and some companies have several products. Even so, most products or companies will exit the stage because they are unable to make profits. Users are now aware of this and are waiting for the situation to become clear before making a choice. No company wants to see a database that has been switched over at great cost unmaintained and has to continue to be replaced again.

Some domestic databases are completely self-developed, such as Dameng, OceanBase, etc., some are modified based on MySQL, some are modified based on PostgreSQL, and some foreign source codes are purchased and then modified.

What are the difficulties in replacing Oracle?

Technically, Oracle is indeed leading the way and is a benchmark in the database field. Even our leading domestic database companies believe that there is a big gap between themselves and Oracle, and as learners, they are constantly learning from Oracle.

Oracle's leadership is not only in technology, but also in design concepts and foresight. The white paper released by the Academy of Information and Communications Technology in 2020 wrote about several major future trends in databases. At that time, these trends had already been partially or deeply implemented by Oracle. In fact, Oracle has many product lines, not just databases. The middleware, hardware, operating system, etc. are all aspects of output.

Specifically in several aspects:

Compatibility. Compatibility is an unavoidable topic when replacing domestic databases, especially for existing systems. Most important systems run on Oracle databases, so for Oracle< /span> is definitely very important, after all, it involves code changes. If during the process of replacing a domestic database, the code changes for business adaptation to the new database are too large, the lack of database functions requires the supplementation of business-side code, or the database design and business logic are changed during the process of adapting to a distributed database, etc., the development level should The resistance of the database will be very great. / The compatibility of SQL, stored procedures, triggers, etc.PLSyntax, SQLBasic

Performance. Performance has a lot to do with hardware and optimizers. There is currently no optimizer that can surpass the Oracle optimizer in this regard. Because these bottom layers are all mathematical algorithms. The database development white paper released by the Academy of Information and Communications Technology in 2021 shows that the average number of patents (including domestic and foreign patents) by my country's database companies in the database field is 38, with a maximum scale of about 500. The number of companies with a number of 0 is 19, accounting for than 24%. Companies with 0-4 patents accounted for the highest proportion of 51%, followed by companies with 5-10 patents, accounting for 14%, and companies with 21-50 patents ranked third, accounting for 12%. In terms of the number of enterprise patents, Oracle leads the world with 14,000, followed by SAP.

Stability. Oracle's stability is unquestionable, which is why it has occupied a leading position and is so widely used over the past many years. Business leaders do not want to see frequent problems with their databases. Every database problem may lead to failure, thus affecting online business. Not only do we have to face direct and indirect economic losses, but there is also pressure for accountability.

Foreign databases such as Oracle have enough global markets to focus on technical investment in database production. However, domestic database manufacturers can only involve in the limited domestic database market. They need to invest a lot of involution, vicious competition and relationship processing, and cannot concentrate on making databases. All the energy is focused on building the database. They even plan on how to survive.

The emergence of domestic databases is not a technical problem, but other factors.

Everyone in the database field knows that after the Xinchuang activity is over, there is no incentive to replace it. In the end, the domestic market cannot accommodate hundreds of suppliers, so the disappearance of most domestic databases is not a technical problem.

What domestic databases can replace Oracle?

Please explain clearly how this replacement is done? If you just shut down the system, import the data, and then modify the connection string of the database, it can be used normally and stably as before. Haven't seen or heard of it so far.

If you change a domestic database and then modify the software codes of all business systems linked to this database (this modification may be 30-100%), that is, the software is rewritten to adapt to the database or some requirements and functions are abandoned, then this is There are still some substitutions. OceanBase, TiDB, TDSQL, etc. are all available to varying degrees, and the specifics will depend on the actual situation.

The advantage of these replacements may be that they meet political requirements.

The disadvantages of these replacements are multifaceted:

Since the performance of the same hardware is not as good as that of Oracle, adding hardware will lead to an increase in costs. Or the hardware of distributed databases is more than that of centralized hardware, which leads to an increase in hardware costs.

As database features and functionality are missing, the cost of application modifications increases. This portion may account for 60%-80% of the total replacement cost. Because this is a process that mobilizes a large number of application developers to rewrite the adaptation.

Because the stability is not as good as Oracle, a large number of operation and maintenance personnel need to be added, resulting in an increase in operation and maintenance costs.

Since some domestic databases require licenses to operate, a large amount of license fees have been added. Compared with the previous purchase of Oracle licenses, which were rarely or even not purchased at all, this part of the procurement cost accounts for a large proportion.

The above costs may be several times or even dozens or even hundreds of times that of using Oracle database. The costs of the second and third items are ignored in many calculations.

How big is the gap between existing domestic databases and Oracle?

Technically, there is a generation gap between us and Oracle.

Maybe different people have different opinions. I personally feel that there are many gaps in the following aspects (but not limited to this):

DatabaseOptimizer: Some people say why Oracle is so fast. You may not know how full it is. The gray-haired mathematics professor was there studying these. Some people say: Don't push me, I can do anything if you push me. " "Yeah? , then do you do this math problem? "People really can't do anything when they are pressed, at least not mathematics. The core of various complex queries is the optimizer and statistical information. And these are all mathematical problems. Without basic investment in mathematics, it is impossible Overcoming difficulties in this field.

System architecture:Nowadays, more and more domestic databases consider the RAC architecture. After experiencing the baptism of distributed databases on the Internet, more and more users feel that centralized databases are more suitable for them. That's why various domestic database manufacturers have begun to implement RAC plans, including Dameng, Youxuan, etc. Even if distributed database manufacturers discover Oracle's various system designs during the research and development process, none of them are redundant, and they are all extremely exquisitely designed. Many of these designs were designed 30 years ago or even earlier.

On the integration of andoperating system:The database runs on the operating system. How Dealing with the CPU? The number of SQL call instruction sets is particular. Some operations are even performed directly, bypassing the operating system. These require deep knowledge of the operating system to solve.

Integration with hardware:Database must deal with storage devices. Database optimization is almost equivalent to IO optimization. So Oracle directly creates its own storage. These storages are all equipped with CPUs, which play a big role in better storage and reading of data. Building a database is an in-depth solution from top to bottom.

Grasp the trend:Multi-mode and hyper-convergence of databases are the directions in which Oracle is leading database technology. What we define as trends has basically been implemented by Oracle. Many concepts take 8-10 years from design to implementation.

How will domestic databases go in the future?

From my personal point of view, we should calm down and work on technology in a down-to-earth manner.

It is best to compete in the market without the interference of political factors and avoid the Great Leap Forward-style rush of hundreds of companies. Instead, it is better to regulate the market and allow domestic and foreign database manufacturers to compete on the same stage. Users make decisions based on their own budget, whether to choose cheap or cost-effective, and let everything return to the technology itself. Instead of using policies to restrict the entry of other products, we can only force the use of domestic products. This leads to self-isolation and external rejection. Since we use policies to restrict others, others will also restrict us. This makes it even more impossible to go out.

If it can really go global and be used abroad, then it will be the success of domestic databases. China's high-speed rail has become a business card of China because it has gone abroad.

About the Author:

Xue Xiaogang is currently the database chief of Ouye Cloud Business Co., Ltd. He has served in the government, public security, transportation, and security industries, engaged in large-scale project management, and designed and operated multiple databases with a single table of 10 billion and a single machine of 100TB. Currently responsible for high availability, business continuity and high concurrency data architecture design and operation and maintenance management.

Oracle ACE-Pro (Oracle and MySQL direction), Oracle OCP/MySQL OCP and OCP instructor. PGCE and PCP certification for PostgreSQL, PostgreSQL ACE Partner. Mo Tianlun MVP, TiDB MVA, ITPUB forum in-memory database moderator, core expert, gold medal consultant, Mo Tianlun community distinguished gold medal lecturer, member of the Expert Committee of Machinery Industry Press.

Contact the author:

 

IntelliJ IDEA 2023.3 & JetBrains annual major version update New concept "defensive programming": make yourself a stable job GitHub .com runs more than 1,200 MySQL hosts, how to seamlessly upgrade to 8.0? Stephen Chow’s Web3 team will launch an independent app next month Will Firefox be eliminated? Visual Studio Code 1.85 released, floating window Yu Chengdong: Huawei will launch disruptive products next year and rewrite industry history U.S. CISA It is recommended to abandon C/C++ and eliminate memory security vulnerabilities TIOBE December: C# is expected to become the programming language of the year Lei Jun’s paper written 30 years ago: "Computer Virus Determination Expert System Principles and Design
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/3859945/blog/10321019