Appearance mode of design mode (structural type)

[TOC] I. model definition Appearance mode: appearance mode is to provide a unified interface to access a group of interfaces of subsystem. The facade pattern defines a high-level interface that makes subsystems easier to use. Appearance mode, also known as facade mode, is an object structural design mode. Insert picture descri ...

Posted on Mon, 02 Dec 2019 11:57:16 -0500 by Myke

Interpretation of PostgreSQL source code (108) - background process (PGPROC data structure)

PostgreSQL uses the process mode. For each client, it will Fork a background process to respond to the client's request. This section describes the data structure that each background process has in shared memory: PGPROC. I. data structure Macro definition /* * Note: MAX_BACKENDS is limited to 2^18-1 because that's the width reser ...

Posted on Mon, 02 Dec 2019 11:33:38 -0500 by Saruman

Shell develops MySQL master-slave monitoring script

Monitor whether the master-slave synchronization of MySQL is abnormal. If not, send SMS or email to the administrator. 1) develop a daemons script to detect every 30 seconds. 2) if the following error number (11581159100810071062) occurs during synchronization, the error will be skipped. Stage 3:3) if the IO and SQL threads are abnormal, notif ...

Posted on Mon, 02 Dec 2019 05:52:55 -0500 by dsinghldh

Three data table de duplication methods of MSSQL SQL Server

Abstract: Three different data De duplication methods will be shared belowData De duplication: it needs to be defined according to a certain field. When there is more than one line of records in this field, we define that there are duplicates in this line of data. Data De duplication method 1: When the maximum SN is in the table, we can get ...

Posted on Mon, 02 Dec 2019 01:35:04 -0500 by PandaFi

Node connects MySQL and encapsulates its addition, deletion, query and modification

Node connects to mysql In this note, the connection between node and mysql will be introduced, and the encapsulated code will be shared, which can be used directly in the project. Install mysql module npm install mysql Connect mysql const mysql = require('mysql'); let connection = mysql.createConnection({ host : 'localhost', user : 'r ...

Posted on Mon, 02 Dec 2019 00:29:48 -0500 by rwwd

The same and different points of SELECT and SET assignment in SQL SERVER

SELECT and SET can be used to assign values to variables in SQL SERVER, but their usage and effect are different in some details. 1. In terms of variable assignment, SET is the ANSI standard assignment method, while SELECT is not. This is one of the reasons why SET is recommended. 2. SELECT can assign multiple variables at one time, while SET c ...

Posted on Mon, 02 Dec 2019 00:12:37 -0500 by Daggeth

How does Mybatis work

Objectives: Clarify the process of mybatis loading and parsing mapper file; Clarify the process of executing SQL by mybatis. When analyzing the source code of mybatis loading configuration, the previous article mentioned org.apache.ibatis.builder.xml.xmlconfigbuilder ා parseconfiguration method, and now continues to analyze mapperElement meth ...

Posted on Sun, 01 Dec 2019 23:30:46 -0500 by eon201

Oracle quickly retrieve deleted tables

In many cases, in order to quickly retrieve the deleted tables, you can use the recycle bin to find and rebuild the deleted tables.(1)Whether the deleted table can be found in the recycle bin has a lot to do with the reservation policy and space size of undo. Timeout or insufficient space will cause the table to fail to flash back and can only ...

Posted on Sun, 01 Dec 2019 23:23:52 -0500 by SZero

Oracle data table defragmentation

Adding, deleting and modifying data tables can never avoid the problem of fragmentation. After Oracle introduced table space local management and ASSM, in extreme cases, it is clear that the utilization rate of table space is not high, and the database objects that need to be put into storage are not large, but the error is reported ORA-01653: ...

Posted on Sun, 01 Dec 2019 13:32:45 -0500 by tshafer

Common splicing statements of MySQL

In MySQL, the CONCAT() function is used to connect multiple strings into one string. With this function, we can splice the sql that we couldn't get in one step. It may be more convenient in our work. Here are some common scenarios. Note: it may be slightly different for lower version 5.7. 1. Query all users by splicing SELECT DISTINCT CONC ...

Posted on Sun, 01 Dec 2019 13:09:04 -0500 by jiayanhuang