Redis uses a different MongoDB paradigm.
Redis uses the key-value paradigm for data storage. Basically, it's a "giant array" that stays in the server's memory, you ask Redis to "give me the key data XXX" and it only returns the data. It can work with simple data and with data lists.
Advantages: Access to data is done in an agile way, without access to the disk , from asthmatic form O (1) (translating: very fast indeed).
Disadvantages: It does not allow special operations such as SQL joins or data nesting, not to mention that because the data is all stored in RAM, you need available memory space of the same size as the amount of data you are going to store, which can be a problem.
MongoDB uses the documents paradigm . It stores the data in JSON format, in a nested way (documents can contain data, arrays or other documents) and not relational.
Advantages: quick access to data and easy visualization because it is a JSON, which is much more human-readable than other data formats.
Disadvantage: Just like Redis, there is no data relationship. If a relationship is needed, it must be performed at the application level, for example: User B was created by User A, but User A was deleted from the system, so it is up to your application to treat this type of null referencing, since MongoDB does not make relationships.
In short: Redis is an array that stays in memory and is most commonly used for simple things that need to be cached or for quick access. MongoDB is a flexible document database that does not use relationships between documents and allows documents to store data, arrays, and even other documents.