当可伸缩性不相关时,NoSQL与SQL [英] NoSQL vs. SQL when scalability is irrelevant

查看:129
本文介绍了当可伸缩性不相关时,NoSQL与SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我读了很多关于不同的NoSQL数据库,以及它们如何被一些主要网站有效地部署。我开始一个项目,我认为数据库,如MongoDB的无模式性质将是非常有用的。我已经阅读的一切似乎表明NoSQL数据库的主要优点是可扩展性。正在为可扩展性设计决策选择NoSQL数据库作为合法的设计决策?

Recently I have read a lot about different NoSQL databases and how they are being effectively deployed by some major websites out there. I'm starting a project in which I think the schema-free nature of a database such as MongoDB would be tremendously useful. Everything I have read though seems to indicate that the main advantage of a NoSQL database is scalability. Is choosing a NoSQL database for the schema-free design just as legitimate a design decision as that of scalability?

推荐答案

RDBMS不是最好的解决方案,虽然有方法来适应用户定义的字段(见XML数据类型,EAV设计模式,或只是有备用的通用列),有时一个无模式数据库是一个不错的选择。

Yes, sometimes RDBMS are not the best solution, although there are ways to accomodate user defined fields (see XML Datatype, EAV design pattern, or just have spare generic columns) sometimes a schema free database is a good choice.

但是,在选择使用文档数据库之前,您需要确定您的要求,因为您会失去许多可能用于关系型模型

However, you need to nail down your requirements before choosing to go with a document database, as you will loose a lot of the power you may be used to with the relational model

例如...

如果您的RDBMS数据库中有多个表,研究MongoDB的功能为您提供满足这些需求。

If you would otherwise have multiple tables in your RDBMS database, you will need to research the features MongoDB affords you to accomodate these needs.

如果您需要以特定方式查询数据,那么您还需要研究MongoDB为您提供的服务。

If you will need to query the data in specific ways, again you need to research what MongoDB offers you.

我不会想到NoSQL是RDBMS的替代品,而是一个稍微不同的工具,带来了自己的优点和缺点,使它更适合一些项目。

I wouldnt think of NoSQL as replacement for RDBMS, rather a slightly different tool that brings its own sets of advantages and disadvantages making it more suitable for some projects than others.

(在某些情况下可能会使用这两个数据库,如果你决定沿着可能使用MongoDB的路线,一旦你研究了网站,具体问题,您可以访问Freenode IRC #mongodb频道)

(Both databases may be used in some circumstances. Also if you decide to go down the route of possibly using MongoDB, once you have researched the websites out there and have more specific questions, you can visit Freenode IRC #mongodb channel)

这篇关于当可伸缩性不相关时,NoSQL与SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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