基本的数据库结构:
CMS模块核心实体关系图:
+------------+
| CmsSite |
+------------+
|
| (站点下有多个栏目)
v
+------------+
+--------|CmsChannel |<-------+
| +------------+ |
| | |
| | |
v v v
+----------------+ +----------+ +---------------+
| CmsCategory | |CmsArticle| | CmsSinglePage |
+----------------+ +----------+ +---------------+
^ ^
| |
| |
+----------------+ +----------+
|CmsCategoryRel. | |CmsLabel |
+----------------+ +----------+
| ^
| |
| |
| +----------+
+------->|CmsLabelRel|
+----------+
关系说明:
1. CmsChannel(栏目)是核心实体,与多个其他实体有关联
2. CmsArticle与CmsCategory是多对多关系,通过CmsCategoryRelations表实现
3. CmsArticle与CmsLabel是多对多关系,通过CmsLabelRelations表实现
4. CmsChannel和CmsCategory都支持树形结构(父子层级)