MySQL uses LOAD DATA to synchronize data to Alibaba cloud database regularly

Before  , there was a small test project that needed to synchronize some local data to Alibaba cloud database regularly. It was implemented by executing LOAD DATA with the most mechanical script. Here is a brief introduction. LOAD DATA can quickly read text file data into the table (LOAD DATA is us ...

Posted by sarun on Tue, 23 Jun 2020 04:31:16 +0200

SQL Server database [system design assignment], [teaching management system], [complete code]

Catalogue 1. Textbook [P281-P287] 2. SQL statement [create data table (6 tables), insert data] 2.1. Chinese field representation 2.2. English field representation 3. New view 3.1, 6 table general view 3.2. Total credits (student number, credits) 3.3. Total credit statement 4. Query exercise 1. Textbook [P281-P287] ...

Posted by kutatishh on Sun, 21 Jun 2020 08:04:30 +0200

MySQL parsing order

SQL parsing order Next, let's take a look at the past and present life of an SQL statement. First, let's look at the sample statement: SELECT DISTINCT < select_list > FROM < left_table > < join_type > JOIN < right_table > ON < join_condition > WHERE < wh ...

Posted by rlhms09 on Sun, 21 Jun 2020 04:28:16 +0200

Dynamic sql splicing in mybatis

Before moving on to dynamic sql, let's start by saying that a user's id in real development is usually out of order, such as random generation using UUID s. Write one below. public class UUIDGenerate { public static String getIdByUUID(){ return UUID.randomUUID().toString().replaceAll("-" ...

Posted by c-o-d-e on Sat, 20 Jun 2020 18:12:19 +0200

(vi)Restrictions, table relationships, modifying table syntax, and replicating tables for P03 DB databases(vi)

Content Summary constraint condition Relationships between tables (constraints) Modify the full syntax of the table Copy Table constraint condition Default default """ # Supplement: You can specify fields when inserting data create table t1 ( id int, name varchar(16) ); insert into t1 (name, id) values ('samuel', 1); create table ...

Posted by lth2h on Fri, 19 Jun 2020 19:45:34 +0200

How does Django use snowflake to generate a primary key instead of automatically?

Before, ID was implemented with auto increment. Now I want to use Snowflake algorithm to generate primary key. What changes should I make? catalog Background Implementation plan Scenario 1 - add primary key manually Scenario 2 - override save() method Scenario 3 - using pre in Django Signals_ save() ...

Posted by ivi on Wed, 17 Jun 2020 08:11:54 +0200

mybatis source code - initialization configuration

Our debugging environment: Debug code: public class MyaaTest { public static void main(String[]args) { String resource = "config.xml"; try { //1. Read configuration file InputStream in= Resources.getResourceAsStream(resource); SqlSessionFactor ...

Posted by gere06 on Wed, 17 Jun 2020 07:42:02 +0200

Mybatis Source Interpretation--Data Source Module (Factory Mode)

The data source module for Mybatis is located inOrg.apache.ibatis.datasource. Common data source components are implementedJavax.sql.DataSourceInterface.Within Mybatis, third-party data source components are integrated, and data source implementations are provided.In general, data source initializat ...

Posted by sane993 on Wed, 17 Jun 2020 02:59:26 +0200

xtrabackup for MySQL database backup

Mysqldump is a logical backup method. Its biggest defect is that the speed of backup and recovery is slow. For a database less than 50G, this speed is acceptable. But if the database is very large, it is not suitable to use mysqldump backup again. At this time, you need a kind of easy-to-use and efficient tool. Xtrabackup is one of them, known ...

Posted by motofzr1000 on Tue, 16 Jun 2020 10:20:51 +0200

On Jetpack -- ROOM database

On Jetpack(1) - ViewModelOn Jetpack(2) - LifecyclesOn Jetpack(3) - LiveDataDemo project Although Android carries SQLite, its operation is troublesome, and if it is a large-scale project, it will become confusing and difficult to maintain, unless you design a very good architecture and package. Of cour ...

Posted by Runnion on Tue, 16 Jun 2020 05:22:09 +0200