In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "what can MySQL do". In daily operation, I believe many people have doubts about what MySQL can do. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what can MySQL do?" Next, please follow the editor to study!
The first question.
With regard to the first issue that does not support transactions, there are certain historical reasons. From the beginning of MySQL design, the storage engine is pluggable, allowing companies or individuals to define their own storage engine according to their own needs (of course, ordinary companies or individuals actually do not have this strength). The widely used storage engine developed by MySQL is MyISAM. MyISAM supports table locks, but does not support row locks, so it is less efficient when dealing with high concurrent write operations, and MyISAM does not support foreign keys (although foreign keys are rarely used in actual projects).
But the problem is not unsolved. This makes it necessary to say that InnoDB is another famous storage engine in MySQL.
The InnoDB storage engine was developed by Innobase Oy, a company based in Helsinki, Finland, and the InnoDB storage engine is even older than MySQL.
When InnoDB was first developed, it was developed as a complete database, so the function is very complete. After the development, the founder wanted to sell the database, but did not find a buyer.
Later, after the launch of MySQL2.0, this pluggable storage engine attracted the attention of Heikki Tuuri, the founder of Innobase Oy. After communicating with MySQL, he decided to introduce InnoDB into MySQL as a storage engine. Although MySQL supports InnoDB, it still mainly pushes its own MyISAM.
But InnoDB was so good that in 2006, he successfully attracted the attention of Oracle, and with a big wave of his hand, he bought InnoDB.
MySQL mainly pushed its own MyISAM, and its life was very bleak, and it was finally won by sun with US $1 billion in 2008, which consolidated sun's position as the leader in the open source field, but the cash ability of sun has always been weak, and sun itself was acquired by Oracle in 2009. At that time, Brother Song was still in high school. One day when he was having lunch, he saw the CCTV noon news on the TV in the restaurant, and now he still has some impressions.
After Oracle acquired sun, both InnoDB and MySQL became Oracle products, which made it very easy to integrate, and in later releases, InnoDB gradually became the default storage engine for MySQL. In the latest MySQL8, metadata tables also use InnoDB as the storage engine.
The main features of InnoDB storage engine are as follows:
Support transaction
Support for 4 levels of transaction isolation
Support for multi-version reading
Support for row-level locks
Read-write blocking is related to transaction isolation level
Support caching, caching both indexes and data
The whole table and primary key are stored in Cluster to form a balance tree.
...
Of course, it does not mean that InnoDB is necessarily good, in actual development, it is still necessary to choose whether to use InnoDB or MyISAM according to the specific scenario.
So the first problem is self-defeating.
The second question
The second question is indeed a hard wound.
If you compare MySQL to Oracle, you must feel a little worse. After all, one is free of charge, and the charge is very expensive. But the problem is not unsolved.
I believe many small friends have heard that many large domestic factories have used MySQL to store data. Large manufacturers use MySQL because they have the ability to develop their own storage engine, small factories generally do not have this strength, can not develop their own storage engine, but Oracle can not afford to use, so what to do?
In recent years, the rise of distributed database middleware can solve this problem very well. In the field of Java, there are many similar tools, such as Sharding-JDBC, MyCat and so on. Through these tools, we can realize database sub-database and sub-table, as well as dynamic expansion of data table, read-write separation, distributed transaction solution and so on. With these tools, the application scenario of MySQL has been greatly improved.
On the other hand, micro-services are popular in recent years, which is not a simple concept. The micro-service architecture divides a large project into many small micro-services, and each micro-service handles a very small part of its own things, which is more in line with the characteristics of human division of labor and cooperation. In the micro-service architecture, our demand for large tables and multi-table federated queries will be reduced, and MySQL will have more opportunities to display its talents.
Therefore, the second problem can also be solved.
According to Songge, Internet companies still use MySQL more often, and traditional software companies may prefer databases such as Oracle.
But then again, cloud computing is also a direction for the future.
At this point, the study of "what can MySQL do" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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
© 2024 shulou.com SLNews company. All rights reserved.