Overview of database and SQL
cxccoder 2021-06-04 10:35:37

One 、 The concept of databases

1、DB
database (database): Storing data “ Warehouse ”. It holds a series of organized data .
2、DBMS
Database management system (Database Management System). Database is through DBMS Create and manipulate containers . Common database management system :MySQL、Oracle、DB2、SqlServer etc. .
3、SQL
Structured query language (Structure Query Language): A language designed to communicate with a database .

Two 、SQL Language classification

1、DML(Data Manipulation Language): Data manipulation statement , Used to add 、 Delete 、 modify 、 Query database records , and Check data integrity . Includes the following SQL sentence :
(1)INSERT: Add data to the database
(2)UPDATE: Modify the data in the database
(3)DELETE: Delete data from database
(4)SELECT: choice ( Inquire about ) data ( important )
2、DDL(Data Definition Language): Data definition statement , For the creation of libraries and tables 、 modify 、 Delete . Includes the following SQL sentence :
(1)CREATETABLE: Create database tables
(2)ALTER TABLE: Change table structure 、 add to 、 Delete 、 Modify column length
(3)DROP TABLE: Delete table
(4)CREATE INDEX: Index on a table
(5)DROP INDEX: Delete index
3、DCL(Data Control Language): Data control statement , Used to define access rights and security levels for users . Includes the following SQL sentence :
(1)GRANT: Grant access to
(2)REVOKE: Revoke access
(3)COMMIT: Commit transaction
(4)ROLLBACK: Transaction fallback
(5)SAVEPOINT: Set the savepoint
(6)LOCK: Lock specific parts of the database

3、 ... and 、MySQL A diagram of the program structure

image

Four 、MySQL service

1、 Start and stop MySQL service
(1) Mode one : Through computer management
Right click on the computer — management — service — To start or stop MySQL service
(2) Mode two : Through command line mode
start-up :net start mysql service name
stop it :net stop mysql service name
2、MySQL Server login and exit
(1) Sign in :mysql –h Host name –u user name –p password
(2) sign out :exit
(3) Get into mysql, Enter... On the command line : mysql –uroot –p#### ( among :#### The password )
(4) see mysql Which databases are in the database : show databases;

Please bring the original link to reprint ,thank
Similar articles

2021-08-09

2021-08-09