python27 brother still speak of the database:

 

Data: a symbolic description of things 
data value is, the result means that the objective event (objective things) viewed
is a symbol or a combination of these symbols is performed according to the nature of the objective things, the relationship between the state and the like
which may be made recorded and can be identified symbols are inductive logic of objective things

many forms: text, graphics, audio and video (both binary)
there are a variety of data, the simplest is that digital
data can be text, images, sounds, etc.? ?

database (dataBase, referred to as DB): storage warehouse data (folders)
data in a certain format stored in the computer, users can share the
convenience store, quickly find

a database management system (dataBase management system referred to as DBMS)
scientific organizations and data storage
is a large software for manipulating and managing a database, used to create, use, and maintain a database
of its database for unified management and control, to ensure the security and integrity of the database
user DBMS data by accessing the database, the database database administrators by DBMS maintenance work.
There oracle, MySQL, SQL Server, and so on
mysql is mainly used for large portals, such as Sogou, Sina, its main advantage is the open source because open source database is free,
he is now Oracle's products. (Official website to download, some large companies do with their secondary packaging)
the Oracle mainly for banks, railways, airports and so on. The database is powerful (to avoid the many risks), high software costs. Is Oracle's products.
sql server is a Microsoft product, mainly used in medium and large companies, such as Lenovo, Founder, and other (rarely used) ??

Database applications (DBAS)
on the basis of the database management system, using the syntax database management system, directly to the end-user application
library management system, personnel management systems and so

the database administrator (DBA)
database management system operator

end-user
database applications ?? user

database system (DBS)
database management system + database + database + application + database administrator ?? end users

the benefits of the database:
1. stability program: this service is located Renyiyitai machine crashes will not affect data and additional services (backup)

2. data consistency: all the data are stored together, all the data are uniform operation of the program, it will not appear the phenomenon of inconsistent data

3. concurrency: concurrent database can be good support, all programs are operating over a network database, while the database itself supports concurrent operation of the network, do not need to write our own socket

4. efficiency: using database data CRUD higher efficiency many deal with our own file

database server A computer (memory requirements is relatively high) to run the database management software,
database management software: Management - Database
Database: that folder to organize your files / Table
Table: the file used to store multi-line / multi-records

MySQL: is a widely used, free, open-source relational database management system
relational database table structure requires
the most typical data structure of a relational database is a table, and a data link between the organization of two-dimensional table consisting of
advantages:
1, easy to maintain: using a table structure is consistent format
2, easy to use: SQL common language, for complex queries
3, complicated operations: support the SQL can be used for very complex queries between a table and a plurality of Table
disadvantages:
1, read and write performance is relatively poor, especially massive data high efficiency reader
2, a fixed table structure, flexibility less impressive
3, concurrent read and write high demand, traditional relational databases, disk I / O is a major bottleneck in

the non-relational database is stored in key-value no table structure
non-relational databases strictly not a database, a data structure is an aggregate storage methods, key-value pair may be a document or other
advantages:
1, flexible format: the format of data may be stored key, value form, the form of documents, pictures, forms, etc.
2, high speed, low cost: nosql database deployment simple, basically open source software
disadvantages:
1, does not provide support sql, learning and the use of higher costs
2, no transaction
3, data structure is relatively complex, complex queries less impressive aspects

download MySQL:
Log https://dev.mysql.com/downloads/installer/ (version history)
to select Microsoft Windows
click Do wnload

typical installation:

Complete installation:

Custom Installation (selection)

Product selection (default)

modify the installation path (Chinese)

configuration (check)

password

After selecting the database can be linked to other computers

connect to the database
Operation command: bin directory, open a terminal and run mysql -uroot -p (quit or exit to exit)

GUI: Navicat

1, decompression, find the file my-default.ini
2, paste the file into the project file and renamed is my.ini
. 3, change the contents (reference document my.ini), attention must ensure format (no extra space or the like)
4, modify the directory file directory is installed after the current decompression (no \ n escape the like, can not have Chinese, no spaces)
5. save changes
6. paste the files in the directory back-extracting (and leave the original file before the amendment)
7, configure the environment variables: my computer - properties - advanced system settings - environment variables - New system variables -Path- - paste bin directory address
as an administrator to run the command prompt (find cmd, right-run as administrator):
enter mysqld install
appears Service successfully installed on behalf of the installation was successful.
continue entering: net start mysql start MySQL service
landing administrator user: mysql -uroot -p landing MySQL server
remote access MySQL server mysql -uroot -p123 -h192.168.19.2 00

view of the current user: select user ();
exit: exit;
to the current account password (must be logged on as an administrator): set password = password ( ' 123')
to create one other user:
SQL: Structured Query Language, is a special programming language (4th generation) is a standard computer language used to access and manipulate database for data access and query, update, relational database management system in October 1986, the United States national standards Institute (AESC) after SQL regulate, as a standard language for relational database management systems , but the passage of various database systems have made some changes and extensions to SQL coding specification in the course of their practice. So, in fact between the different SQL database systems can not be completely interoperable for different databases, such as hivesql, mysql, sqlserver, oracle, etc., sql syntax will be different, but similar in general





















SQL role: giving us the ability to access the database, most of the work to be performed on the database by the SQL statement to complete
SQL database query is executed for
SQL can retrieve data from the database
SQL can insert new records in the database
SQL database can be updated the data
SQL can delete records from the database
SQL can create a new database
SQL can create new tables in the database in
SQL can create stored procedures in the database,
SQL can create a view in the database,
SQL can set up tables, stored procedures, and views permissions

SQL language the five parts (in descending importance):
data query language (DQL: data query language): select
its statement, also known as "data retrieval statement" to get the data from the table, determine how the data in the application program gives
the data manipulation language (DML: data Manipulation language): inster, updata, delete
its verb statements include INSERT, UPDATE, and DELETE. They are used to add, modify, and delete rows in the table. Also called action query language for
data definition language (DDL): create, alter, drop
to create a new table or delete the table in the database; adding a table index and other
data control language (DCL): grant, revoke
its statement determines individual users and user group access to database objects
transaction processing language (TPL):
its statement ensures that all rows in the table are affected by DML statements in a timely manner to update

the first three parts must master, the two parts can now use the existing search
Also note: SQL is not case sensitive

database operations (DDL):
to create the database:
delete the database:
switch databases:
View the currently selected database:

database operations (DDL):
to create the database:
the CREATE DATABASE database name;
the CREATE DATABASE CHARSET = utf8 test101 ;
delete the database (with caution!):
DROP dATABASE database name;
show all databases:
sHOW dATABASES;
switch databases:
the USE database name;

- comments on behalf of



the Create the User "alex" @ "%" IDENTIFIED by "234";

the SELECT the User ( );

MySQL-uroot--p

Guess you like

Origin www.cnblogs.com/zhang-da/p/11928245.html