Just use files for blogs. Put them in folders by date and name the folders with dates. Tags also use folders, and put softlinks of article files in them
To use NoSQL database, you must first abandon the idea of relational database. Use an object-based approach to handle data structures. Each NoSQL database represents a different design idea for object processing. This problem is too big. To learn NoSQL, forget about relational databases first.
Having used Mongodb, I designed it like this, for the article:
Query articles by tags and categories, you can use aggregation Map/Reduce, etc.
For Redis, processing these is mainly implemented in your own application.
Just use files for blogs. Put them in folders by date and name the folders with dates. Tags also use folders, and put softlinks of article files in them
SQL name | MongoDB name
database | database
table | collection
row | document/BSON document
column | field
index | index
table | joins
primary key | primary key
Example: Create a table
Use SQL statements
Use NoSQL statements
You can completely use the idea of relational database to design the database, such as:
category collection:
posts collection:
You can also nest sub-documents, there are many posts doc under category collection
category:
To use NoSQL database, you must first abandon the idea of relational database. Use an object-based approach to handle data structures. Each NoSQL database represents a different design idea for object processing. This problem is too big. To learn NoSQL, forget about relational databases first.
Many people have answered, but I haven’t seen a more comprehensive answer