Specialized in database learning

Source: Internet
Author: User

1. Database design and SQL statement additions and deletions

2. Data can be advanced development view functions stored procedures food and locks

Index

3. DBA for database management

Managing MySQL Security

Database backup Restore

Backup LOG Management when replication load balancer

(1) Oracle

(2) MySQL free open source SMB and Linux Apache PHP

Lamp website Architecture

(3) SQL Server



Software development Cycle Process

1. Requirements Analysis phase ER model entity relationship

Entity relationships

2. Outline design phase

3. Detailed design phase

4. Code writing phase

5. Software Testing phase

6. Installation Deployment (Database maintenance)


MySQL command help

? View current directory available commands

? Contents server-level commands available



Use Show to view SQL information

show databases;

Use Databale dispensable;

Show tables;

Show table status; Engine Row Table Status

? Show

Show engines;

Show create table + table name;

Show CREATE DATABASE + DB name;



MySQL language structure

1.sql Language classification

Structured Query Language

(1) Data definition language DDL (Date definition language)

Defining object Table views in a database user function trigger

Create Alter drop

Eg;create Table S

(

Sid Int,

sname varchar (20)

)

ALTER TABLE s add age int default 20

(dafault default data)

drop table + list name;

(2) Data controlling language DCL (Date control Language)

Grant user access to deny users access to revoked users

Grant

Deny

Revoke

Eg:create user ' Wang ' @ ' localhost ' identified by ' a1! ';

Grant SELECT on Db.student to ' Wang ' @ ' localhost ';

Use DB

SELECT * from student;

Revoke select on db.student from ' Wang ' @ ' local ';

(2) Data manipulation language DMl

Change and delete

Select

Insert

Update

Delect



Constants and variables

1. Escape symbol \ \ n line break

2. Use single quote "'

3. Constant type

Boolean value (True 1 false 0) string number set

Eg: User variable set @name = ';

Select @name

It's going to be like the C Python nature.

Insert into table name values (variables, constants)

Slect field from table where query contents


System variables

1. Global System variables for everyone default

2. Session system variables are valid for the current user

Show GLOABL variable show global variables can be followed like ' variable name '

Show sessions variable session variables can be followed like ' variable name '

Use wildcard characters to display matching variable settings

SET @ @session. Session variable name =

SET @ @gloabl. Session variable name =

SELECT @ @session. Session variable name =

SELECT @ @session. Session variable name =




Operator

1. Arithmetic operators

+ - * / %

Select

2. Comparison operators

= > < >= <=! = <>

Can be used as a condition select * from table where field

3. Logical operators

(1) and && before and after two conditions are to meet

(2) or | | Meet one on the line

(3) Not OR!

Eg:select * from table field like ' condition


This article from "Big Plum" blog, declined reprint!

Specialized in database learning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.