mysql transaction details

What is business Transaction is to operate multiple sql statements. These sql statements must be executed successfully at the same time. If one fails, it will return to its original state Role of transaction Ensure the security of data, if transfer between banks Four characteristics of transaction ACID atomic ...

Posted by oneday on Fri, 08 Nov 2019 20:44:04 +0100

An implementation of read-write separation of springboot mybatis

First of all, consider using cache for processing. If the cache is not enough, then use read-write separation for implementation application.yml configures two data sources #Default usage configuration spring: profiles: active: dev --- #Development and configuration spring: profiles: dev datasource: master: jdbc-url: jdbc: ...

Posted by Jason_London on Fri, 08 Nov 2019 19:35:17 +0100

There are three ways to batch import and delete the Mybatis framework

Create a database first CREATE TABLE user (   id varchar(32) CHARACTER SET utf8 NOT NULL,   name varchar(50) CHARACTER SET utf8 DEFAULT NULL ,   dflag char(1) CHARACTER SET utf8 DEFAULT NULL ,   PRIMARY KEY (`id`) ) jdbc.properties configuration mysql.driver=com.mysql.jdbc.Driver mysql.url=jdbc:mysql://127.0.0.1:3306/qingmu?char ...

Posted by sheac on Tue, 05 Nov 2019 22:59:51 +0100

Compile LNMP manually (follow the detailed experimental steps)

LNMP represents the web server architecture of Nginx+MySQL+PHP under Linux system. Linux is a kind of Unix computer operating system, which is the most popular free operating system. Representative versions include debian, centos, ubuntu, fedora, gentoo, etc. Nginx is a high-performance HTTP and reverse proxy server, and also an IMAP/POP3/SMTP ...

Posted by dr.maju on Tue, 05 Nov 2019 12:10:54 +0100

springboot2.1.5 + mybatis to configure multiple data sources

1. Startup is the way to create bean s pom.xml <dependency> <groupId>com.alibaba</groupId> <artifactId>druid-spring-boot-starter</artifactId> <version>1.1.10</version> </dependency> <!-- maven Not in the warehouse oracle Database driver, here jar Put it under the project for i ...

Posted by partypete on Mon, 04 Nov 2019 16:37:20 +0100

SQLAlchemy -- basic addition, deletion, modification and query

Catalog brief introduction install Component Simple use Execute native sql (not commonly used) orm use (key) Common data types Common parameters of Column Common operations (CURD) Create an instance of a mapping class Create Session session add()/ ...

Posted by Hikari on Sun, 03 Nov 2019 17:02:59 +0100

MySQL percona toolkit -- Pt OSC execute SQL command

PT OSC execution log In the DROP COLUMN operation for table tb004 with data volume of 100000, the PT OSC tool log is: Operation, tries, wait: analyze_table, 10, 1 copy_rows, 10, 0.25 create_triggers, 10, 1 drop_triggers, 10, 1 swap_tables, 10, 1 update_foreign_keys, 10, 1 Altering `db001`.`tb004`... Creating new table... ...

Posted by KiwiDave on Sun, 03 Nov 2019 06:30:47 +0100

redis paging implemented by redisTemplate in spring

Recently, we need to cache the data in mysql table into redis, and the list display also needs to use paging to query. At first, we thought that HASH structure can meet the needs, and then we can use ZSET and HASH structure to store data to realize redis paging. The steps are as follows: 1. First, use ZSET to store the id in table A in the form ...

Posted by jsladek on Sun, 03 Nov 2019 02:45:34 +0100

Judgment of field value null and '' null in different databases and SpringDataJPA

Reason: when using the spring datajpa statement to query the null value of a field in the database table, such as:findByIdAndNameIsNullfindByIdAndNameIsNotNullWhen the value of name is empty string, the result of query is very different 1. Build tables CREATE TABLE `user` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `name` varchar(45) CHARAC ...

Posted by Teen0724 on Sun, 03 Nov 2019 02:42:33 +0100

Cluster construction of hadoop, spark, hive and azkaban under ubuntu

Tuesday, 08. October 2019 11:01 am Initial preparation: 1. jdk installation Do the following on all three machines (depending on the number of machines you have): 1) you can install jdk through apt get, execute whereis java on the command line to get the installation path of java, or download the installation package of jdk manually f ...

Posted by mattal999 on Sat, 02 Nov 2019 11:47:52 +0100