I. Relational database
Database (database) is a place where user data is stored, and when users access and manipulate data in the database, they need a db Management System,dbms
These two parts, together with the application tool, are commonly referred to as databases .
A DBMS has a data dictionary (also known as a system table) that stores key information about everything it owns, such as name, age, and so on. This information is also known as Meta Data (metadate)
In chronological order, there have been several database systems in history.
1. Web-based database
2. Hierarchical database
3. Relational database: First paradigm (1NF), second normal form (2NF), third normal form (3NF), BCN paradigm (BCNF)
4. Object-oriented database
Among them, relational database theory is the most mature and widely used.
MySQL supports the following two kinds of storage mechanisms
- Myisam:mysql early storage mechanism, not very friendly to business support
- InnoDB: Providing a storage mechanism for transaction security
If you want to display the specified storage mechanism when creating a table: ' Create database table name engine= storage mechanism name '
Two. SQL Statement Basics
Using the SQL language, programmers can generally
- Retrieving information in the database
- To update a database
- Changing the database structure
A database administrator (DBA) can
- Change system security Settings
- Add or Recycle user permissions on systems, tables
SQL statements can usually be categorized into the following types:
- Query statement: Mainly by the SELECT keyword completion, query statement is the most complex SQL, the most powerful statement
- dml-Data Manipulation Language: Retrieving or modifying data, for example: Insert,update,delete
- ddl-Data Definition Language: Define the structure of data, create, modify, delete, example: Create,after,drop
- dcl-Data Control Language: Define permissions for database users, for example: Grant,revoke
- Transaction control statement: Done mainly by commit, rollback, savapoint
SQL keyword is not case-sensitive
(1) MySQL Overview