SZU data design and Analysis Chapter 3 relational algebra
@
Relational algebra
1. Union (U)
1.1 definition:
Union (\ (\ cup \)
The result of this operation, R S, is a relationship that contains all tuples in R or S or both. Duplicate tuples do not appear in the output.
Formally: \ (R\) \(\cup\) \(S\) \(=\) \(\{\) \(t | t\) \(\in\) R or t \(\in\) S \ (\} \)
Joint compatibility: let R and S be two rel ...
Posted by harman on Sat, 08 Jan 2022 09:15:10 +0100
Today, let's analyze several common table connection methods in SQL in detail
Introduction: SQL optimization is the most important part of database performance optimization. The key of SQL optimization is inseparable from three points: table connection mode, access path and execution order. This paper focuses on several common connection modes.
For multi table Association query, the execution steps of the query optimize ...
Posted by MSK7 on Sat, 08 Jan 2022 02:24:01 +0100
Level dB MemDB source code analysis
prefaceRecently, I was studying and learning the source code of leveldb and tried to rewrite leveldb RS with Rust. The memdb module in leveldb uses skiplist as a kv memory storage. The implementation of the relevant code is very beautiful, so I have this article. Leveldb implements skiplist by using Arena mode. In short, it uses linear arrays t ...
Posted by rajavel on Fri, 07 Jan 2022 10:02:03 +0100
Redis OM .NET Redis object mapping framework
Redis OM
Redis OM is an Object Mapping framework officially launched by redis, that is, Object Mapping. It allows developers to operate redis data more simply and conveniently. The data stored in redis is abstracted as Object Mapping and supports object-based redis data persistence and streaming query operations.
Currently, only four developm ...
Posted by admin101 on Fri, 07 Jan 2022 08:20:33 +0100
Use mybatis plus to add, delete, modify and query the database (including logical deletion, primary key generation, optimistic lock and paging query)
CRUD
insert
insert should mainly focus on the processing of primary key fields by mybatis plus
Primary key generation strategy
Extension: common strategies for generating primary keys
UUIDSelf increment IDSnowflake algorithmGenerated using redis
Snowflake algorithm:
The id generated by SnowFlake algorithm is a 64bit integer, which ...
Posted by bluto374 on Fri, 07 Jan 2022 07:10:11 +0100
Introduction to Redis
Redis overview
Redis is a key value storage system (official website: http://redis.io ), is a distributed cache database
Redis initial operation
Start redis service
Startup in docker environment (multiple containers need to be run to start docker environment):
The # bottom layer of docker start redis01 is also started through redis serv ...
Posted by binujayaraj on Fri, 07 Jan 2022 06:40:09 +0100
MySQL four isolation levels and concurrency problems.
1. Four characteristics of transactions
A transaction is an integral unit of one or more SQL statements. A set of SQL statements in a transaction either succeed or fail. Four properties ACID
Atomic atomic
consistency
Isolation for concurrency in the database, the better the isolation, the lower the concurrency. It is based on innodb's locki ...
Posted by xkellix on Fri, 07 Jan 2022 05:32:32 +0100
4000 words, detailed explanation of Python operating MySQL database
The focus of this article is to teach you how to operate MySQL database with Python.
1. General steps
In fact, there is a general step here, which is written dead. Just follow it.
# 1. Import related libraries
import pymysql
# 2. Link MySQL server
db = pymysql.connect(host='localhost' , user='root' , password='******' , port=3306 ,db='sp ...
Posted by dmschenk on Fri, 07 Jan 2022 05:04:10 +0100
Technology sharing | self made GreatSQL Docker image
The original content of GreatSQL community cannot be used without authorization. Please contact Xiaobian and indicate the source for reprint.In the near future, we plan to create a docker image of GreatSQL to facilitate community users to use GreatSQL.The environment for making docker images is based on CentOS 7.9:[root@greatsql]# cat /etc/redh ...
Posted by gardnc on Fri, 07 Jan 2022 02:54:47 +0100
CentOS8 deploying MariaDB master-slave database service
catalogue
1, Installation environment
2, Initialize database
3, Configure master node masterdb
4, Configure slave node slavedb
5, Validate database master-slave service
1, Installation environment preparation
1. Node planning
Prepare two virtual hosts to act as master dB and slave DB respectively
IP addressHost namenode192.168.18.8mas ...
Posted by mATOK on Thu, 06 Jan 2022 16:45:36 +0100