将文件系统(不是数据库!)用于无模式数据 - 最佳实践 [英] Using a Filesystem (Not a Database!) for Schemaless Data - Best Practices

查看:22
本文介绍了将文件系统(不是数据库!)用于无模式数据 - 最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

阅读我的其他问题后,使用关系无模式数据的数据库,我开始怀疑文件系统是否比关系数据库更适合存储和查询无模式数据.

After reading over my other question, Using a Relational Database for Schema-Less Data, I began to wonder if a filesystem is more appropriate than a relational database for storing and querying schemaless data.

不只是在 MySQL 之上构建文件系统,为什么不直接将数据保存到文件系统中呢?需要弄清楚索引,但现代文件系统非常稳定,具有复制、快照和备份设施等强大功能,并且可以灵活地存储无模式数据.

Rather than just building a file system on top of MySQL, why not just save the data directly to the filesystem? Indexing needs to be figured out, but modern filesystems are very stable, have great features like replication, snapshot and backup facilities, and are flexible at storing schema-less data.

但是,我找不到 任何 人使用文件系统而不是数据库的示例.

However, I can't find any examples of someone using a filesystem instead of a database.

我在哪里可以找到更多关于如何将无模式(或面向文档")数据库实现为文件系统之上的层的资源?有人使用现代文件系统作为无模式数据库吗?

Where can I find more resources on how to implement a schemaless (or "document-oriented") database as a layer on top of a filesystem? Is anyone using a modern filesystem as a schemaless database?

推荐答案

是的,文件系统可以被视为类似 NOSQL 的数据库系统的特例.它可能有一些限制,在任何设计决策中都应该考虑:

Yes a filesystem could be taken as a special case of a NOSQL-like database system. It may have some limitations that should be considered during any design decisions:

优点:-- 简单、直观.

pros: - - simple, intuitive.

  • 利用多年的调优和缓存算法
  • 轻松备份,可能轻松集群

需要考虑的事情:

  • 元数据的丰富性 - 什么类型它存储数据,它如何让你问他们,你能有吗分层或多值属性

  • richness of metadata - what types of data does it store, how does it let you query them, can you have hierarchal or multivalued attributes

查询元数据的速度 - 并非全部fs 的优化特别好除了大小、日期之外的任何内容.

speed of querying metadata - not all fs's are particularly well optimized with anything other than size, dates.

无法加入查询(尽管这对 NoSQL 来说很常见)

inability to join queries (though that's pretty much common to NoSQL)

存储使用效率低下(除非文件系统执行块子分配,您通常会每件商品花费 4-16K无论大小如何存储)

inefficient storage usage (unless the file system performs block suballocation, you'll typically blow 4-16K per item stored regardless of size)

这篇关于将文件系统(不是数据库!)用于无模式数据 - 最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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