0
这是我明白,写下你对这个数据库的建议,我有一个在线杂志的设计:您对我设计的这本杂志数据库的想法?
- 一篇文章可以属于很多类别。
- 一篇文章可以有空或许多照片。
- 一篇文章可以有空或许多标签。
Table: `tb_categories`
Columns:
`cat_id` (Primary Key)
`catname`
`parent_id`
。
Table: `tb_articles`
Columns:
`article_id`(Primary Key)
`title`
`subtitle`
`textbody`
`source_id`
`date`
`remark`
。
Table: `tb_sources`
Columns:
`source_id` (Primary Key)
`sourcename`
。
Table: `tb_photos`
Columns:
`photo_id` (Primary Key)
`photofilename`
。
Table: `tb_tags`
Columns:
`tag_id` (Primary Key)
`tagname`
。
Table: `tb_articles_photo`
Columns:
`article_id` (Foreign Key)
`photo_id` (Foreign Key)
。
Table: `tb_articles_tags`
Columns:
`article_id` (Foreign Key)
`tag_id` (Foreign Key)
。
`tb_articles_categories`
Columns:
`article_id` (Foreign Key)
`cat_id` (Foreign Key)
null,你的意思是零? – recursive 2009-11-17 14:20:14
有什么建议?你问这个设计是否“正确”?或者如何实现设计? – 2009-11-17 14:23:45
我也没有。我会尽我所能来帮助他进行编辑。 – mauris 2009-11-17 14:24:24