MySQL SQL Overview

MySQL SQL Overview

Database of benefits:

• data persistence

• Use a complete management system of unified management Easy

Database concepts:

DB: Database (database): "warehouse" to store data. It holds a series of organized data.

DBMS: DBMS (Database Management System). DBMS database is through the creation and operation of the vessel.

SQL: Structured Query Language (Structure Query Language). Language designed to communicate with the database

SQL Language Overview:

SQL advantages:
1, not to a specific database vendor's proprietary language, almost all
DBMS support SQL
2, easy to learn
3, though simple, but in fact is a powerful language, the flexible
use of their language elements It can be very complex and advanced database operations.

SQL language Category:

1, DML (the Data Manipulation Language): data manipulation statements to add
add, delete, modify, query the database record and checks data integrity
2, DDL (the Data Definition Language): data definition statements for the database and
tables create, modify, delete.
3, DCL (the Data Control Language): data control statements to define with
access and security level households.

DML is used to query and modify data records, including the following SQL statement:

  • INSERT: add data to the database
  • UPDATE: modify data in the database
  • DELETE: delete data in the database
  • SELECT: Select (query) data  

    SELECT is the foundation of the SQL language, the most important.

DDL defines the structure of the database, such as creating, modifying or deleting
database objects, including the following SQL statement:

  • The CREATE TABLE: Create a database table
  • The ALTER TABLE: change the table structure, add, delete, modify the column length
  • DROP TABLE: Delete table
  • CREATE INDEX: index on the table
  • DROP INDEX: Delete Index

DCL is used to control access to the database, including the following SQL statement:

  • GRANT: grant access
  • REVOKE: revoke access
  • COMMIT: to commit the transaction
  • ROLLBACK: Transaction rollback
  • SAVEPOINT: set a savepoint
  • LOCK: to lock certain parts of the database

Guess you like

Origin www.cnblogs.com/Diyo/p/11317066.html