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.

Ask HN: When should i use a NoSql database

3 pointsby udswagzalmost 10 years ago
what scenario would warrant the use of a noSql database ?

6 comments

Blackthornalmost 10 years ago
Disclaimer: I&#x27;m an idiot and don&#x27;t make great architectural decisions.<p>The two main things to think about are simplicity and scale. As for the former, key-value stores from the basic BerkeleyDB (though I think there&#x27;s more modern and better software now) up to three-dimensional bigtables are really conceptually simple when it comes to your data. It&#x27;s (mostly) a blob, and it&#x27;s got a key. Couldn&#x27;t be easier. Of course, when it comes to using the data, once you want to add new uses it becomes harder because now you have to write actual code in a procedural language and that&#x27;s usually not very efficient. That&#x27;s where the power of relational databases comes in. Very very easy there to use the data in a new way you hadn&#x27;t envisioned easily. It&#x27;s just a matter of a different SQL query!<p>Then there&#x27;s scale. Most people don&#x27;t <i>really</i> have this problem. Think about the point where you want to stop using sqlite in favor of a separate-process database like Postgresql or MySQL. That&#x27;s a difficult spot to pinpoint, right? But you have a general idea of where it is. The time where you can&#x27;t scale postgresql out and start needing a lot of Cassandra or Accumulo servers is a good order of magnitude farther than that. It would really be premature optimization to worry about it before you know it&#x27;s going to be a problem. Especially since once you cross that bridge, you lose out on scale in a different dimension: querying and using the data becomes tougher!<p>I haven&#x27;t really talked about hierarchical schemaless structures like MongoDB because I don&#x27;t really like them &#x2F; don&#x27;t really think they&#x27;re that useful. Sorry!
trcollinsonalmost 10 years ago
That is an exceptionally broad topic. NoSQL is a pretty large category of database that is pretty much anything that is not &quot;SQL&quot;. These include just about everything from document stores, object stores, caches, and columnar stores. So, it depends on what have in data.<p>Most people talk about Mongo when it comes to NoSQL. Mongo is a very nice, high availability, document store. It has eventual consistency and can be horizontally scaled in a number of ways. I won&#x27;t go into all of the uses but one I can think of is in an environment with very very high read with extremely low writes where you need low latency on reads and a document based data structure.<p>To answer this thoroughly would require quite a bit of time to build a curriculum around the various types of NoSQL stores, what their strengths and weaknesses are, and how to know whether your data fits. In other words, it&#x27;s a big topic.
Someone1234almost 10 years ago
There are a lot of different kinds of NoSQL databases, and they have different usage scenarios.<p>For example a key&#x2F;value store like Cassandra is very different from a schemaless hierarchical structure found within MongoDB. They&#x27;re both NoSQL, but extremely different from one another.<p>I&#x27;d only suggest you study the different options so you&#x27;ll know if a specific NoSQL (or SQL) database solution is a good fit for your projects.
alfonsodevalmost 10 years ago
<a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=qI_g07C_Q5I" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=qI_g07C_Q5I</a> In this video Martin Fowler have some recommendations of when to choose a relational, graph or noSql database.
nam1almost 10 years ago
When you need more than one server to run your database.<p>The main different between NoSQL&#x2F;SQL DBMS is about auto scaling. NoSQL scales well on multiple servers, as they were designed to work that way, while SQL dbs do not.
评论 #9697245 未加载
romanovcodealmost 10 years ago
When the only option with SQL is EAV. Then you should use NoSQL.