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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why do NoSQL databases not support joins?

5 点作者 adroitboss超过 3 年前
NoSQL doesn't mean non-relational, it just means the absence of the Structured Query Language. So why isn't there a NoSQL relational database?

4 条评论

usrbinbash超过 3 年前
&gt;NoSQL doesn&#x27;t mean non-relational<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;NoSQL" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;NoSQL</a><p><i>A NoSQL (originally referring to &quot;non-SQL&quot; or &quot;non-relational&quot;)[1] database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases.</i>
评论 #29772702 未加载
breinero超过 3 年前
Usrbinbash makes a good point regarding the meaning of “relational”. Many people have come to think that “relational” refers to the relationships between entities in the database, when it really means that the database manages data in tabular form. I think this misunderstanding has become more ingrained because people typically normalize their data in RDBMSs, which necessitates greater use of joins. So, when folks talk about a “relational” workload, they often mean executing ACID-compliant joins over a normalized dataset. Because early NoSQL databases had traded transactional consistency for performance and scalability, there’s been an expectation that NoSQL databases can’t support what some think of as a relational workload.<p>To be fair, in the early days of NoSQL, it was necessary to use denormalization in one’s schema to achieve transactional integrity in the absence of joins. However, distributed databases have since overcome the major challenges of achieving consistency at scale. For example, <a href="http:&#x2F;&#x2F;Fauna.com" rel="nofollow">http:&#x2F;&#x2F;Fauna.com</a> is a serverless, document database which supports ACID transactions via the Calvin protocol. This means that you can execute transactionally consistent joins across collections (“tables”), and either normalize or denormalize your data model for all the same design reasons you might in a traditional RDBMS. The principle difference is that records in Fauna are JSON documents rather than rows in a table.<p>This is not to say that denormalization in modern schema design isn’t beneficial. However, support for ACID joins in a modern document database gives you more latitude in your schema design choices.<p>Full disclosure, I am a Product Manager at Fauna.
PaulHoule超过 3 年前
(1) Joins are a challenge to implement, particularly if CPU, network, and storage use matter. To get excellent results the database needs a query optimizer that can make a good guess of what query plan will be effective.<p>(2) There are many databases with other query languages that support joins, just a few are<p><a href="https:&#x2F;&#x2F;www.arangodb.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.arangodb.com&#x2F;</a> <a href="https:&#x2F;&#x2F;www.w3.org&#x2F;TR&#x2F;sparql11-query&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.w3.org&#x2F;TR&#x2F;sparql11-query&#x2F;</a> <a href="https:&#x2F;&#x2F;docs.couchbase.com&#x2F;dotnet-sdk&#x2F;current&#x2F;howtos&#x2F;n1ql-queries-with-sdk.html" rel="nofollow">https:&#x2F;&#x2F;docs.couchbase.com&#x2F;dotnet-sdk&#x2F;current&#x2F;howtos&#x2F;n1ql-qu...</a> <a href="https:&#x2F;&#x2F;neo4j.com&#x2F;developer&#x2F;cypher&#x2F;" rel="nofollow">https:&#x2F;&#x2F;neo4j.com&#x2F;developer&#x2F;cypher&#x2F;</a><p>all of the above support some combination of document and graph models. All of them can be used in a way very similar to a SQL database. For instance you can stuff arangodb with &#x27;flat&#x27; JSON documents that work like tables and also create RDF graphs structured like a relational database and write SPARQL queries.<p>In fact there is a close mathematical relation between SQL and SPARQL and those other query languages. For instance it is possible to write a schema that maps a set of relational databases to an RDF graph, then compile a SPARQL query into a process that runs SQL queries on multiple databases. Better than that the system can rewrite the SQL queries to implement powerful and efficient inference<p><a href="https:&#x2F;&#x2F;www.obitko.com&#x2F;tutorials&#x2F;ontologies-semantic-web&#x2F;owl-dl-semantics.html" rel="nofollow">https:&#x2F;&#x2F;www.obitko.com&#x2F;tutorials&#x2F;ontologies-semantic-web&#x2F;owl...</a><p>The Department of Defense tried this technology to answer the question of &quot;Where does all the money go?&quot; It didn&#x27;t fail because the math didn&#x27;t work or the tools sucked but more because of the intrinsic complexity of the problem and politics.
评论 #29772659 未加载
PeterCorless超过 3 年前
The original Carlo Strozzi &quot;NoSQL&quot; database did exactly what you said.<p>It was an RDBMS.<p>It supported joins.<p>It just didn&#x27;t use SQL syntax; it used a stream-operator paradigm.<p>Instead of &quot;OUTER JOIN&quot; you used &quot;jointable -al&quot;<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Strozzi_NoSQL" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Strozzi_NoSQL</a>