用于文本修订的数据库设计

编程入门 行业动态 更新时间:2024-10-25 08:15:28
本文介绍了用于文本修订的数据库设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这个问题包含了如何设计数据库历史/修订方案

This question contains some excellent coverage of how to design a database history/revision scheme for data like numbers or multiple choice fields.

但是,对于大文本字段没有太多的讨论,这通常在博客/ Q& A / wiki /文档类型系统中找到。

However, there is not much discussion of large text fields, as often found in blog/Q&A/wiki/document type systems.

那么,什么会被认为是在基于数据库的编辑系统中存储文本字段的历史的好方法?

So, what would be considered good practice for storing the history of a text field in a database based editing system? Is storing it in the database even a good idea?

推荐答案

我开发了一个wiki引擎和页面/文章修订版本存储在数据库中数据库表。每个修订版都有一个顺序修订号,而当前修订版则标有-1(只是为了避免NULL)。

I develop a wiki engine and page/article revisions are stored in a database table. Each revision has a sequential revision number, while the "current" revision is marked with -1 (just to avoid NULL).

修订文本按原样存储差异或类似的东西。

Revision text is stored as-is, not diffed or something like that.

我认为性能不是一个问题,因为你不太可能访问旧版本很频繁。

I think that performance is not a problem because you are not likely to access older revisions very frequently.

更多推荐

用于文本修订的数据库设计

本文发布于:2023-07-08 20:17:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1080302.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!