Use the MyBatis framework to operate the Mysql database

Brief description of MyBatis (reference from: What is mybatis_ Baidu knows (baidu.com)) MyBatis was originally an open source project ibatis of apache. In 2010, the project was migrated from apache software foundation to google code and renamed MyBatis. Moved to Github in November 2013. MyBatis is an excellent persistence layer framework tha ...

Posted by joshmpratt on Sun, 16 Jan 2022 15:50:09 +0100

MySQL separates replication from reading and writing

1.1 realistic background In the actual production environment, if the database is read and written in the same database server, it can not meet the actual needs in terms of security, high availability and high concurrency. Therefore, generally speaking, the Master-slave replication method is used to synchronize data, The scheme of improvin ...

Posted by frost on Sun, 16 Jan 2022 00:44:06 +0100

MySQL - create, delete database tables, SQL commands

1, MySQL create data table CREATE TABLE table_name (column_name column_type); 1. Create a library and set the character set encoding to utf8 create database 'Library name' default character set = 'utf8'; 2. Create the table and set the character set encoding to utf8 create table 'Table name'(id int(6),name char(10)) default character set = ...

Posted by EternalSorrow on Sat, 15 Jan 2022 23:40:42 +0100

MySQL 8.0 drop table recovery

There may be many recovery methods for MySQL drop table. The following one is based on full backup, replication, and then sql_thread stops at a specified location to recover. Let's simulate recovery environmental information MySQL version information: Server version: 8.0.27 MySQL Community Server - GPL os: [root@test28 ~]# cat /etc/redh ...

Posted by pro on Sat, 15 Jan 2022 11:59:11 +0100

MySQL basic syntax

database The database is similar to a folder with many excel tables, but the database is a software specially used to manage data, so the efficiency is much higher than that of Excel or text storage Database management system consists of a collection of interrelated data and a set of programs to access these data. This data set is often c ...

Posted by wpfn on Sat, 15 Jan 2022 09:41:12 +0100

2021-07-23 / 2021-07-26 revisit the zipper table | learn Spark SQL | learn Git Comment

Review the zipper table Spark SQL| Zipper Watch First put it into the incremental table, and then associate it into a temporary table. After inserting it into the new table, 1. Judge the invalid value, 2. Judge the valid value, 3. Union through UNION ALL DROP TABLE IF EXISTS dw_orders_his_tmp; CREATE TABLE dw_orders_his_tmp AS SELECT or ...

Posted by WhiteShade6 on Sat, 15 Jan 2022 08:08:28 +0100

MySQL counts by conditions, count() function. Can you understand how the optimizer counts

In the project, when a statistical demand is encountered, statistics are made from a table according to conditions, and count(distinct case when) is used to solve this problem. count() function In statistics, count appears most frequently Simplest usage select count(*) from table where .... select count(distinct column_name) from table whe ...

Posted by mparab on Sat, 15 Jan 2022 07:10:59 +0100

SpringBoot advanced usage

1, SpringBoot advanced usage 1. Lombok plugin 1.1) Maven coordinate query website: https://mvnrepository.com/ You can now find information about the maven package 1.2) add jar package file <!--add to lombok rely on--> <dependency> <groupId>org.projectlombok</groupId> <artifactId&g ...

Posted by atulkul on Sat, 15 Jan 2022 06:02:08 +0100

Use MySQL, use JSON card well

Click "Lifetime", Focus, Top Public Number Daily Technical Dry, First Time Delivery! Relational structured storage has some drawbacks because it requires all columns and their corresponding types to be predefined. However, the business may need to expand the descriptive capabilities of individual columns as it evolves, and w ...

Posted by escabiz on Fri, 14 Jan 2022 23:13:59 +0100

Tomcat parameterized configuration v1 zero

1, Tomcat directory structure (taking version 8.5 as an example) Bin directory. The bin directory is mainly used to store tomcat commands. There are two main categories. One is based on sh (linux command), and the other is with bat (windows command). Many environment variables are set here, For example, you can set JDK path and tomcat path st ...

Posted by DeathStar on Fri, 14 Jan 2022 15:39:18 +0100