构建文本内容网站的正确方法是什么?

发布于 2025-01-08 13:43:36 字数 1432 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心碎的声音 2025-01-15 13:43:36

无论您如何看待该项目,您都将使用某种描述的数据库,无论是:
1)老式的平面文件数据库(txt文档,恕我直言,不推荐用于大型项目)
2)传统的文本存储数据库
3)文档数据库

是否使用文本数据库或文档数据库的争论取决于您拥有或可能获得(或获得帮助)的技能/知识。在我看来,您对文本数据库更满意,在我看来,这没有什么问题 - 最坏的情况是,如果最终确实需要长期使用文档而不是直接文本存储您应该能够从文本数据库自动生成文档 - 我怀疑执行相反的操作会更加棘手(将大量专有文档转换为文本以进行存储和插入)。从文本数据库生成纯文本文件很简单,大多数供应商文档格式都支持导入纯文本文档以进行后续格式化。

对于这样的大型项目,您确实需要花一些时间考虑您的文档可能用于什么用途、由谁使用,以及什么方法最适合它们。如果您要为大量使用 MS Word 并想要下载您的数据的人提供数据库,您可能需要考虑使用文档数据库。如果您只是想提供信息(以及基于网络的工具),您需要考虑如何操作自己的数据。

显然,这都是意见,但我最后的建议是,如果您走文本路线(痛苦的经历),请确保从一开始就使用 utf-8 文本。

You will be using a DB of some description for this project no matter how you look at it, whether it be:
1) An old fashioned flat file database (txt documents, not recommended for large scale projects imho)
2) A traditional text storing database
3) A database of documents

The argument whether to use a DB of text or a db of documents depends on which skills/knowledge you possess or are likely to get access to (or assistance with). It sounds to me like you are more comfortable with a DB of text and in my opinion there is nothing wrong with that - worst case scenario if there ends up being a genuine need for documents to be used in the long run rather than straight text storage you should be able to generate the documents automatically from a text database - I suspect doing the reverse would be a lot more tricky (converting a load of proprietary documents to text for storage and insertion). Generating a plain text file from a text databse is trivial, and most vendor document formats support the importing of plain text documents for subsequent formatting.

For a large project like this you really need to spend some time considering what your documents are likely to be used for and by whom, and what methods best match them. If you are providing a database for people that heavily use MS Word and want to download your data you probably need to consider using a document DB. If it's just the information you want to provide (and web-based tools) you want to consider how you want to manipulate your own data.

This is all opinion obviously, but my last advice would be make sure you use utf-8 text from the outset if you go down the text route (bitter experience).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文