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
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)
1. Relationship with c ...
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
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
--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
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
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 ...
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 ...
Redis master-slave replication
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 ...