TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why NoSQL

90 点作者 typingmonkey超过 3 年前

24 条评论

invalidname超过 3 年前
NoSQL are super easy to start with. Then you have a pile of heaping unstructured data that&#x27;s hard to query, hard to report and gain insight on.<p>Every data task becomes a programming problem which needs a team to work on to get something that might be stale. With SQL there&#x27;s a lot of work. But you have a DB that everyone knows. 3rd party tools work. Developer on-boarding is easy. Your boss asks you how many users used feature X in the past month you can actually tell him right away...<p>Performance is actually good and consistent. Your data is also consistent and respects acid principles. The whole write performance of NoSQL DBs is a bit of a crock that doesn&#x27;t stand the test of scaling. With proper cashing SQL is as performant when done right and the profiling tools are better. Screw no-SQL. They are just Object Oriented DBs (which were a disaster in the 90s) in new clothes.
评论 #28768541 未加载
评论 #28769530 未加载
评论 #28768680 未加载
评论 #28769116 未加载
评论 #28770614 未加载
评论 #28769368 未加载
er4hn超过 3 年前
I feel like I&#x27;m missing something in this article. Several of the points just don&#x27;t make any sense to me.<p>* Their point about how you can just rewrite relational queries manually and not lose any performance does not seem true the moment that you need to join tables on a condition.<p>* Their section on reliable replications can be resolved by keeping a log of the changes made to the database rather than a log of the queries. I don&#x27;t understand how their NoSql model of &quot;Download the latest doc during a change&quot; is any better. It basically becomes &quot;last writer wins&quot; in a distributed system.<p>* The downgrading to NoSql argument makes little sense to me as well. If your frontend is sqlite then you can have Postgres, or MariaDb in your backend. You need to account for having different queries on the front and the back, but the backend is presumably also operating under very different constraints than the frontend.<p>* I&#x27;d actually make an argument that NoSql databases are a type of relational database heavily optimized towards not needing to do joins. The corollary to this is that over time you may find that, oops, you do want to do joins, and now you have to pay a tax on not being set up to do so in the first place.<p>* Also, is it just me or is the Hybrid Logical Clock they mention a type of Lamport Clock where the linked article doesn&#x27;t ever state that?
评论 #28769606 未加载
评论 #28769444 未加载
评论 #28769549 未加载
nine_k超过 3 年前
NoSQL is just a poor term. It lumps together a number of radically different approaches. Imagine a term like NoCar that would lump together airplanes, bicycles, boats, trains, and scooters, just because they are means of transportation which are not a car.<p>Things like Redis, Kafka, Consul, FoundationDB, RRDTool, git, S3, and plain files are all NoSQL databases of sorts. They all are useful in certain areas, all have very different features and guarantees, and each would be a poor substitute for each other or for an SQL database. (Likely even MongoDB can be useful in some areas, even though I have a hard time imagining that.)<p>I wish the whole &quot;NoSQL&quot; moniker would go away, replaced by a few terms that make more sense.<p>That said, the original article is a good one, laying out the upsides and downsides of a document database, and why it makes sense as a <i>local,</i> per-app database.
评论 #28774888 未加载
irrational超过 3 年前
I recently learned DynamoDB (a non-relational database on AWS). It was fairly easy to learn, basically a one day read through the documentation. It made me grateful that I first learned SQL databases and spent years working with Oracle and Postgres. Now I can easily choose the best tool for each job. But, if I had first learned a non-relational database, I could see myself looking at the daunting task of learning about database schema design, normalization, sql, pl-sql, triggers, indices, keys, constraints, etc. and throwing my hands up with the shear weight of it all. It certainly isn&#x27;t a 1 day learn like non-relational databases. I&#x27;d probably try to force non-relational databases to fit every use case, even where they aren&#x27;t the best fit.
inopinatus超过 3 年前
&gt; A new client downloads all current documents and each time a document changes, that document is downloaded again<p>Those who do not remember Lotus Notes are doomed to reinvent it.
评论 #28773158 未加载
adanto6840超过 3 年前
Hearing this repeated, and the comments, makes me start to feel a little bit old. Haven&#x27;t we re-hashed this out, thousands of times, at this point?<p>There are use-cases for both! There are certainly mis-uses of both, too!<p>DB admins are a real thing; I haven&#x27;t met many, but the few I have, they are worth their weight. Truly great programmers, I feel the same.<p>They are not mutually exclusive -- solve your domain problem, iterate, and improve from there.... It&#x27;s that &quot;simple&quot;.
j-pb超过 3 年前
The author ignores a huge amount of research done in the last 10 years on query evaluation.<p>A series of filter operations and successive sub-selects can&#x27;t reach the same performance a worst case optimal multiway join can reach (and not even the performance of a series of two way joins that are smarter than linear scans, e.g. a hash join).<p>Similarly, there is no reason why incremental view maintenance should be possible for NoSQL, but not for SQL. Materialize has shown that incremental view maintenance for PostgreSQL is very possible and very fast.<p>This article also seems to very narrowly limit NoSQL to Document Store, which is extremely narrow minded.<p>All in all it does NoSQL a huge disservice.
评论 #28771987 未加载
zz865超过 3 年前
I thought nosql would make my life easier but it doesn&#x27;t. Use RDMS with an upfront schema really is simpler. Yeah changes can be awkward but its worth it.
评论 #28768860 未加载
___luigi超过 3 年前
I think the author didn&#x27;t cover a lot of fundamental research behind NoSQL. If you are reading this comment, and want to dive into SQL&#x2F;NoSQL DB fundamentals, I highly recommend checking CMU DB (Andy Pavlo) lectures [1] [2].<p>[1]: <a href="https:&#x2F;&#x2F;db.cs.cmu.edu&#x2F;seminar2020&#x2F;" rel="nofollow">https:&#x2F;&#x2F;db.cs.cmu.edu&#x2F;seminar2020&#x2F;</a><p>[2]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PLSE8ODhjZXjagqlf1NxuBQwaMkrHXi-iz" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;playlist?list=PLSE8ODhjZXjagqlf1NxuB...</a>
mutagen超过 3 年前
The slightly inflammatory title makes more sense in the context of their database, which sits on top of PouchDB, with adapters for IndexedDB in the browser and a variety of stores on the server side.<p>Based on the series of blog posts &#x2F; documentation opinion pieces that have been posted so far, I&#x27;m quite interested in playing around with this despite being mostly in the relational SQL camp. Everything I&#x27;ve read is thoughtful, well reasoned, and rather practical and the author is exploring a rather interesting problem space.<p>I&#x27;d love to see a mashup of RxDB[1] and absurd-sql[2] that brings a distributed SQL datastore to the browser.<p>1) <a href="https:&#x2F;&#x2F;rxdb.info&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rxdb.info&#x2F;</a><p>2) <a href="https:&#x2F;&#x2F;github.com&#x2F;jlongster&#x2F;absurd-sql" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jlongster&#x2F;absurd-sql</a>
wertgklrgh超过 3 年前
DynamoDB is pretty cool tho. You need to know a few limitations and design your data in a certain way but in turn you get like literally unlimited scaling and will never have to worry about overnight success bringing your services down.<p>No wonder AWS has moved most of it&#x27;s DB usage over to DynamoDB.<p>For me its Postgre -&gt; DynamoDB if working on an MVP and then maturing or if the access patterns are well known to begin with then DynamoDB.<p>One particular thing i love about DynamoDB is the 1 click global tables. I&#x27;ve yet to see anything similarly easy in the SQL world for going global with a database. (Like one AZ in US and one AZ in EU so that every customer gets a low latency)<p>Also, most of the time if Dynamo is used correctly it costs way less than an RDS instance running Postgre.
评论 #28791931 未加载
einpoklum超过 3 年前
This article regards write-intensive usage scenarios (OLTP) rather than analytics-focused usage scenarios (OLAP).
clpm4j超过 3 年前
Use the right tool for the job. SQL databases are not always the right tool. NoSQL databases are not always the right tool. If you think an RDBMS is the best choice for every problem, then maybe you should stop and ask yourself if it&#x27;s just the only tool you&#x27;re comfortable with. There is a reason that the number of NoSQL options continues to expand - if nobody was using them successfully then they probably wouldn&#x27;t continue to grow.
DrBazza超过 3 年前
SQL = structured query language.<p>NoSQL typically means non-traditional non-relational database. How many of those actually have truly unstructured data where SQL would genuinely be useless?<p>It doesn&#x27;t always mean that the vendor of a NoSQL database shouldn&#x27;t or couldn&#x27;t implement SQL on top of it.
DonnyV超过 3 年前
Been using MongoDB for 7yrs now. Best thing I&#x27;ve ever done. NoSQL db like MongoDB cuts down on your joins a lot! Also taking business logic out of the DB and putting it all in the application layer makes things way easier with versioning and sharing code across projects. I love that the mongo database is just used as a black box. It saves data and it queries it, nothing more. This part is rarely talked about. The installation and having multiple versions running side by side is so easy. You can&#x27;t beat just copying a folder of exe&#x27;s and then run it and it works. I have systems that have been running for years and have never lost data. I don&#x27;t use a RDB unless the client demands it.
评论 #28773453 未加载
tabtab超过 3 年前
A key aspect that RDBMS lack compared to NoSql is <i>dynamism</i>. Dynamic Relational is a draft RDBMS idea that intends to fill that niche. Unlike the NoSql movement, it tries to keep as many &quot;traditional&quot; RDBMS idioms as possible when adding dynamicness. It also allows one to &quot;lock down&quot; the schema incrementally as projects mature. <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;66385&#x2F;dynamic-database-schema#46202802" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;66385&#x2F;dynamic-database-s...</a>
menotyou超过 3 年前
&quot;Everything can be downgraded to NoSQL&quot;<p>I am just loooking on our ERP system which has around 580k tables, 10M table columns and around 5.6M programs accessing these tables.<p>For all practical purposes, I really wonder how this should work using unstructured data.
评论 #28776309 未加载
catwell超过 3 年前
&gt; Yes, there are SQL databases out there that run on the client side or have replication, but not both.<p>Yes, there are. <a href="https:&#x2F;&#x2F;zumero.com" rel="nofollow">https:&#x2F;&#x2F;zumero.com</a> for instance.
gerbilly超过 3 年前
NoSQL == NoCare about data integrity and consitency concerns.<p>NoSQL allows you to start coding fast (no need to learn any awkward &#x27;legacy&#x27; concepts).<p>More importantly it allows you to kick the can down the road for all those problems old people told you about, but which you don&#x27;t really believe exist.<p>If your project is a one off, NoSQL could be a good choice.<p>But if the data has any value, or especially if it is expected to outlive the original application it was coupled to, SQL is the way to go.
endisneigh超过 3 年前
My dream is a database where I just add nodes to physical machines by running a docker container and I query using whatever mechanism.<p>From there it would just auto heal, scale and do all the ops by itself. CouchDB is sort of like this in theory (definitely not in practice).
评论 #28768573 未加载
评论 #28769107 未加载
sonjaqql超过 3 年前
The article didn&#x27;t answer the question for me of how to query for the absence of a property, without getting an entire document collection first.<p>I was really hoping there was a secret to search against null or undefined.<p>Is there a NoSQL solution that does allow for such queries?
评论 #28769335 未加载
评论 #28770762 未加载
sethammons超过 3 年前
An argument I heard the other day: lots of people are realizing the benefits of typescript. Those same people will eventually realize a table schema will make their lives similarly easier.
评论 #28773620 未加载
irrational超过 3 年前
Maybe it is because I&#x27;ve only ever worked on web applications so I can&#x27;t imagine the use cases, but when would you ever want your database to be replicated to a client&#x27;s computer?
评论 #28768961 未加载
评论 #28792080 未加载
YarickR2超过 3 年前
Headline is the question, the answer is &quot;it doesn&#x27;t&quot;