我有两个 erd 向我展示了从表中访问数据的最佳方法,即
表一是类别,表二是文章
TWO Tables ERD
Table Category
(CategoryId
CategoryName
CategoryDescription );
Table Articles
(ArticlesId
ArticlesTitle
ArticlesBody
ArticlesCreatedby
CategoryId (`forigen Key`FK));
我没有发布图片的声誉,但这里是图解 ERD 图片的链接。
http://i341.photobucket.com/albums/o377/pakistanihaider/relation1_zps06c6e6ec.png
或者
表一是Category,表二是Articles,第三个是Category & Articles
Three Tables ERD
Table Category
(CategoryId
CategoryName
CategoryDescription );
Table Articles
(ArticlesId
ArticlesTitle
ArticlesBody
ArticlesCreatedby
);
Table Category & Articles
(Category_id
Articles_id);
第二个代码的图解 ERD:
http://i341.photobucket.com/albums/o377/pakistanihaider/relation_zpsea5d55a9.png