In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Rdbms:
1. Establishment and deletion of database
2. Create, delete and modify the form
3. Creation and deletion of index
4. Users and permissions
5. Addition, deletion and modification of data
6. Query
DML: data manipulation language
INSERT REPLACE DELETE UPDATE
DDL: data definition language
CREATE DROP ALTER
DCL: data control language
GRANT REVOKE
SELECT
Database management system:
Oracle Sybase Infomix
Mysql EnterpriseDB
DBMS:
Data management independence
Effectively complete data reading
Ensure the integrity and security of the data
Centralized data management
Concurrent storage and fault recovery
Reduce application development time
SQL:ANSI
Sql86 sql89 sql92 sql99
SQL command:
Analyzer plan executor
Optimizer
File access method disk Lock Manager
Format of the software package:
Format specific to the package manager
Universal binary format
source code
Rpm package: mysql mysql-server
Binary program: mysql
-u specify user name
-p specify password
-h specify mysql-server
User name: user@host user and the host on which the user is allowed, connect to mysql-server
If the client and server are on the same host, then the cUnix communication protocol
Linux:socket / var/lib/mysql/mysql.sock
Windows:memory
Quit: exit
Mysqld
Tcp:3306 user:mysql group:mysql
Installation location: / var/lib/mysql/
Mysql initialization: set up the mysql database and save the metadata information of DBMS.
Mysql: is an interactive client with two working modes.
Interactive mode
Batch processing mode
Interactive mode command category:
Client command
USE database name / / set default database
Server-side command: you must use a statement Terminator, which is a semicolon by default.
Relational database objects:
Table
Indexes
View
Constraint
Stored procedure
Storage function
Trigger
Vernier
User
Authority
Business
Tables: rows, columns
Tables: solid
Line: row
Column: field column
Field name data type type modification (constraint)
Character
CHAR (n) / / maximum of 256characters
VARCHAR (n) / / up to 65536 characters
BINARY (n) / / case sensitive
VARBINARY (n)
TEXT (n) / / text large object
BLOB (n) / / case-sensitive large objects
Numerical value
Exact value
Integer type
TINYINT
SMALLINT
MEDIUMINT
INT
BIGINT
Modifier UNSIGNED
NOT NULL
Decimal system
DECIMAL
Approximate value
FLOAT
DOUBLE
Date and time
DATE
TIME
DATETIME
STAMP
Boolean
Built in
ENUM
SET
DCL:
SELECT
GRANT
GRANT pri1,pri2.... ON DATABASE.TABLE TO 'username@host'
REVOKE
REVOKE pri1,pri2.... ON DATABASE.TABLE FROM 'username@host'
CREATE USER 'username'@'host' IDENTIFIED BY' password'
DROP USER 'username'@'host'
Host: ip
Hostname
Network
Wildcard character
_: match any single character
%: matches any character of any length
DDL:
CREATE
CREATE DATABASE dbase_name
CREATE TABLES tbase_name (col1,col2....)
ALTER
ALTER TABLE tb_name
MODIFY
CHANGE
ADD
DROP
DROP
DROP DATABASE dbase_name
DROP TABLE tb_name
DML:
INSERT
INSERT INTO tb_name (col1,col2...) VALUE (',)
UPDATE
UPDATE tb_name SET col1=value WHERE col2=value
DELETE
DELETE FROM tb_name WHERE
Choice
SELECT field FROM tb_name WHERE
View the table in the library: SHOW TABLES FROM db_name
View the structure of biao: DESC tb_name
View user authorization: SHOW GRANTS FOR 'username'@'host'
Selection and projection
Select: specify a field as the search code, make a logical comparison, and filter rows that meet the criteria
Select rows to specify filter criteria with WHERE
Projection: masking some fields
Select column
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.