What are the differences between SQL Server and Oracle and MySQL (history, application)

First, if we want to explain the difference between the three, we must first start with history.

    Oracle: Chinese translation is Oracle, which is a legendary company with a legendary big boss Larry Ellision. At the age of 32, Ellision has achieved nothing, went to three universities, did not get a degree diploma, changed more than a dozen companies, and his wife left him. Starting with just $1,200, Oracle has doubled its sales every year for 12 consecutive years.
    Oracle was founded in 1977, and the early theoretical basis came from an IBM paper "A Relational Model of Data for Large Shared Data Banks" [1]. The author CODD selects five operations of relational algebra and constructs a new data storage model based on the operations. Based on this model, Oracle has become a very typical relational database. Therefore, it has become more rigorous, safe, high-speed, stable, and more and more large.
    Due to its early birth, rigorous structure, high availability, high performance and other characteristics, it is widely used in traditional database applications. Large companies in various industries such as finance, communications, energy, transportation, retail, and manufacturing basically use Oracle. , In the early years, almost 100% of the Fortune 500 were Oracle users.
    MySQL: The original core idea of ​​MySQL is mainly open source and easy to use. Its development dates back to 1985, and the first internal release was born in 1995. By 1998, MySQL can already support 10 operating systems, including the win platform. But there are still many problems, such as the lack of support for transaction operations, subqueries, foreign keys, stored procedures and views. The following figure is a database market share as of 2006 [2]:
    As can be seen from the figure, the outbreak of MySQL actually occurred in 2001 and 2002, especially the 4.0 Beta version released in 2002. InnoDB was officially selected as the default engine, which greatly improved the transaction processing capability and data caching capability. In the same year, version 4.1 began to support subqueries, and MySQL has finally transformed into a mature relational database system. Version 5.0 in 2005 added stored procedures, server-side cursors, triggers, query optimization and distributed transaction functions, but it was copied by Oracle in the same year, and InnoDB was incorporated by Oracle. In 2008, MySQL was acquired by Sun, and in 2009, Oracle acquired Sun and MySQL.
    Due to the early positioning of MySQL, its main application scenario is Internet development. Basically, the outbreak of the Internet made MySQL, and the LAMP architecture swept the world. However, due to MySQL's pursuit of light weight, ease of use, and the lack of early transaction operations and complex query optimization, it has very little share in traditional database application scenarios.
    SQL Server: When it comes to SQL Server, people generally only think of Microsoft SQL Server, not Sybase SQL Server. SQL Server was originally stalled by three companies, Microsoft, Sybase and Ashton-Tate, and was developed for IBM's (again) company's OS/2 operating system. With the failure of the OS/2 project, everyone parted ways. Microsoft naturally turned to its own win operating system as part of the windows NT software package. Sybase focuses on database development in the direction of Linux/Unix.
    MS SQL Server is mainly for small and medium enterprises. Its biggest advantage is that it integrates various products and resources of MS company, provides a powerful visual interface, highly integrated management and development tools, and has made great achievements in the rapid construction of business intelligence (BI). MS SQL Server is an important part of MS company's software integration solution, and it has also made great contributions to the popularization of WIN system in enterprise-level applications.

