Basic theory of mysql-relational database (04)

Source: Internet
Author: User

DBMS (Database Management System) data management systems

RDBMS (relational database Management system) relational databases management systems


The organizational structure of the data:

Hierarchical type

Mesh type

Relational (two-dimensional relational table) Note: A table may exist in the system with multiple files.

Relationships: Relational algebra operations

Projection: outputs only specified properties

Select: Output only rows that match the criteria

Natural connection

Descartes Set

Intersection

and set

Subtraction

Complete

Complement set

In the MySQL definition, there are some rules that maintain the integrity of the database, that is, the constraint of the table:


    • PRIMARY KEY constraint (PRIMARY key): A field uniquely identifies the entity to which this field belongs, not an empty

Single Fields primary key field name data type PRIMARY key

Multi-field Primary key PRIMARY key (field 1, Field 2 ...) )

    • FOREIGN KEY constraint (FOREIGN key): Referential integrity constraint


    • non-empty constraint (NOT NULL): The value of the field cannot be null

Field name data type not NULL

    • uniqueness Constraint (unique): The value of a field cannot recur

Field name data type UNIQUE

    • check constraint : MySQL has limited support for it


MySQL is a single process,

Multithreading (preventing Permissions from crossing):

Daemon process

Application thread

The database is generally a bottleneck for system performance, so to speak, because a thread is created (based on big Data queries), it is possible to consume a lot of memory, so the production environment generally use 64bit system, and try to avoid single point concurrency, while doing database caching and thread reuse.

MYSQL plug-in storage engine

5.5.8: MyISAM ( for more queries, less modification, i.e. Data Warehouse )

5.5.8 after: InnoDB(for online transaction processing systems)

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7E/EB/wKiom1cMu0_D7t-fAAATW1xDXso621.png "title=" 360 Feedback 16190825758381.png "alt=" Wkiom1cmu0_d7t-faaatw1xdxso621.png "/>650) this.width=650;" src= "http:// S2.51cto.com/wyfs02/m00/7e/eb/wkiom1cmvbrjz6skaaicwr-w5xy113.png "title=" 360 feedback 16220501577199.png "alt=" Wkiom1cmvbrjz6skaaicwr-w5xy113.png "/>

When a user initiates a connection request, the Connection manager accepts and forwards it to the thread manager, the thread manager generates a thread, and then the user module verifies the appropriate access permissions, the permissions are correct, and the connection is established. Command distribution module, executes the command, if the cache has the corresponding result then returns, and logs the log, otherwise, through the parser resolution command, to the underlying related module.

MySQL (client) mysqld (server) is on the same host

Unix/linux: Using socket communication

Windows: Communicating through Shared memory

Not on the same host

Communication based on TCP/IP protocol

MySQL Client tool:

Mysql

Mysqldump Backup

Mysqladmin

Mysqlcheck

Options

-U

-H

-P

--protocol

--port


This article is from "Up for the future ..." Blog, be sure to keep this source http://goodang.blog.51cto.com/10277564/1763121

Basic theory of mysql-relational database (04)

Related Article

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.