Tag:Primary key

  • Springboot integrates mybatis

    Time:2020-7-13

    to configure application.yml spring: datasource: username: root password: 123456 url: jdbc:mysql://localhost:3306/mybatis_test?characterEncoding=utf-8&&serverTimezone=UTC driver-class-name: com.mysql.jdbc.Driver type: com.alibaba.druid.pool.DruidDataSource #Data source other configuration initialSize: 5 minIdle: 5 maxActive: 20 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validationQuery: SELECT 1 FROM DUAL testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true #Configure the filters that are intercepted by monitoring statistics. After the […]

  • C ා to update the query table as a parameter to the database

    Time:2020-7-13

    1. Main method of importdata Put the input as the object array type, and take out the corresponding parameters according to the subscript. Here are table and username public object[] ImportData(object[] Param) { DataTable dt = (DataTable)Param[0]; string msg1 = “”, msg2 = “”, msg3 = “”; Hashtable ht = new Hashtable(); Username = param […]

  • [ asp.net Core] 7 definition of data access layer

    Time:2020-7-11

    Preface In the last article, we built a project framework, which is basically a complete project. Most of them are basic applications at present. OK, no nonsense. Let’s move on to today’s topic: complete and implement the basic implementation of the data layer. 1. Data entity Usually, the fields in the data entity of a […]

  • MySQL performance analysis memo

    Time:2020-7-10

    [TOC] Last revision time: 15:08:59, October 21, 2019 Emergency show full processlist Check the current thread processing, confirm which statements are executing and how the execution is Special attention should be paid to those with long execution time. If problems are identified, they can be usedkill {id}Kill the connection show full processlistEquivalent to the following […]

  • [ asp.net Implementation of data operation layer with EF core

    Time:2020-7-10

    Preface Through the first two articles, we created a project and defined a basic data layer access interface. In this article, we will take EF core as an example to demonstrate how to implement the data layer access interface, and the points needing attention in the implementation. 1. Add EF core Firstly, EF core is […]

  • [SQL Server] lock mechanism

    Time:2020-7-8

    Locking is a mechanism used by SQL Server database engine to synchronize multiple users’ access to the same data block at the same time. Basic concepts Using SQL Server profiler to observe lock Causes and avoidance of deadlock summary Basic concepts Database engine isolation level Isolation level definition Uncommitted read The lowest level of isolation […]

  • Mongodb object primary key objectid

    Time:2020-7-5

    General primary key generate > ObjectId() ObjectId(“5d7f4c36a7b5867462dee50e”) Extract generated time > ObjectId(“5d7f4c36a7b5867462dee50e”).getTimestamp() ISODate(“2019-09-16T08:47:50Z”) Composite primary key Primary keys can also be represented by objects, that is, composite primary keys. Create compound primary key document > db.accounts.insert({ _id:{ “name” : “david”, “balance” : 200 },”name” : “charlie”, “balance” : 500 }) WriteResult({ “nInserted” : 1 }) […]

  • Mongodb matching query and comparison operators

    Time:2020-7-4

    1、 Matching query 1. Query all > db.accounts.find() { “_id” : “account1”, “name” : “alice”, “balance” : 100 } { “_id” : ObjectId(“5d7f25f4aecbd2bc0fa821b3”), “name” : “charlie”, “balance” : 500 } { “_id” : ObjectId(“5d7f25f4aecbd2bc0fa821b4”), “name” : “david”, “balance” : 200 } { “_id” : { “name” : “david”, “balance” : 200 }, “name” : “charlie”, […]

  • Learning database, you have to know little about index

    Time:2020-7-4

    Recently, when I was looking at Alibaba’s database development specifications, I happened to see the impact of select * on query efficiency. I just remembered the database optimization architecture diagram that had not been sorted out “many years ago”. Therefore, I was excited for a moment, so I continued to complete my great career of […]

  • Architecture design | global ID generation strategy in distributed business system

    Time:2020-7-3

    This article source code: GitHub · point here | gitee · point here 1、 Introduction to global ID In the actual development, almost all the data generated by business scenarios need a unique ID as the core identification for process management. For example, common: Order: order ID, check order details, logistics status, etc; Payment: pay […]

  • MySQL table structure modification, constraints, table relations

    Time:2020-7-2

    Table structure modification (Alter) View the structure of the table: desc table name; Modify the table name: alter table name rename to new table name; Modify field name: alter table name change old field name new field name data type; Modify field type: alter table name modify field name data type; Add field: alter table […]

  • Distributed | dble paging skills_ Primary keys are split columns_ Turn pages continuously

    Time:2020-6-30

    Author: Zhong YueWorked in a large state-owned bank, engaged in the design and implementation of MySQL and distributed middleware for many years; senior MySQL database expert and architect; active contributor of dble open source project. A scene description For tables such as orders and transaction flow, it is common that the application layer will generate […]