Having comments is my greatest motivation ~ MySQL basics (storage engine and graphical management tools), mysql basics _ PHP Tutorial

Source: Internet
Author: User
Having comments is my greatest motivation ~ MySQL basics (storage engine and graphical management tools) and mysql basics. Having comments is my greatest motivation ~ MySQL basics (storage engine and graphical management tools), mysql basics hi was posted today, and I found three comments ~~ Come on! Comments this week are my greatest motivation ~ MySQL basics (storage engine and graphical management tools)

Hi

Today, I got three comments ~~ Come on!

The plan for this week is far from reaching, and there will be a lot of things next week... So... Have a good weekend ~

Today, I tried to finish the basics of MySQL. how can I make it big white?

1. MySQL

----- Storage engine (getting started )-----

---- Introduction

--- Intuitive example

Mysql> show create table test;
+ ------- + Certificate ---------------------------------------------------------------- +
| Table | Create Table |
+ ------- + Certificate ---------------------------------------------------------------- +
| Test | create table 'test '(
'Id' tinyint (3) unsigned not null AUTO_INCREMENT,
'Username' varchar (20) default null,
Primary key ('id ')
) ENGINE = InnoDB AUTO_INCREMENT = 9 default charset = latin1 |
+ ------- + Certificate ---------------------------------------------------------------- +
1 row in set (0.04 sec)

ENGINE = InnoDB is a storage ENGINE.

---

MySQL can store data in files/memory using different technologies. this technology is the storage engine (that is, the storage engine is a technology and a storage technology)

Different engines have different functions, because of different storage mechanisms, indexing techniques, and locking levels.

Also known as the table type

---

MySQL supports

MyISAM, InnoDB, Memory, CSV, Archive

---- Knowledge point-concurrent processing

Ensure Data consistency and integrity when multiple connections modify records

For example, a shared Lock (read lock) is commonly used to process requests from multiple users to the same record (multiple users can read the same resource without any changes in the data read process ), exclusive lock (write lock)

Apply the lock only to the most correct object (the object cannot be too large or too small) -- table lock (a lock policy with the minimum overhead) and row lock (the maximum overhead)

---- Knowledge point-transaction processing

Used to ensure database integrity

Met: ACID (atomicity, consistency, isolation, durability)

---- Knowledge point-foreign key

Policy to ensure data consistency (as mentioned in previous articles about various keys)

---- Knowledge point-Index

A structure for sorting values of one or more columns in a data table (similar to the directory function)

Fast query

---- Features of various engines

MyISAM: 256 TB, supports indexes, table locks, and data compression-suitable for transactions with few transactions

InnoDB: 64 TB, supports transaction security (this is the reason this engine is often used), supports indexes, row locks, and supports foreign keys (also only this engine supports this item)-tall

Memory: storage restrictions (determined by the Memory size). indexes and table locks are supported.

Archive: no storage restrictions, supports indexes, table locks, and data compression

The index types are different.

Others: CSV does not support indexing, and Blackhole is used as a relay for data replication (similar to burning after reading)

The first two are used at most.

---- Set the storage engine

--- Modify my. ini

Default-storage-engine =...

--- Create table table (

...

For example

Mysql> create table tp1 (
-> S1 VARCHAR (20)
->) ENGINE = MyISAM;
Query OK, 0 rows affected (0.10 sec)

Mysql> show create table tp1;
+ ------- + Response +
| Table | Create Table |
+ ------- + Response +
| Tp1 | create table 'tp1 '(
'S1 'varchar (20) DEFAULT NULL
) ENGINE = MyISAM default charset = latin1 |
+ ------- + Response +
1 row in set (0.00 sec)

Mysql> alter table tp1 ENGINE = InnoDB;
Query OK, 0 rows affected (0.35 sec)
Records: 0 Duplicates: 0 Warnings: 0

Mysql> show create table tp1;
+ ------- + Response +
| Table | Create Table |
+ ------- + Response +
| Tp1 | create table 'tp1 '(
'S1 'varchar (20) DEFAULT NULL
) ENGINE = InnoDB default charset = latin1 |
+ ------- + Response +
1 row in set (0.00 sec)

----- Graphical management tool -----

---- PHPMyAdmin

Because I have a wamp integrated environment, you can directly log on to phpmyadmin.

Normally, you need to download the corresponding php version from The phpmyadmin website.

After downloading and installing files, you need to perform operations on the webpage. after all, the files are stored on the server.

Being able to operate databases, data tables, and data visually is not a habit. I personally prefer to use commands. However, you need to understand what is wrong in visual search.

---- Navicat

With a Chinese client

---- MySQL Workbench

Clients provided on the official website

I don't want to mention it. I can find it online, and I will touch it more.

2. AJAX

----- Introduction -----

Chinese name: Asynchronous Javascript and XML (asynchronous request, partial refresh)

Is a way to update some pages without reloading the entire page.Technology

Changed the web landscape

Prerequisites: CSS, HTML, and JS

---- Synchronous and asynchronous

Synchronization: (the original technology) after the client requests, the server returns the processing result after processing the response. during the whole process, the client is waiting.-synchronization means that the client and the server are simultaneously processed.

Asynchronous: (for example, when you fill in the registration information, fill in the mailbox, and then enter a green check mark on the right of the box.) when the client changes, (it seems) send the request to the processor immediately, and then return the result after processing by the processor. during this process, the client is still performing other operations-asynchronous operations on the client and server

Technical difference: the XMLHttpRequest object is missing-used for data exchange between the backend and the server

Process introduction: HTML and CSS are used to implement pages, express information + XHR for asynchronous data exchange + JavaScript DOM operation for dynamic local refreshing

---- Create an XMLHttpRequest (XHR) object

Instantiate XHR: var request = new XMLHttpRequest ();

Besides IE6 and earlier browsers, XHR is supported.

---- HTTP request

Http is a rule/protocol for computers to communicate over the network. it is a stateless (unretained/unremembered) protocol.

Http request steps: establish a TCP connection-"The browser" calls "to" the server-"The server responds-" the server replies-"close the connection"

The request and response have their own formats. for details, refer to "computer network" or similar books. if you know about GET/POST, you can continue for the moment.

Note: GET uses a URL to transmit data. it is fully visible (in plaintext) and has a limit on the number of characters. it is simple, secure, and can be saved as a bookmark.

After the response, you should know the status code in the browser: mainly look at the first -- 1xx, information class, indicating processing; 2xx, successful; 3xx, redirection, indicating that the request is not successful, further actions are required; 4xx: Client Error, indicating that the request submitted by the client has an error, for example, 404 not found, indicating that the document referenced in the request does NOT exist; 5xx, server error ---- helps you debug your web program.

Bytes ~ MySQL basics (storage engine and graphical management tools), mysql basics hi was posted today, and I found three comments ~~ Come on! This week...

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.