First, MySQL Introduction
MySQL is the most popular relational database management system, and in Web applications MySQL is one of the best RDBMS (relational database Management system: relational databases Management systems) application software.
The so-called relational database is a database based on the relational model, which uses mathematical concepts and methods such as set algebra to process data in the database.
The RDBMS is the feature of the relational database management system (relational Management systems) :
1. Data appears in tabular form
2, each behavior various record name
3. The data field corresponding to the record name for each column
4. A number of rows and columns form a single sheet
5, a number of forms form database
Second, MySQL installation
Download the official website, Baidu installation steps, directly installed on it can be.
Third, Navicat for Mysql installation
Navicat for MySQL is a set of ideal solutions for managing and developing MySQL or MARIADB, supporting a single program that can be connected to both MySQL and mariadb. This full-featured front-end software provides an intuitive and powerful graphical interface for database management, development, and maintenance, providing a comprehensive set of tools for MySQL or mariadb novice and professional users.
Download Direct website, fool-type installation.
Iv. Connecting the database
After installing the Navicat, directly click the connection, enter the user name and password and data to establish a connection; The connection name is set by itself; The IP address is the address where the database resides; the port number defaults to 3306.
V. New Database
Vi. New Data Sheet
1. Naming rules:
- Please do not use Chinese pinyin when you are famous.
- Use underscores for multiple words.
- Do not use keywords, such as INSERT into VALUES.
Vii. commonly used SQL statements (CRUD) 1, new
Grammar:
INSERT into table_name (field1, Field2,... fieldn) VALUES (value1, value2,... valuen);
Example:
INSERT into VALUES (' product 1');
2. Delete
Grammar:
DELETE from [WHERE Clause];
Example:
DELETE from WHERE = 1;
3. Update
Grammar:
UPDATE SET field1=new-value1, field2=new-[WHERE Clause ];
Example:
UPDATE SET = ' Modify Product ' = ' at ' WHERE id=;
4. Enquiry
Grammar:
SELECT Column_name,column_name from table_name [WHERE Clause] [LIMIT N] [ OFFSET M];
Example:
SELECT * from WHERE = ' Product 1 ';
* Indicates that all fields are queried.
MySQL Learning (i)