Fast rollback using binlog2sql after Mysql misoperation

1. Overall explanation: DML(data manipulation language): They are SELECT, UPDATE, INSERT, DELETE and, like their names, are the languages used to manipulate data in a databaseDDL(data definition language): There are more DDLs than DML s. The main commands are CREATE, ALTER, DROP, etc. DDL is mainly used to define or change the structure of tabl ...

Posted by pdkv2 on Fri, 14 Jun 2019 10:38:07 -0700

Spring integrates multiple data sources for dynamic switching

In practical projects, it is often necessary to connect multiple databases, and different business needs often need to access different databases in the implementation process. jdbc.properties configuration file, configuring multiple dataSource s ##########################MySQL##################################### hibernate.dialect=org.hiberna ...

Posted by zenag on Fri, 14 Jun 2019 09:53:59 -0700

Isolation Level of JDBC Transactions

I. Isolation Level of Transactions Multiple transactions run simultaneously in the database. When they access the same data in the database, if the isolation mechanism is not adopted, some concurrency problems will occur. There are several concurrency problems in the database. (1) Reading "dirty" data refers to the fact that trans ...

Posted by convinceme on Thu, 13 Jun 2019 17:13:06 -0700

sql common basic statements

Basics Create a database Determine whether the database exists before creating it if exists (select * from sysdatabases where name='databaseName') drop database databaseName go Create DATABASE database-name Delete the database drop database dbname Backup sql server Create a device for backing up data USE master EXEC sp_addumpdevi ...

Posted by Brand Hill on Wed, 12 Jun 2019 17:43:27 -0700

SpringData JPA uses SQLQuery native

1. Create EntityManager with annotations: /*unitName is used to select a specific PersistenceContext and the primary data source is selected by default, which passes through the.persistenceUnit("secondaryPersistenceUnit") when creating the bean s of the data source To create it by */on the object of EntityManagerFactoryBuilder @Pe ...

Posted by JasperBosch on Wed, 12 Jun 2019 09:40:59 -0700

Talk about precompiled features of JDBC and Mysql

background Recently, due to job adjustments, we have been dealing with databases, which has increased many opportunities for close contact with JDBC. In fact, we are using Mybatis.Knowing it, knowing it, is what our engineers and children's shoes should pursue, to help you better understand this technology, and to be more comfortable when facin ...

Posted by davidjwest on Wed, 12 Jun 2019 09:10:54 -0700

Realize the correct posture of golang's general method of converting mysql result set into json's

Write at the beginning Recently, in the development of elastic search, there is a need to import the data of mysql specified tables into the index of elastic search. This requirement seems to be relatively easy. The general idea is to traverse every row of data in the table, convert it into json, and then submit it it to es through the api inte ...

Posted by aniesh82 on Tue, 11 Jun 2019 12:37:02 -0700

Detailed use of cursors in oracle

The concept of cursor:A cursor is a memory workspace of SQL, defined as a variable by the system or user. The function of cursors is to temporarily store blocks of data extracted from databases. In some cases, data needs to be transferred from tables stored on disk to computer memory for processing, and finally the processing results are displa ...

Posted by SeaJones on Tue, 11 Jun 2019 11:48:35 -0700

Mybatis Second [CRUD, Paging]

Complete CRUD operation In the previous article, we had a brief idea of how Mybatis works and how it works. This time, we used Mybatis to complete the CRUD, reinforcing Mybatis development steps and some details Structure between Package and Class Increase Students configuration file <?xml version="1.0" encoding="UTF-8"?> < ...

Posted by jmoreno on Tue, 11 Jun 2019 10:11:54 -0700

to_date() of SQL and a detailed explanation of date processing

Date examples: SELECT TO_DATE('2006-05-01 19:25:34', 'YYYY-MM-DD HH24:MI:SS') FROM DUAL SELECT TO_DATE('2006-05-01 19:25', 'YYYY-MM-DD HH24:MI') FROM DUAL SELECT TO_DATE('2006-05-01 19', 'YYYY-MM-DD HH24') FROM DUAL SELECT TO_DATE('2006-05-01', 'YYYY-MM-DD') FROM DUAL SELECT TO_DATE('2006-05', 'YYYY-MM') FROM DUAL SELECT TO_DATE('2006', 'YYY ...

Posted by christo on Sun, 09 Jun 2019 15:24:49 -0700