Category:Database

  • [introduction to SQL foundation] 36 questions and Solutions

    Time:2020-7-10

    This paper deals with aggregate function, analysis function, condition function, and self mapping.There are the following tables (EMP, Dept), the structure of the table and the following 36 basic questions. Next, I will use the * sign to show them specifically. Those are more important and should be given priority. 1.1 list all departments with […]

  • Gorm database mapping tool

    Time:2020-7-10

    gormt A MySQL database to struct tool The golang structure can be automatically generated from MySQL database Automatic generation of shortcut functions Support index, foreign key Naming rules for humps with large humps With JSON tag Interactive interface mode ./gormt -g=true Command line mode ./gormt -g=false 1. Through the current directory config.toml File configuration default […]

  • [summary] redis

    Time:2020-7-10

    1、 Overview of redis 1. NoSQL concept NoSQL: not only SQL. Non relational database, as a supplement to relational database 2. Concept of redis A key value pair database developed by redis (remote dictionary server) C language. Single QPS (reads per second) 5W+ 3. Redis data type 1.string (1) Set key value add / modify […]

  • Mybatis solves the problem of inconsistent entity class attributes and database column names in the development process

    Time:2020-7-10

    Mybatis solves the problem of inconsistent entity class attributes and database column names in the development process Note: before we stipulated that when writing entity classes, the attribute and database column names must be consistent. Thinking: when the second opening, business changes, etc., the column name in the database is inconsistent with the attribute name […]

  • Node MySQL implements asynchronous operation (Part 2)

    Time:2020-7-9

    About the previous article node Mysql to achieve asynchronous operation (Part 1) describes how to carry out asynchronous operation, this article mainly introduces how to encapsulate the basic use of node MySQL library Download MySQL Library https://github.com/mysqljs/mysql npm install mysql –save Basic use This is an example from the official GitHub //Connection configuration var mysql […]

  • [pl / SQL] returns the information from the th to the th – paging function

    Time:2020-7-9

    After reading this chapter, you will learn the following: RowNum & Minus Row_Num_ber,Rank,Densk_rank over(partition by ….. …. ) Generally, in SQL server, we can use sort and limit to get the corresponding range of values, but there are no such functions in PL / SQL. We can use rownum or row_ Number () over (partition […]

  • Analysis of restore of redis command

    Time:2020-7-9

    Grape Command syntax Command meaning: deserialize the given serialization value and associate it with the given key. Command format: RESTORE key ttl serialized-value [REPLACE] [ABSTTL] [IDLETIME seconds] [FREQ frequency] Command actual combat redis> DEL mykey 0 redis> RESTORE mykey 0 “\n\x17\x17\x00\x00\x00\x12\x00\x00\x00\x03\x00\ x00\xc0\x01\x00\x04\xc0\x02\x00\x04\xc0\x03\x00\ xff\x04\x00u#<\xc0;.\xe9\xdd” OK redis> TYPE mykey list redis> LRANGE mykey 0 -1 1) “1” […]

  • Redgate SQL compare uses the command line for database synchronization

    Time:2020-7-9

    @TOC Develop good habits The first time I wrote a blog on CSDN, I was obsessive-compulsive and a heavy tool dependent. I used various tools in my work and liked to find more black technology and high-tech products. All this is nonsense. I just want to form a good habit and write the beginning. About […]

  • Six schemes to ensure data consistency of distributed system

    Time:2020-7-9

    In e-commerce and other businesses, the system is generally composed of multiple independent services. How to solve the data consistency during distributed call? The specific business scenarios are as follows. For example, if a business operation calls services a, B and C at the same time, it needs to meet the requirements of either success […]

  • Production environment encountered a big bug – rounding database storage fields

    Time:2020-7-9

    1. Problem description In the production environment, sometimes the user‘s income can be paid normally, sometimes it can’t be.User’s fund involves account module, and fund change mainly involves freezing request, request event, transfer record and operating user’s Fund. The freezing request mainly records the parameters of the request record. The simple point is recharge and […]

  • JDBC, connection pool, mybatis principle (notes)

    Time:2020-7-9

    The main categories of native JDBC are as follows:DriverManager–Connection–Statement–ResultSet //Register driver Class.forName(driver); //New connection Connection connection = DriverManager.getConnection(url,username,password); Statement statement = connection.createStatement(); //Execute SQL ResultSet resultSet = statement.executeQuery(“select * from test where id = 1 “); //Query results while(resultSet.next()){ String name = resultSet.getString(“name”); System.out.println(” name : ” + name); } //Close resource Statement and Preparedstatement:The […]

  • Authentication mechanism of mongodb management user

    Time:2020-7-9

    1、 Introduction of mongodb user authentication mechanism In order to authenticate the client, you must add a corresponding user to mongodb. The basic steps are as follows: User management interface: db.createUser The () method can create a user. After adding a user, the user can be assigned a role. The first user must be an […]