私はフォーラムのウェブサイトを構築していましたが、そのMysql構造を作成する方法を決定できませんでした。ここのように、ユーザーはたくさんの質問をし、ユーザーは何度も答えますが、回答が多いと上書きされることはありません。だから、私はフォーラムのWebサイトの質問と回答のテーブルのテーブルを作成します。各ユーザーの質問と回答の表のテーブルを1つだけ作成すると、上書きされませんか?フォーラムのウェブサイトのMysql構造
0
A
答えて
1
ユーザー表:
user_id (int, auto_increment)
username (varchar)
password (varchar, 32 (md5))
email (varchar (to recover password))
フォーラム表:
forum_id (int, auto_increment)
forum_title (varchar)
forum_category (int)
フォーラムサブカテゴリ:
forum_subcat_id (int, auto_increment)
forum_id (int)
forum_subcat_title (varchar)
forum_subcat_description (text)
フォーラムのスレッド:
thread_id (int, auto_increment)
thread_title (varchar)
thread_body (text, regular thread format)
forum_subcategory (int, where it belongs)
posted_by (int, the user that posts the thread)
posted_on (int, timestamp of the time the thread was posted)
コメント表:
comment_id (int, auto_increment)
comment_body (text, comment text)
thread_id (int)
commented_by (int, user_id)
comment_time (int, timestamp of the time the comment was posted)
はちょうどあなたが評価システムのような多くの機能を追加することができますあなたのコースの、それがどのように見えるか、幅広いアイデアを、与え、世論調査など
0
これは、質問と回答の両方に対して1つのテーブルを作成しないためです。代わりに、2つのテーブルがあります。例えば:もちろん
Question
========
question_id
question_text
と
Answer
======
answer_id
user_id
question_id
date_answered
answer_text
、USER_IDは、上記ユーザを収容するためのさらに別のテーブルを意味しています。
関連する問題
- 1. ウェブサイトの構造/アーキテクチャ
- 2. フォーラムとフォーラムのポストをDrupal 7のメニュー構造に関連付ける方法
- 3. MVC3ウェブサイトの構造ヘルプ
- 4. Asp.Netウェブサイト構造の質問
- 5. 私のウェブサイト(mysql)の正しいデータベース構造を作成する
- 6. MySQLテーブルの構造
- 7. MYSQLのデータベース構造
- 8. フォーラムの構造最後の投稿を取得する
- 9. MySQLプロシージャー構造
- 10. Laravelのゲームのウェブサイトの構造
- 11. MySQLのタイムテーブルのデータ構造
- 12. MySQLのDB構造のヘルプ
- 13. XML構造からMySQLテーブル構造へ
- 14. ウェブサイトのディレクトリ構造とファイルのパス
- 15. MySQLの構造 - ユニークなユーザグループ
- 16. MySQLデータベーステーブルの構造化
- 17. 木構造の関数Mysql
- 18. ソーシャルネットワークPHP/MySQLの構造
- 19. コードコンテンツ構造の多言語ウェブサイト
- 20. PHP \ MySqlマルチユーザシステムバックエンド構造
- 21. MySQL/PHP - マルチティアカテゴリ構造
- 22. PHP + MySQLフォーラム表示
- 23. MySQL会計コードデータベース構造
- 24. mysql構造体double unique
- 25. json構造をmysqlにエクスポート
- 26. MYSQLテーブル構造グローバルNULL値
- 27. PHP/MYSQLコメント返信表の構造
- 28. Mysqlデータベースのデータベース構造をコピー
- 29. 構造内のシャッフリング構造
- 30. ツリーデータ構造のデータベース構造