首页 \ 问答 \ 为什么noSQL数据库比SQL更具可扩展性?(why are noSQL databases more scalable than SQL? [closed])

为什么noSQL数据库比SQL更具可扩展性?(why are noSQL databases more scalable than SQL? [closed])

最近我读了很多关于noSQL DBMS的文章。 我理解CAP定理,ACID规则,BASE规则和基本理论。 但是没有找到任何关于为什么noSQL比RDBMS更容易扩展的资源(例如在系统需要大量数据库服务器的情况下)? 我想保持约束和外键会花费资源,而且当DBMS分发时,它会复杂得多。 但我希望有更多的东西。

有人可以解释noSQL / SQL如何影响可伸缩性?


Recently I read a lot about noSQL DBMSs. I understand CAP theorem, ACID rules, BASE rules and the basic theory. But didn't find any resources on why is noSQL scalable more easily than RDBMS (e.g. in case of a system that requires lots of DB servers)? I guess that keeping constraints and foreign keys cost resources and when a DBMS is distributed, it is a lot more complicated. But I expect there's a lot more than this.

Can someone please explain how noSQL/SQL affects scalability?


原文:https://stackoverflow.com/questions/15888267
更新时间:2022-01-12 21:01

最满意答案

我认为使用sed可以有更简单的解决方案:

sed -E 's/, /,/g'

如果您不确定逗号的位置,可以使用正则表达式(请参阅@anubhava注释 ):

sed -E 's/ *, */,/g'

例:

$ echo "(1, 2, 3) and (4 ,5 ,6)" | sed -E 's/ *, */,/g'
(1,2,3) and (4,5,6)

I think you can have much simpler solution using sed:

sed -E 's/, /,/g'

If you're not sure about the comma's position, you can use a regex (see @anubhava comment):

sed -E 's/ *, */,/g'

Example:

$ echo "(1, 2, 3) and (4 ,5 ,6)" | sed -E 's/ *, */,/g'
(1,2,3) and (4,5,6)

相关问答

更多
  • 您不希望使用变量进行替换(例如,因为它可能包含换行符)。 我假设它是GNU sed,因为它是linux 。 在这种情况下,请查看GNU sed的r命令是否可以帮助您: `r FILENAME' As a GNU extension, this command accepts two addresses. Queue the contents of FILENAME to be read and inserted into the output stream at the en ...
  • 我认为使用sed可以有更简单的解决方案: sed -E 's/, /,/g' 如果您不确定逗号的位置,可以使用正则表达式(请参阅@anubhava注释 ): sed -E 's/ *, */,/g' 例: $ echo "(1, 2, 3) and (4 ,5 ,6)" | sed -E 's/ *, */,/g' (1,2,3) and (4,5,6) I think you can have much simpler solution using sed: sed -E 's/, /,/g' I ...
  • 为了开始看看这个,它可以帮助你理解你想要如何: http://help.discretelogix.com/php/yii/enable-in-place-editing-in-yii-grid.htm 在理解之后,您需要创建自己的窗口小部件来完成此操作 你可以查看现有的扩展,试图做你以后的事情: http : //www.yiiframework.com/extension/editablegridview/ http://yiitutorials.net/easy/creating-a-widget-w ...
  • 您可以使用xargs和I和一个占位符{}来存储值stdin并将其传递给sed date +%s | md5sum | cut -d' ' -f 1 | xargs -I {} sed -i.bak 's/^\(CSS=\).*/CSS={}/' file 但我会明智地避免引入另一条管道,并会使用sed的分隔命令 newHash=$(date +%s | md5sum | cut -d' ' -f 1); sed -i.bak "s/^\(CSS=\).*/CSS=${newHash}/" file Y ...
  • 这是一个非常广泛的问题。 一般来说,我建议参考dask.dataframe文档 。 Dask.dataframe没有实现所有pandas。 这包括以下类型的操作: 变异操作 难以完全并行执行的操作,如中位数(尽管通常存在近似解,如近似分位数) 迭代数据帧的行 API的小角落,没有人费心去复制。 但是,因为dask数据帧只是许多小型数据帧的集合,所以在简单的情况下,您通常可以解决其中一些限制。 This is a very broad question. In general I recommend refe ...
  • 在Python中,没有原始操作可以“就地”修改文件; 相反,它有一个辅助类文件fileinput函数,它通过首先将文件复制到备份文件,然后读取备份文件并将处理结果写入原始文件,从而给出修改文件的错觉。 从手册 : 可选就地过滤:如果将fileinput.input() inplace=1的关键字参数传递给fileinput.input()或FileInput构造函数,则文件将移至备份文件,并将标准输出定向至输入文件(如果文件与备份文件相同的名称已经存在,它将被无提示地替换)。 这使得可以编写一个过滤器来重写 ...
  • 1) 代码在末尾添加替换文本,原始位置的文本不变。 你无法替换文件的正文,因为你用+信号打开它。 这样它就会附加到文件的末尾。 file = open('example.php','rb+') 但这仅适用于您要附加到文档末尾的情况。 要绕过此操作,您可以使用seek()导航到特定行并替换它。 或者创建2个文件: input_file和output_file 。 2) 此外,它不是仅仅替换了文本,而是打印出整行。 这是因为你正在使用: file.write( line.replace('Original', ...
  • 如果我正确地理解了你,你可以使用sed来完成这个任务,假设电子邮件存储在一个$EMAILVAR环境变量中: sed -i -e "s/\\(LF_ALERT_TO[ \\t]*=[ \\t]*\"\\)[^\"]*\"/\\1$EMAILVAR\"/" config.txt 这里我们告诉sed替换一个包含(按顺序)的字符串: LF_ALERT_TO 一系列空格和/或制表符( [ \t]* ) = 另一个空格和/或制表符序列 " 不是" ( [^"]* )的字符序列 " 项目1-5放置在反斜杠括号之间。 这 ...
  • 这个问题的解决方案非常复杂,但我找到了一种方法。 令我惊讶的是,解决方案并不容易获得,因为正如r-dub所说的那样,它似乎很常见。 我最终没有使用jQuery插件的任何编辑就位功能,而是在表单文本字段的基础上直接在jQuery的帮助下修改了一个文本字段。 换句话说,我跟着上面的(B)。 我有一个看起来像这样的观点: Available: <%= @available_credits %> Remaining:
    StringIO尝试以读/写方式模拟常规文件,但它存储在内存中。 尝试使用常规文件编辑文本文件时会遇到相同的问题(替换为较长的字符串会覆盖以下行)。 您也有相同的选择。 小的其他更改:在start时使用默认字符串创建的cStringIO不可写。 但是你可以通过创建一个空对象并写入它来解决这个问题(你现在显然可以访问一个write方法) 你在找什么: c = 'can\nhaz\nfoo' sio = StringIO() sio.write(c) sio.seek(0) offset = sio.tel ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。