Posts

Showing posts with the label nosql

Redis Fundamentals

Image
Introduction Redis is the world's fastest in-memory database. It offers cloud and on-premises solutions for caching, vector search, and NoSQL databases. In-memory is a concept related to how data is stored and accessed in a computer. When we talk about in-memory, we refer to storing data directly in the computer's RAM (Random Access Memory) rather than on a hard drive. Here are some key points about in-memory storage: Storing data in RAM :   When data is stored in-memory , it is kept in the computer's RAM . RAM has faster access speeds compared to hard drives, allowing for quicker data querying and processing.   The read and write speed of RAM is very fast, typically reaching several GB/s . The read and write speed of SSDs ( Solid State Drives ) usually starts from 320 MB/s and can reach thousands of megabytes per second. The read and write speed of HDDs ( Hard Disk Drives ) is lower, generally ranging from 80 MB/s to 160 MB/s. In-memory data is often used f...

Using MongoDB on Docker

Image
Introduction MongoDB is a widely popular NoSQL database today due to its simplicity and several advantages over relational databases. Through this guide, you'll learn how to quickly use MongoDB within Docker without going through many complex installation steps. Note that before starting, you need to have Docker installed on your machine. Starting MongoDB on Docker You just need to execute the following command: docker run -e MONGO_INITDB_ROOT_USERNAME=username -e MONGO_INITDB_ROOT_PASSWORD=password --name mongo -p 27017:27017 -v /data/db:/data/db -d mongo Explanation of the command: - `-e MONGO_INITDB_ROOT_USERNAME=username -e MONGO_INITDB_ROOT_PASSWORD=password`: Sets environment variables for MongoDB initialization. You can replace "username" and "password" with your desired credentials. - `--name mongo`: Sets the name for the container. - `-p 27017:27017`: Exposes the MongoDB port for usage. - `-v /data/db:/data/db`: Mounts a volume from ...