2. Typical application scenarios
Regarding the "large database", there is no strict definition. Some say that the amount of data shall prevail, and some say that the recovery time shall prevail. In terms of comprehensive database application scenarios, large-scale database applications have the following characteristics: massive data, high throughput; complex logic, high computational load, and high availability. From this point of view, Oracle, DB2 is a typical large database, Sybase SQL Server is also considered. The application scenarios of the first three databases are described below.

    Oracle. The application of Oracle is mainly in the data-based business of traditional industries, such as banking, finance, and other businesses that require extremely high availability, robustness, security, and real-time performance; retail, logistics, etc., have high requirements for massive data storage and analysis Business. In addition, high-tech manufacturing industries such as chip factories are basically inseparable from Oracle; e-commerce also has many users, such as JD.com (which is defecting to Oracle) and Alibaba (planning to de-Oracle). And because of Oracle's strong support for complex computing and statistical analysis, there are more and more applications in Internet data analysis and data mining. A typical scenario is as follows:
    In the data center of a branch of a telecommunications company (non-domestic), there are 4 Oracle Sun large servers used to install the Solaris operating system and Oracle and provide computing services, and 3 Sun Storage disk arrays to Provide Oracle data storage, 12 IBM minicomputers, one Oracle Exadata server, and a 500T tape drive to store historical data, San connects to the intranet, and uses Tuxedo middleware to ensure scalability and lossless migration. Build an Oracle database that supports high concurrency, use the OLTP system to process and operate massive data in real time, build an Oracle data warehouse with high computational load, and use the OLAP system to analyze revenue data and provide automatic reports. The total budget is about $7.5 million.
    MySQL. MySQL is basically born on the Internet and grows longer than the Internet. Most of its application examples are concentrated in the direction of the Internet. MySQL's high concurrent access capability is no worse than that of large databases. At the same time, it is cheap, easy to install and use, and is deeply loved by Internet companies. And due to the open source feature of MySQL, for some applications that have special requirements on the database, targeted optimization can be achieved by modifying the code, such as SNS, LBS and other Internet services. A typical application scenario is:
    an Internet company, at the beginning of its establishment, only had a few PCs, and quickly built a website framework through the LAMP architecture. With business expansion and market expansion, it has rapidly developed into a medium-sized website with 6 Dell minicomputers. It has now taken three years to finally become the largest website in the vertical field. The planned data center has 40 Dell rack servers and a total budget of 200,000 US dollars.
    MS SQL Server. Windows ecosystem products, the advantages and disadvantages are very clear. The advantage is that it is highly integrated, and Microsoft also provides a complete set of software solutions. Basically, a set of win system is installed and it will work together. Therefore, small and medium-sized enterprises that are not so short of money but very short of IT talents will prefer MS SQL Server. For example, self-built ERP systems, business intelligence, vertical retailers, restaurants, institutions, etc.
    In 1996, Bill Gates personally took action, poached Daniel Anders from Borland, and got the C# language. Microsoft in 2002 to get http://ASP.NET. Mature .NET and Silverlight technologies have won part of the Internet market for MS SQL Server. Among them, MySpace, the world's largest social networking site, has a representative development history and can be used as a special example [3]. At its peak, it had more than 150 million registered users and 40 billion monthly visits. It should be regarded as the largest data application supported by MS SQL Server.

Three, architecture. In fact, the difference in execution is mainly the difference in architecture. It is the schema that causes the difference in interpretation, optimization, and efficiency of the same SQL during execution. This is only a rough description, not detailed:

    Oracle: Data files include: control files, data files, redo log files, parameter files, archive files, and password files. This is divided according to the file function lines, and all files are binary encoded files, which greatly improves the efficiency of the database algorithm. Due to the uniformity of Oracle file management, it is possible to specify a unified standard for parsing and optimization during SQL execution:
    RBO (rule-based optimizer), CBO (cost-based optimizer)
    through the choice of optimizers, and invincible The HINT rule of , gives great freedom to SQL optimization, and optimizes all aspects of CPU, memory, and IO resources.
    MySQL: One of the biggest features is the freedom to choose a storage engine. Each table is a file, and the appropriate storage engine can be chosen. Common engines include InnoDB, MyISAM, NDBCluster, etc. However, due to this open plug-in storage engine, such as requiring loose coupling between the database and the engine. As a result, the consistency of the file is greatly reduced. In terms of SQL execution optimization, there are some inevitable bottlenecks. It is a weakness in multi-table association, subquery optimization, statistical functions, etc., and only supports very simple HINT.
    SQL Server: The data architecture is basically divided vertically, divided into: Protocol Layer (protocol layer), Relational Engine (relational engine), Storage Engine (storage engine), SQLOS. The SQL execution process is the process of layer-by-layer analysis. The optimizer in the Relational Engine is cost-based (CBO), and its working process is very similar to Oracle. On top of the cost, it also supports a wealth of HINTs, including: connection hints, query hints, and table hints.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326378852&siteId=291194637