用户的文本在我的数据库中作为单独的表或其他数据 [英] User's text in my database as a separate table or within other data
问题描述
此问题基于我的计划,主题。
This question is based on my plan at the thread.
我有以下表格:
alt text http://files.getdropbox.com/u/175564/table-problem-2.png
其中 kysymys 是英语的问题。
如何存储用户问题的数据:
I would like to know how I should store the data of an user's question:
- 在一个单独的表中,我有参数 question-id <
我需要中和问题主体
,以便用户不会给出破坏我的系统的代码。
I need to neutralize the question-body
somehow in the future such that user does not give code which breaks my system.
如何存储用户文本的数据?
推荐答案
您是否打算储存问题的修订?例如StackOverflow允许您修改问题文本,并存储历史记录。
Are you planning to store revisions of a question ? e.g. StackOverflow allows you to revise the question text and it stores the history.
如果是这种情况,我会分开存储文本。您将存储针对 question-id
引用的答案/注释,但问题文本将保存在单独的表中。
If this is the case I would store the text separately. You would store answers/comments referenced against the question-id
, but the question text would be held in a separate table.
您的数据中和问题(上文)与此(单独的数据问题/清洗问题)正交。
Your data neutralisation issue (above) is orthogonal to this (a separate issue of data sanitisation/cleansing).
这篇关于用户的文本在我的数据库中作为单独的表或其他数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!