Tag:Database

  • Advantages, disadvantages and concepts of Java redis Series 1 relational database and non relational database

    Time:2021-1-21

    Advantages, disadvantages and concepts of Java redis Series 1 relational database and non relational database Before learning redis, let’s first learn two concepts: what is a relational database and what is a non relational database, what is the difference between the two, and what is the relationship between the two? ** Relational database **Relational database […]

  • Create database

    Time:2021-1-21

    Create database After the installation of MySQL, several required databases will be automatically created in the data directory. You cansql sql SHOW DATABASES;Statement to view all existing databases. The input statement is as follows.As you can see, there are six databases in the database list. MySQL is a must. It describes the user‘s access rights. […]

  • Is the query result of “MySQL” mybatis inconsistent with the execution result of MySQL?

    Time:2021-1-21

    1. Broken thoughts Recently, we encountered a problem in the business. The business is like this: when inserting a new user, we need to verify whether some information of the user is unique, but in the program, the verification result is never unique. Then I took out the SQL statement printed by mybatis and executed […]

  • Getting started with JDBC

    Time:2021-1-21

    Getting started with JDBC   Detailed explanation 1.0DriverManager Function 1       Function 2 2.0 connection object   3.0 statement object     4.0 ResultSet A case of traversing result set   import java.sql.*; public class DQLtest { public static void main(String[] args) { //Registration driven Connection connection=null; Statement statement=null; ResultSet resultSet =null; try{ […]

  • Theoretical analysis of cache architecture

    Time:2021-1-21

    Background of the problem On the design of server cacheThe article says that caching is not necessary because the database itself uses memory. But the reality is that caching is standard for large websites. Although experience shows that RDBMS only needs 0-1ms to respond at the fastest speed, which is no less than special cache,But […]

  • Read optimistic lock and pessimistic lock and mvcc in database

    Time:2021-1-20

    preface In the actual use of the database, we often encounter situations in which we do not want the data to be written or read at the same time. For example, in the second kill scenario, two requests read to the system at the same time, and there is one inventory in the system, and […]

  • Django — Django connecting to MySQL

    Time:2021-1-20

    1Django connecting to MySQL If the project uses SQLite, it can be operated directly without additional configuration 2 Django links to MySQL by default. The driver is the mysqldb module. After Python 3. X, this module can’t be used any more. We all use pymysql and need to make a replacement 3 showmigrations: check which […]

  • Database maintenance

    Time:2021-1-20

    affair The object of database concurrency control Transaction is the logical work unit of database The operations in the sequence are either all done or none done   characteristic; Atomicity All operations in a transaction are indivisible, either executed or not executed. This is the atomicity of a transaction. uniformity A successful transaction must be […]

  • Tidb’s architecture should be based on different scenarios

    Time:2021-1-20

    Author: Huang Xiao, tug Beijing leader, tug 2020 MOA. Nowadays, distributed databases are in full bloom. What aspects should be considered when selecting database architecture? At the enterprise activity of tug lufax, Huang Xiao, the leader of tug Beijing, shared the common architecture application scenarios of tidb, and the following contents were sorted out from […]

  • [Mongo] connect Mongo database (1 / 3)

    Time:2021-1-20

    The command line enters the Mongo databasemongo View all databasesshow dbs New (or existing) fruit data table and new datadb.fruits.save({name: ‘apple’, price: 5}); lookupdb.fruits.find({price: 5}) View all the tables in the databasedb.getCollectionNames() Connection Mongo database operation conf.js module.exports = { url: ‘mongodb://127.0.0.1:27017’, dbName: ‘local’, } db.js const conf = require(‘./conf’); Const {EventEmitter} = require (‘events’); […]

  • Go practical preparation — the use of beengo

    Time:2021-1-18

    @Go practical preparation — the use of beego I have discussed before whether to use beego or gin. In fact, gin is more efficient and more flexible than beego. Other frameworks are not included for reference. There are too few start, just like recruitment. Some enterprises that are not 985 / 211 do not look […]

  • Java redis series 3 (use of jedis + jedis connection pool technology)

    Time:2021-1-18

    The use of jedis What is jedis? A java operation redis database tool Use steps 1. Download the java package required by redis2. Use steps import org.junit.Test; public class Jedis { @Test public void test1(){ //Get a connection //If NULL parameter construction is used, the default value is “localhost”, port 6379 redis.clients.jedis.Jedis jedis = new […]