I recently read a book about MySQL "MySQL must Know", the book only a few basic knowledge, but also basically covers all the MySQL knowledge points. The rest of the more advanced also only on the basis of expansion or optimization, after reading this book, I also have a little doubt, so know the friend help solve
1. mysql Engine classification
3 engines such as Innodb,myisam and memory.
InnoDB is a reliable transaction processing engine, but it does not support full-text search.
Memory is functionally equivalent to MyISAM, but because the data is stored in memory, it is very fast.
MyISAM is an extremely high-performance engine that supports full-text search, but does not support transactional processing.
2, talk about MyISAM's full text search.
MyISAM's full-text search does not look like syntax used in InnoDB, searching for a column, but searching for the full text, as long as the match can be displayed. Its basic format is as follows:
Match (matching column name) against (search for expression)
(1), Basic grammar:
SELECT ColumnName
From TABLENAME
WHERE MATCH (Query column) against (' anvils ' with Query EXPANSION) (this is the query extension)
The general result is not unique, as long as one of the words matches what is required to search the full text. They are arranged in a certain order, mainly based on the priority of the query and the position between the keywords you search for. The closer the position, the higher the priority.
(2) Boolean type text Search
Example:
Select Note_text
From product
where Match (Note_text) against (' Heavy ' in BOOLEAN MODE)
The heavy is the keyword for the search. In Boolean mode is the symbol for the type of Boolean text.
Against (' heavy-rope* ' in BOOLEAN MODE) means that the results of the search row are stripped of rows containing rope
Against (' +rabbit + bait ' in BOOLEAN MODE) shows rows containing rabbit and bait
Against (' rabbit + bait ' in BOOLEAN MODE) displays rows that contain either rabbit and bait
Against (' rabbit bait ' in BOOLEAN MODE) displays the lines of the rabbit bait phrase.
Here I ask a question: Why InnoDB does not support full-text search, which involves internal engine problems, I hope you give me an answer.
3. Regular Expression Regxep
Before I read this book, I learned about SQL Server databases. But the regular expression was not learned at the time. Later in life encountered a few times, only to know something.
The English meaning of regexp is the meaning of regular expressions. So learning English is essential for a programmer. There are times when we can know what this is by a short name, and I have my own experience.
What I'm going to say here is that the regular expression matches the special characters. When a regular expression matches a special character, the escape character "\ \" must be added as the leading.
? is 0 or 1 occurrences of any character that matches the current preceding.
4. View
The view is a virtual table. It is mainly used for data retrieval, which encapsulates the SELECT statement and protects the basic data of some users. However, I still do not understand the use of the view.
5. Cursors (cursor)
Steps for using cursors:
Definition--declaration--use--close
CREATE PROCEDURE C ()
BEGIN
DECLARE Wiper NAME Cursor
For
SELECT _ from _;
END
Above is the process of creating a cursor
Open cursor, close cursor is the operation that opens and closes the cursor.
This is what I have learned recently, and I hope someone will answer the question on the red mark above. These basic knowledge is important to the people we want to know about MySQL, and there are some things we don't know about. will also continue to understand the depth. Waiting for my follow-up database knowledge, let us grow together.
A little superficial knowledge of MySQL