5.mysql transactions and indexes
Execute a group of sql statements in the same batch
If an sql error occurs, all the sql in the batch will be cancelled
mysql transaction processing only supports innoDB and BDB data table types
ACID principle of transaction
All operations in the whole transaction are either complet ...
Posted by rid243 on Mon, 02 May 2022 07:52:02 +0300
A transaction is a user-defined sequence of database operations. These operations are either done or not done at all, and are an inseparable unit of work.
Based on the atomicity, consistency, isolation and persistence characteristics of transactions, related data operations can be defined into a transaction.
If no exception occurs during the ...
Posted by wblati on Sat, 30 Apr 2022 23:02:23 +0300
Source code acquisition: download from "resources" on the blog home page!
The warehouse management system is divided into three modules: basic management, warehouse management and system management. There are sub modules under each module. functional module
1, Basic management
1. Customer management Custome ...
Posted by tsigo on Sat, 30 Apr 2022 21:52:16 +0300
Basic operation of MySQL database
1. Creation of database
1.1 create database
create database <Database name> -- stay sql Statements are not case sensitive
use <Database name>
drop database <Database name>
view the database
show databases <Database name>
1.2 crea ...
There are many high availability schemes for MySQL, such as dual master, MHA, MMM, etc. here is just the simplest dual master high availability scheme.
1, Configure MySQL as master-slave
1.1 environmental preparation
Posted by srikanth03565 on Sat, 30 Apr 2022 12:56:05 +0300
1. Naming Specification
1.1 Specification for Library Construction
Databases, tables, fields, indexes are all lowercase letters, and English words are underlined () Separate.
1.2 Table Field Specification
The column design specification uses tinyint/int/bigint according to business area, which takes up 1/4/8 bytes, respectively.
Use tinyint ...
Posted by Bramme on Sat, 30 Apr 2022 03:48:57 +0300
MySQL backup generally adopts the method of full database backup and log backup. According to the needs of the business, a full backup can be performed every Sunday at 1 am and an incremental backup every hour, so that full backup and log backup can be used after MySQL failure. Recover the most complete data possible.
1. binlog log recovery
Posted by possiblyB9 on Fri, 29 Apr 2022 17:12:08 +0300
Tip: after the article is written, the directory can be generated automatically. Please refer to the help document on the right for how to generate it
Learning and understanding the SQL statements configured by MySQL is conducive to laying a solid foundation for the flexible mastery and application of MySQL.
A SQL statement
Posted by ScottRiley on Fri, 29 Apr 2022 12:06:11 +0300
We know that it is very easy to complete single-table query in Mybatis, and multi-table query is a difficult point in the Mybatis framework, which needs to be mastered.
1. Many-to-many query
There is a many-to-many relationship between users and groups, and the requirement is: find all group information by user id
The database design ...
Posted by nonexistentera on Fri, 29 Apr 2022 03:20:50 +0300
1, Deployment reasons
Ensure that the data of the master database and the slave database are always, and prevent single point of failure and data lossIn enterprise applications, mature businesses usually have a large amount of dataA single MySQL cannot meet the actual needs in terms of security, high availability and high concurre ...
Posted by bbristow on Thu, 28 Apr 2022 20:50:46 +0300