TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The 5 Stages of NoSQL

33 pointsby soofaloofaover 8 years ago

8 comments

paulddraperover 8 years ago
Reminds me of <a href="http:&#x2F;&#x2F;www.sarahmei.com&#x2F;blog&#x2F;2013&#x2F;11&#x2F;11&#x2F;why-you-should-never-use-mongodb&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.sarahmei.com&#x2F;blog&#x2F;2013&#x2F;11&#x2F;11&#x2F;why-you-should-never...</a><p>&gt; Remember that TV show application? It was the perfect use case for MongoDB. Each show was one document, perfectly self-contained. No references to anything, no duplication, and no way for the data to become inconsistent.<p>&gt; One Monday, at the weekly planning meeting, the client told us about a new feature that one of their investors wanted: when they were looking at the actors in an episode of a show, they wanted to be able to click on an actor’s name and see that person’s entire television career.<p>&gt; The client expected this feature to be trivial. If the data had been in a relational store, it would have been.<p>&gt; I learned something from that experience: MongoDB’s ideal use case is even narrower than our television data. The only thing it’s good at is storing arbitrary pieces of JSON. “Arbitrary,” in this context, means that you don’t care at all what’s inside that JSON. You don’t even look.<p>&gt; When you’re picking a data store, the most important thing to understand is where in your data — and where in its connections — the business value lies. If you don’t know yet, which is perfectly reasonable, then choose something that won’t paint you into a corner. Pushing arbitrary JSON into your database sounds flexible, but <i>true flexibility</i> is easily adding the features your business needs.
gr3yh47over 8 years ago
Why not postgres?<p>with the JSON(B) datatype, you can start out with full documents and pull out relational fields&#x2F;create tables as it makes sense
评论 #12542575 未加载
michaelchisariover 8 years ago
I&#x27;ve seen this cycle play out in realtime.<p>I&#x27;m thankful for the flexibility that NoSQL added to the conversation, though. But I&#x27;m confident in sticking with SQL for primary purposes, and only adding in NoSQL solutions when it really fits the requirements perfectly (and I can&#x27;t see those requirements radically changing anytime soon).
评论 #12542291 未加载
评论 #12542242 未加载
pmontraover 8 years ago
The premises of the first step are often true, but strictly speaking they are false.<p>Some NoSQL dbs have schema. Cassandra does <a href="https:&#x2F;&#x2F;docs.datastax.com&#x2F;en&#x2F;cql&#x2F;3.1&#x2F;cql&#x2F;cql_reference&#x2F;create_table_r.html" rel="nofollow">https:&#x2F;&#x2F;docs.datastax.com&#x2F;en&#x2F;cql&#x2F;3.1&#x2F;cql&#x2F;cql_reference&#x2F;creat...</a> and I think hbase has too.<p>FoundationDb was (is?) ACID.<p>NoSQL literally means that it doesn&#x27;t have SQL.
评论 #12542501 未加载
评论 #12548773 未加载
评论 #12542690 未加载
pmontraover 8 years ago
Doesn&#x27;t work for me. Google cache at <a href="http:&#x2F;&#x2F;webcache.googleusercontent.com&#x2F;search?q=cache:B3U3vwvsczQJ:sookocheff.com&#x2F;post&#x2F;opinion&#x2F;the-five-stages-of-nosql&#x2F;+&amp;cd=1&amp;hl=en&amp;ct=clnk&amp;gl=en" rel="nofollow">http:&#x2F;&#x2F;webcache.googleusercontent.com&#x2F;search?q=cache:B3U3vwv...</a>
SFJulieover 8 years ago
Rule #1 of NoSQL, if you use NoSQL, then your data have no business value, else they would be used for billing hence you would need transactions.<p>Rule #2: if you have no business value you can be fired&#x2F;outsourced.<p>The 5 rules of grief then apply to your job. Amen.
combatentropyover 8 years ago
I have a couple of points, unrelated.<p>(1) Tabular data comes to people naturally. It&#x27;s not an obscure, impractical theory foisted on us by E. F. Codd. Peer over the shoulder of your non-programmer coworkers: the front-office secretary, the project manager, the company president. You will find that each of them love Excel. They&#x27;re using it for address books, project statuses, meeting minutes, and a million other things. Some might say they&#x27;re abusing it, because Excel is meant for math, and they&#x27;re using it just because it makes it easy to set things into tables.<p>(2) Organizing a complex application into tabular data is hard. Look again at your secretary&#x27;s Excel spreadsheet of contacts, and you will see that it fails the first level of normalization: contact names and company addresses are repeated across rows. Changes are delicate, and the spreadsheet likely has bad data.<p>An application of even medium complexity, if properly normalized, will need several tables, including one-to-many and many-to-many tables. For each column, you must choose among a cornucopia of data types: boolean, integer, real, numeric, date, time, timestamp, enum, text, array, json, and several others. Furthermore, have you chosen the right constraints: primary key, foreign key, unique, check constraint, rules, trigger functions? Most pages of the app will involve joining several tables, and often there is a way to arrange it that makes it run 100 times faster. But then again, such is the case in any programming language.<p>So I do not blame programmers who want to reach for the NoSQL database. It is a thousand times easier to just:<p><pre><code> save(json_encode($_POST)); </code></pre> or whatever. I&#x27;ve been programming with SQL all day long for over 10 years, and it&#x27;s still hard. I&#x27;m still finding better ways to write the SQL or use features of my database (PostgreSQL) that I wasn&#x27;t using, at least not as much as I could.<p>The biggest encouragement I can give to someone who doesn&#x27;t know anything beyond<p><pre><code> select * from table </code></pre> is that writing it in SQL is almost always shorter than in your procedural language of choice. How would you enforce all these rules in procedural:<p><pre><code> create table sales ( id serial primary key, sold timestamp, emp int references employees, cust int not null references customers on update cascade, item int not null references items on update cascade, qty int not null check (qty &gt; 0), price numeric (12, 2) not null check (price &gt; 0) ) </code></pre> or formulate this report:<p><pre><code> select emp from sales where age(sold) &lt; &#x27;3 years&#x27; group by emp having sum(price) &gt; 1000000 order by 1 </code></pre> (DISCLAIMER: The code in this post is not guaranteed to compile.)
评论 #12548463 未加载
chrisdimaover 8 years ago
Polyglot is here. It creates opportunities for a lot of folks. And it creates a lot of headaches for others. The open source NoSQL analytics project, SlamData, will reduce a lot of the friction described in these comments. I work on the project.<p>Three things to know:<p>1. SlamData is souped-up SQL + data viz platform. 2. SlamData send analytics to the data (computation happens in-database) 3. SlamData connects to MongoDB, Couchbase, MarkLogic, Spark and relational stores. 4. You can do JOINs across data stores<p>Four things, sorry.<p>If you want to know what&#x27;s going on across a polyglot business or application... it&#x27;s exponentially easier now. So go ahead and use the new technology -- the overhead isn&#x27;t nearly as much as it was. I think this materially changes the conversation.