数据库与纯文本 [英] Databases versus plain text

查看:126
本文介绍了数据库与纯文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当处理小项目时,你觉得在简单的文本文件,哈希表等存储数据,而不是使用真实的数据库的突破点?对于具有简单数据管理需求的小项目,真实数据库是不必要的复杂性,违反了YAGNI。然而,在某些时候,数据库的复杂性显然是值得的。什么是一些迹象表明你的问题对于简单的ad-hoc技术太复杂,需要一个真实的数据库?

When dealing with small projects, what do you feel is the break even point for storing data in simple text files, hash tables, etc., versus using a real database? For small projects with simple data management requirements, a real database is unnecessary complexity and violates YAGNI. However, at some point the complexity of a database is obviously worth it. What are some signs that your problem is too complex for simple ad-hoc techniques and needs a real database?

注意:对于习惯于企业环境的人来说,像一个奇怪的问题。然而,我的问题领域是生物信息学。我的大部分编程是原型,而不是生产代码。我主要是一个域专家,其次是程序员。我的大多数代码是以算法为中心的,而不是以数据管理为中心的。这个问题的目的主要在于让我知道如果我学习在我的代码中使用正确的数据库,而不是我通常使用的更特别的技术,我可以节省多少工作。

Note: To people used to enterprise environments, this will probably sound like a weird question. However, my problem domain is bioinformatics. Most of my programming is prototypes, not production code. I'm primarily a domain expert and secondarily a programmer. Most of my code is algorithm-centric, not data management-centric. The purpose of this question is largely for me to figure out how much work I might save in the long run if I learn to use proper databases in my code instead of the more ad-hoc techniques I typically use.

推荐答案

1)并发。你有多个人访问同一个数据集吗?如果你自己动手制作系统,那么它将非常有意义地以一种可伸缩的方式代理所有不同的读者和作者。

1) Concurrency. Do you have multiple people accessing the same dataset? Then it's going to get pretty involved to broker all of the different readers and writers in a scalable fashion if you roll your own system.

2 )格式化和关系:你的数据是否不适合整合到表结构中?长核苷酸序列和东西这样?这不是很方便的表格数据。

2) Formatting and relationships: Is your data something that doesn't fit neatly into a table structure? Long nucleotide sequences and stuff like that? That's not really conveniently tabular data.

另一个例子:没有人会考虑实现象Photoshop这样的软件来以关系格式存储PSD,因为数据结构本身并不真正适用于那种类型的存储或查询模式。

Another example: Nobody would consider implementing software like Photoshop to store PSDs in a relational format, because the data structures don't really lend themselves to that type of storage or query pattern.

3)ACID(排序是#1的必然结果):如果原子性,一致性,完整性和耐久性不是平面文件的挑战,一个平面文件。

3) ACID (sort of a corollary to #1): If Atomicity, Consistency, Integrity, and Durability are not challenges with a flat file, then go with a flat file.

这篇关于数据库与纯文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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