In this tutorial, you will quickly master the basic knowledge of MySQL, and easy to use MySQL database.
Database is a warehouse that organizes, stores and manages data according to the data structure.
Each database has one or more different APIs for creating, accessing, managing, searching, and copying saved data.
We can also store data in a file, but it is relatively slow to read and write data in the file.
So now we use a relational database management system (RDBMS) to store and manage large amounts of data. The so-called relational database is a kind of database based on relational model, which processes data in database with the help of mathematical concepts and methods such as set algebra.
RDBMS is a kind of relational database management system
- 1. The data appears in the form of table
- 2. Name of each record
- The name of each field
- 4. Many rows and columns form a form
- 5. The database is composed of several forms
Before we start to learn about MySQL database, let’s first understand some terms of RDBMS:
- Database:A database is a collection of associated tables.
- data sheet:A table is a matrix of data. A table in a database looks like a simple spreadsheet.
- Column:A column (data element) contains the same type of data, such as postcode data.
- that ‘s ok:A row (= tuple, or record) is a set of related data, such as a user’s subscription.
- redundancy: store twice the data, redundancy reduces performance, but improves data security.
- Primary key: the primary key is unique. A data table can contain only one primary key. You can use primary keys to query data.
- Foreign key:A foreign key is used to associate two tables.
- Composite bond: composite key (composite key) uses multiple columns as an index key, which is generally used for composite indexes.
- Indexes:Use indexes to quickly access specific information in database tables. An index is a structure that sorts the values of one or more columns in a database table. Similar to a catalog of books.
- Referential integrity:Referential integrity requires that references to nonexistent entities are not allowed in relationships. And entity integrity is an integrity constraint that must be satisfied by the relational model in order to ensure the consistency of data.
MySQL is a relational database management system. This so-called “relational” can be understood as the concept of “table”. A relational database consists of one or more tables, as shown in the figure
- Header: the name of each column;
- Col: a collection of data with the same data type;
- Row: each row is used to describe the specific information of a record;
- Value: the specific information of the row. Each value must be the same as the data type of the column;
- Key: the value of the key is unique in the current column.
MySQL is a relational database management system, which is developed by MySQL AB company in Sweden and belongs to Oracle company at present. MySQL is an associated database management system. The associated database stores the data in different tables instead of putting all the data in a big warehouse, which increases the speed and improves the flexibility.
- MySQL is open source, so you don’t have to pay extra.
- MySQL supports large databases. It can handle large databases with tens of millions of records.
- MySQL uses the standard SQL data language form.
- MySQL can run on multiple systems and support multiple languages. These programming languages include C, C + +, python, Java, Perl, PHP, Eiffel, ruby and TCL.
- MySQL has good support for PHP, which is the most popular web development language.
- MySQL supports large database and data warehouse with 50 million records. The maximum table file of 32-bit system can support 4GB, and that of 64 bit system is 8tb.
- MySQL can be customized, using GPL protocol, you can modify the source code to develop your own MySQL system.
This work adoptsCC agreementThe author and the link to this article must be indicated in the reprint