您将如何构建论坛的数据库架构? [英] How would you structure a forum's DB schema?

查看:100
本文介绍了您将如何构建论坛的数据库架构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个练习的小论坛.我看到像phpBB这样的论坛将线程文本存储在单独的表中.

I'm building a little forum for practice. I see that forums like phpBB store the thread text in a separate table.

为什么?为什么不将它们全部存储在同一张表中?

Why? Why not store it all in the same table?

类似的东西:thread_id, thread_date, thread_text, thread_author

为什么这样做?你会怎么做?

Why is it done this way? How would you do it?

推荐答案

我在线上找到了这个很酷的模式.

I found this cool schema online.


(来源: yensdesign.com )


(source: yensdesign.com)

对于任何基本论坛的数据库架构来说似乎都是不错的入门.

seems pretty good starter for the database schema of any basic forum.

我知道这很老了,但是想过我会把它发布给任何会再次发现这个问题的人.

I know this is old, but figured I'd post this for anyone who's gonna find this question again.

这篇关于您将如何构建论坛的数据库架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