Summary of SQL Basic Statements

Introduction It's time to review the grammar of a wave of SQL statements. It doesn't need to be too deep, but it has to be used. grammar Step by step, from shallow to deep, all of them are used here. MySQL Yes. Basics Connect to the database mysql -u root -p mysql -h 10.20.66.32 -u root -p 123456 1 1 - After h is the ...

Added by flowingwindrider on Fri, 21 Jun 2019 04:22:47 +0300

Quasi-real-time extraction of MySQL table data to HDFS using Flume

First, why use FlumeIn the previous experimental environment of HAWQ data warehouse, I used Sqoop to extract incremental data from MySQL database to HDFS, and then accessed it with the external table of HAWQ. This method only needs a small amount of configuration to complete the task of data extraction, but the drawback is also obvious, that is ...

Added by binto on Thu, 20 Jun 2019 04:03:47 +0300

MyBatis Learning Summary (I) - MyBatis Quick Start

github synchronous update Blog Synchronization Updates Synchronized Updating of Brief Books Reference address Project address: Portal 1. Create table structure create database mybatis; use mybatis; CREATE TABLE users(id INT PRIMARY KEY AUTO_INCREMENT, NAME VARCHAR(20), age INT); INSERT INTO users(NAME ...

Added by phigga on Wed, 19 Jun 2019 20:58:53 +0300

Group Query of SQL Antipattern

We usually make other special requests for grouped queries, such as when I want to get the last comment of each user and the ID of the last comment of each user. It seems that this requirement is reasonable, but we can't just use aggregation functions to achieve it. The following example is to get the last time each administrator submits code ...

Added by 8ball on Wed, 19 Jun 2019 00:57:58 +0300

Difference of execution plan obtained by oracle and acquisition of real execution plan

oracle view the actual execution plan Occasionally, the execution plan that oracle sees is not a real one. To see if it is a real execution plan is to see if the SQL is actually executed. If it is not executed, then the execution plan may be inaccurate due to the direct error between statistics and practice, or for other reasons. 10046 capt ...

Added by peeter_talvistu on Tue, 18 Jun 2019 01:06:28 +0300

The correct opening posture of pymysql library-Python

PyMySQL is a library used to connect MySQL servers in Python 3.x, and mysqldb is used in Python 2. Use examples Connect the database as follows:   importpymysql.cursors # Connect to the database connection =pymysql.connect(host='127.0.0.1', port=3306, user='root', ...

Added by rusty1001 on Tue, 18 Jun 2019 00:17:36 +0300

How did MyBatis play?

MyBatis MyBatis is an excellent persistence framework that supports customized SQL, stored procedures, and advanced mapping. MyBatis avoids almost all JDBC code and manual parameter setting and retrieving result sets. MyBatis can use simple XML or annotations to configure and native Map s, mapping interfaces and Java POJOs(Plain Old Java Object ...

Added by svgk01 on Mon, 17 Jun 2019 01:41:08 +0300

JDBC03 uses JDBC to implement transaction submission and rollback [Calling methods in Connection to achieve transaction management]

Catalogue 1. Reuse methods in Connection 2 JDBC Transaction Management Classic Case Review of common methods in 1 Connection classes   1.1 Statement createStatement() throws SQLException; Create a Statement instance (that is, create an SQL execution object)   1.2 PreparedStatement prepareStatement(String sql) throws SQLException; Create a P ...

Added by JParishy on Sun, 16 Jun 2019 02:46:35 +0300

Implementation of Dynamic Query by JDBC

A Summary 1. What is dynamic query? Random selection of several query conditions from a number of combinations into a DQL statement for query, this process is called dynamic query. 2. Difficulties of Dynamic Query There are many optional query conditions and combinations, so it is difficult to list them one by one. 3. Composition of Fina ...

Added by tc61380 on Sat, 15 Jun 2019 23:34:41 +0300

Physical Backup and Logical Backup

Physical backup and recovery: Physical backup is divided into hot backup and cold backup. Compared with logical backup, physical backup has faster backup and recovery speed. The principle is based on the cp command. Cold standby: backup MySQL database shared table space,.frm, stand-alone table space (.ibd), redo log files. Advantages: ...

Added by eekeek on Fri, 14 Jun 2019 23:39:22 +0300