Installation of MySQL database

First, the basic part

1. What is the database

Before the study, the data to be stored permanently, such as user registration user information are stored in a file, and the file can only exist on a single machine.

If we do not consider the efficiency of read from the file data, and assuming our program all components are running on a machine, then access the data file, and there is no problem

The problem to be considered is: program execution efficiency depends on the hardware carrying it, the performance of a machine and the machine is always finite, limited by the current level of hardware, there is a limit vertical expansion. So we can only enhance the overall performance of our system through horizontal expansion, which requires us to the various components of the program are distributed across multiple machines execution.

It should be noted that, although the program will be distributed to the various components of each machine, but each component is still a whole, meaning, all the components or data to be shared. But the components on each machine can only operate files of the machine, which led to the inevitable inconsistency of data.

So we thought of the separation of data and applications: the files are stored in a machine, and then multiple machines over the network to access files on this machine, namely a shared folder on this machine, it means sharing the competition, data unsafe happens, we need to lock handle. . . .

In order to deal with remote access and share files on this machine, we must write our program extra piece of code that performs the following functions:
`` `Python
1. remote connection
2. Open the file
3. read-write (lock)
4. close the file

We need to write any program code, so we extract the code, written in a specialized processing software, which is the origin mysql database management software and so on, but mysql solve more than just data sharing, as well as queries efficiency, security and other issues, in short, the programmer freed from data management to focus on writing your own program logic.

2. Database Overview

♥ What is the data? (Data)

Data: Symbol Description affairs records, symbols describe things can be both digital, it can be text, pictures, images, sounds, language, data from a variety of forms, they can be digitally stored after computer

In a description of a computer object, it is necessary to extract the typical characteristics of things, the composition of a record, the file is equivalent to a single line, such as:

1 haiyan female 20 Gansu Department of Computer Science
simply a record and did not make any sense, if we are separated by a comma, followed by the definition of the meaning of each field

id name sex age adderess major # field
1 haiyan female 20 Gansu computer-based record #

  • oct, to convert decimal to octal

    v = oct(8)
    print(v)   #0o10
  • int, the other binary conversion to decimal

Guess you like

Origin www.cnblogs.com/wanghuijie1/p/11423241.html