I. Introduction to database
1.Web Sources of data on Web pages
Graph TD Database --> Server --> Web Page
2. Database classification
① Non-relational database
A non-relational database is not strictly a database, but rather a collection of structured storage methods for data, either document or key-value equivalence.
Advantages:1, flexible format: the format of storage data can be key,value form, document form, picture form and so on, document form, picture form and so on, flexible use, wide application scenarios, and relational database only supports the basic type.2Fast speed: NoSQL can use hard disk or ram as a carrier, while relational databases can only use hard disk;3High scalability;4Low cost: NoSQL database is easy to deploy and is basically open source software.Copy the code
Disadvantages:1, does not provide SQL support, high cost of learning and using;2, no transaction processing;3, the data structure is relatively complex, complex query is a little short.Copy the code
③ Relational database
The most typical data structure of a relational database is a table, which is a data organization composed of two-dimensional tables and their connections.
Advantages:1, easy to maintain: are the use of table structure, consistent format;2Easy to use: SQL language universal, can be used for complex queries;3Complex operations: Supports SQL and can be used for very complex queries between one table and multiple tables.Copy the code
Disadvantages:1Poor read/write performance, especially efficient read/write of massive data;2Fixed table structure, flexibility slightly less;3, high concurrent read and write requirements, for traditional relational database, disk I/O is a big bottleneck.Copy the code
3. Introduction to MySQL database
MySQL is a relational database and one of the mainstream databases today. Especially in Web applications, MySQL is one of the best relational databases.
MySQL is a relational database management system. Relational databases keep data in different tables, rather than 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 the double licensing policy, which is divided into community edition and commercial edition. Due to its small size, fast speed and low total cost of ownership, especially the characteristics of open source, MySQL is generally selected as the website database for the development of small and medium-sized websites.
MySQL database installation
1. Download the MySQL installer from the official website
Website url: https://dev.mysql.com/downloads/installer/