MongoDB entry practice - Installation
This article mainly introduces the installation of MongoDB and the software versions used: MongoDB 5.0.5 and Centos 7.6.
1. Stand alone installation
1.1. Download and unzip MongoDB
Download address: https://www.mongodb.com/try/download/community
Decompression: tar zxvf mongodb Linux x86_ 64-rhel70-5.0.5. tgz
1.2. Create data and log direct ...
Added by Jamesm on Sat, 26 Feb 2022 08:55:06 +0200
Database and table creation
catalogue
1, Three paradigms of database
1. First paradigm (ensure that each column remains atomic)
2. Second normal form (ensure that every column in the table is related to the primary key)
3. The third paradigm (ensure that each column is directly related to the primary key column, not indirectly)
2, Tablespace
1. Relationship with c ...
Added by pieai on Sat, 26 Feb 2022 04:17:22 +0200
Redis cluster (master-slave replication, sentinel mode, cluster mode)
catalogue
1, Redis master-slave replication
1.1 definitions
1.2 role of master-slave replication
1.3 Redis master-slave replication process
1.4 set up Redis master-slave replication
Experimental environment
Install redis
Modify redis configuration file (Master node operation)
Modify redis configuration file (Slave node operation)
1.5 ...
Added by Stevan on Fri, 25 Feb 2022 18:43:20 +0200
Advanced part of SQL question brushing series
Addition, deletion and modification
SQL1 insert record (I)
In fact, through the output, we can know the value of the inserted data.
insert into exam_record values
(
null, 1001, 9001, '2021-09-01 22:11:12', '2021-09-01 23:01:12', 90
),
(
null, 1002, 9002, '2021-09-04 07:01:02', null, null
);
You can also use interval to ad ...
Added by Eratimus on Fri, 25 Feb 2022 18:41:17 +0200
Database event
Database event
Event is a procedural database object called by MySql at the corresponding time. An event can be called once or started periodically. It is managed by a specific thread, which is the so-called "event scheduler".
Events are similar to triggers, which start when something happens. When a statement is started on the ...
Added by alex2046 on Fri, 25 Feb 2022 15:03:47 +0200
Common basic problem sets and notes of SQL database
catalogue
object
Problem set:
--01 list the names of all departments with at least 3 employees
--02 list all employees whose salary is more than 'SMITH'. A sub query is used here (that is, the sub query of SMITH's salary)
--03 list the names of all employees and their immediate supervisors
--04 list employees whose employment date is earl ...
Added by swatisonee on Fri, 25 Feb 2022 11:30:32 +0200
Research on Innodb lock mechanism - gap lock
Lock algorithm in Innodb
There are generally three locking algorithms commonly used in innodb, namely
1. Record lock
2. Gap Lock
3. next key lock
The Next key lock is the combination of Gap lock and Record lock. It locks a range and locks the Record itself.
In other words, the next key lock is not a separate lock. As far as I understand, ...
Added by Black Hobbit on Fri, 25 Feb 2022 10:59:43 +0200
Database: redis
1, Introduction to Redis
NoSQL (Not Only SQL), which means Not Only SQL, but also non relational database.
with the development of internet web2 With the rise of web2.0 website, the traditional relational database is dealing with web2.0 0 websites, especially the super large-scale and highly concurrent SNS type web2 0 ...
Added by witty on Fri, 25 Feb 2022 04:21:39 +0200
django model layer, ORM operation details, query operation, update operation, delete, F object, Q object, aggregate query, native database operation
ORM operation The basic operations include addition, deletion, modification and query, that is, crud operation. The core of ORM CRUD is the model class Manager object
Manager object Each inherits from models The model class of model will also have an objects object inherited. This object is called the manager object. The addition, deletion, mo ...
Added by zenag on Fri, 25 Feb 2022 03:51:35 +0200
06 redis architecture design and application practice
Redis master-slave replication
brief introduction
The read-write capability supported by a single redis is still limited. At this time, we can use multiple redis to improve the concurrent processing capability of redis. How these redis cooperate requires a certain architecture design. Here, we first analyze and implement the master / slave ar ...
Added by genie on Thu, 24 Feb 2022 13:36:46 +0200