Understanding the concept of MySQL for the first time

The origin of MySQL

MySQL is a relational database management system developed by the Swedish company MySQL AB and is a product of Oracle. MySQL is one of the most popular relational database management systems. In terms of web applications, MySQL is one of the best RDBMS (Relational Database Management System) application software.

MySQL is a relational database management system. Relational databases store data in different tables instead of putting all data in a large warehouse, which increases speed and flexibility.

The SQL language used by MySQL is the most commonly used standardized language for accessing databases. MySQL software adopts a dual authorization policy, divided into community version and commercial version. Due to its small size, fast speed, low total cost of ownership, especially the characteristics of open source, generally small and medium-sized website development choose MySQL as the website database.
Insert picture description here

Advantages of MySQL

It is written in C and C++ and tested with multiple compilers to ensure the portability of the source code.

Support AIX, FreeBSD, HP-UX, Linux, Mac OS, NovellNetware, OpenBSD, OS/2 Wrap, Solaris, Windows and other operating systems.

Provides API for multiple programming languages. These programming languages ​​include C, C++, Python, Java, Perl, PHP, Eiffel, Ruby, Tcl, etc.

Support multi-threading and make full use of CPU resources.

The optimized SQL query algorithm effectively improves the query speed.

It can be used as a standalone application in the client-server network environment, or it can be embedded in other software as a library.

Multi-language support is provided. Common encodings such as Chinese GB 2312, BIG 5, Japanese Shift_JIS, etc. can be used as data table names and data column names.

Provide multiple database connection methods such as TCP/IP, ODBC and JDBC.

Provide management tools for managing, checking, and optimizing database operations.

Support large databases. It can handle large databases with tens of millions of records.

Support multiple storage engines.
Insert picture description here

MySQL application

1. Web site system

The Web site is MySQL's largest customer base and the most important supporting force in the history of MySQL development. This has been explained in the introduction to MySQL Server at the very beginning.

The reason why MySQL has become the most popular database management system for Web site developers is that the installation and configuration of the MySQL database are very simple, and the maintenance during use is not as complicated as many large-scale commercial database management systems and has excellent performance. Another very important reason is that MySQL is open source and can be used for free.

2. Logging system

The insert and query performance of MySQL database are very efficient. If the design is better, when using the MyISAM storage engine, the two can be mutually unlocked and achieve high concurrency performance. Therefore, MySQL is a very good choice for systems that require a large number of inserts and query logging. For example, processing user login logs, operation logs, etc., are very suitable application scenarios.

3. Data warehouse system

With the rapid growth of data in data warehouses, we need more and more storage space. The continuous growth of data volume makes statistical analysis of data more and more inefficient and more difficult. How to do? There are several main solutions here. One is to use expensive high-performance hosts to improve computing performance and high-end storage devices to improve I/O performance. The effect is ideal, but the cost is very high; the second is to copy data to multiple On a cheap pcserver that uses a large-capacity hard disk to improve the overall computing performance and I/O capabilities, the effect is acceptable, the storage space is limited, and the cost is low; the third is to split the data horizontally to use multiple cheap The pcserver and the local disk store the data. Each machine has only a part of all the data, which solves the problem of data volume. All pcservers are calculated in parallel, which also solves the problem of computing power. The calculation tasks of each machine are deployed through the intermediate agent program. , It can solve both computing performance problems and I/O performance problems, and the cost is very low. In the above three schemes, the second and third implementations, MySQL has greater advantages. Through the simple replication function of MySQL, data can be copied from one host to another, not only in the local area network, but also in the wide area network. Of course, many people may say that other databases can also do the same, not only MySQL has such a function. Indeed, many databases can do the same, but MySQL is free. Most other databases are charged according to the number of hosts or CPUs. When we use a large number of pcservers, the license fee is quite amazing. The first scheme, basically all database systems can be realized, but its high cost is not every company can afford.

4. Embedded system

The biggest limitation of the embedded environment to the software system is that the hardware resources are very limited. The software system running in the embedded environment must be lightweight and low-consumption software.

MySQL is very scalable in the use of resources, and it can run in an environment with abundant resources, or it can run normally in an environment with very few resources. It is a very suitable database system for embedded environments, and MySQL has a version specifically for embedded environments.

Insert picture description here

How to learn MySQL

As a beginner, we should master some basic MySQL grammar knowledge. For data manipulation, we only need to add, delete, modify and check, then we need to be more familiar with the basic grammar. At the same time, we also need to know how to build a table, how to delete the data of the table, how to update the data of the table, and finally we have to learn more about data query.

1. Practice more on the computer. If you want to master the database proficiently, you must practice on the computer frequently. Only in the practice on the computer can you deeply understand the use of the database. Generally, the longer the database administrator works, the more his work experience The richer, the more complex problems can be solved better based on the experience of the database administrator. The theoretical knowledge of the database can be understood more thoroughly in practice on the computer.

2. Learn to write SQL statements. SQL statements are the soul of the database. Many operations in the database are implemented through SQL statements. Only when SQL statements are used to manipulate data in the database can readers have a deeper understanding of the database.

3. Database theory knowledge cannot be lost. Database theory knowledge is the basis for learning a database. Although theoretical knowledge will be a bit boring, it is a prerequisite for learning a database. For example, database theory will indirectly involve knowledge of ER diagrams, database design principles, etc. Without understanding this knowledge, it is difficult to design a good database and tables independently. Readers can combine theoretical knowledge of the database with computer practice to learn, so that efficiency will be improved

When choosing a database, you should choose the database according to the operating system and management system. When you learn to install the MySQL database, you must first confirm the version of the operating system, and then choose whether to install the source package or the binary software.

Insert picture description here

How does MySQL help in the follow-up?

After learning MySQL, it is very helpful for hive statements in Hadoop. It can be said to be exactly the same. In fact, there is no difference in writing. Finally, when you want to learn spark, you need MySQL. Generally, we need to use it to process data. MySQL statement, so MySQL is more important, you need to learn from the foundation and continue to the peak of SQL statement, so that you can improve your professional level ability.

One word per text

Now that I have chosen, I will run hard, and all my efforts now are for future strength

Guess you like

Origin blog.csdn.net/weixin_47723732/article/details/111677812