mysql 中怎么做好
redis 中又怎么做好
- mysql
Categoryid
name
description
status
Postid
title
content
category_id
(Category 外键)
Tagid
content
Post_Tagid
post_id
tag_id
其中 Post 和 Category 一对多
Post 和 Tag 多对多
- redis
不了解
redis 存储tag和文章的关系
比如
KEY:redis_article_{文章ID}
VALUE:tag_id1,tag_id2,tag_id3, ....