[英]Database design for blog
I'm looking for the best way to design database for simple blog. 我正在寻找为简单博客设计数据库的最佳方法。 My idea is:
我的想法是:
Is it good solution? 这是好的解决方案吗? I use Symfony3 with Doctrine and MySQL.
我将Symfony3与Doctrine和MySQL一起使用。
In addition to the tables above, I recommend you add the following tables: 除了上面的表格,我建议您添加以下表格:
A user table should be there to track the post authors and to implement a login/registration system. 应该有一个用户表来跟踪帖子作者并实现登录/注册系统。 The same table can be used to securely manage the blog posts.
同一张表可用于安全地管理博客文章。
Also, comment system is an integral part of a blogging system. 同样,评论系统是博客系统的组成部分。 You can either have a table to store comments or integrate an external commenting system.
您可以有一个表来存储评论,也可以集成一个外部评论系统。
You can also check this ER Diagram to have more clarity about what I am saying. 您也可以查看此ER图,以更清楚地了解我在说什么。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.