this post was submitted on 16 Sep 2026
30 points (100.0% liked)
Programming
28664 readers
232 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities !webdev@programming.dev
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Depends on the data you want to store and what you want to do with it. I haven't used either MongoDB or Redis in particular, but MongoDB (or e.g. CouchDB) is a document-oriented database, whereas Redis/Valkey is a key-value store.
Superficially, these are similar kinds of databases, in that you have a key and store a value. But document-oriented typically enforces the format somewhat, like e.g. some JSON format, which is then used for doing indexing, aggregation, search or whatever in the database.
Meanwhile, a key-value store does not care what data is actually stored inside. It can literally be just some bytes. You tell it the key and it tells you the data you previously stored, and that's all you do with it.
I wouldn't be surprised, though, if Redis doesn't fit that definition 100% and actually has some optional document-oriented features as well.
From your very short description of what you want to do, my intuition would be more towards document-oriented, because the indexing is presumably essential for a search engine.
But as someone else already said, MongoDB is proprietary now, so probably want to look for an alternative. Selecting the database is worth spending some time on, since the right database might already bring along the search capabilities you want.
I also want to throw in a third type of database that you should probably look into: https://en.wikipedia.org/wiki/Graph_database
Graph databases are good at storing relationships between entries, which you will have a lot of, given each webpage links to other webpages. I believe, the big-boy search engines do use graph databases.