I never understood this. It feels, intuitively, like it should be much, much worse for big Data. To say nothing about keeping track of development, don't you need to scan each record to find the key when you look for things?
Big data/NOSQL doesn’t have correlations between documents, you don’t save the tables, you create the tables on query. When searching you use inverse indices (like what you can see at the end of Encyclopedias and other books). It’s pretty damn smart and Lucene is amazing like that. Also works great at distributing the data across multiple nodes which is way harder/nigh impossible on SQL type DBs. Yelp’s blog is pretty detailed on how it works and helps them: https://engineeringblog.yelp.com/2017/06/moving-yelps-core-business-search-to-elasticsearch.html
Scalability is key, you can’t scale SQL to Petabytes of data.
SQL can absolutely store petrabytes of data in a SQL database. That’s exactly where you would want to store mass amount of analytical data.
You just don’t want to have a real time application having individual user requests read/write directly to a SQL database of that size due to poor performance.
Could you have petabyes of relational SQL data, though? It seems like an assumption that as you scale you just drop the SQL storage style for some reason.
Exactly the point. Do you think Snapchat stores less than that? Or Slack? Nobody is gonna put up a sql server for each user, Kubernetes or Docker be damned.
For example search on 3 million documents is faster with an Elasticsearch cluster than a sql server on my desktop machine. And 3 million documents is nothing in the enterprise world.
When nobody bothered to come up with a predefined schema...yet somehow the code knows how to interrogate the data.
It's actually great when you already have a lot of data and plan to figure out how it's structured long after you've stored it. You do at least need to decide on some sort of lookup key up front.
Relational databases are ones that store data in joinable tables, while NoSQL databases this type of inherent relational connection between data collections doesn’t exist.
When you have new tables being ingested all the time by different users in different departments, and we are talking big data, hundreds of millions + in some tables, there is no way to easily define a schema(s). Youre just trying to ingest all this data and analysts will figure out on their own how to join them as needed.
Source: analyst who queries hadoop using hive every day.
Surprisingly often for oltp. Dynamodb also has "queries", range keys, and global secondary indexes. It's insane how applicable they are for any transactional need.
For non-live data, just hook up a DDB stream to athena/redshift/maybe even Aurora and do your offline analytics/training there. It's better design anyway since your analytics don't put load on the live system.
NoSql can mean a few different things. You're thinking of key-value stores. And yes, they are shit for relational data. And yes, 99.9995% of all projects deal with relational data.
But the performance is amazing.
Also, there's document stores like MongoDb which has pretty good indices, and a join-like facility called $lookup.
The major difference between mongodb seems to be that mongodb is schemaless, which means you need to deal with schema versioning on the application end. Super smooth to start a project with, you can just freestyle it. But not that smooth once there's customer data in there.
It's supposed to be able to retrieve data much faster than relational DB's, but the drawback is you have to design your application around that limitation.
Yes and that’s why you need to pick the right tool for your use case. If you have a complex relational dataset and need to query it all types of different ways then of course SQL is king. But what if you have a giant warehouse with millions of SKUs you need to track and quickly update/retrieve? A key value data store is perfect for this and scales horizontally as your business grows.
"NoSQL" is for key/pair based data. SQL for tabular data.
Basically, think a Word document versus an Excel document. Or, think of a page in of notebook versus a logbook. If you don't need to sort or compare one item with another, and can stick everything on one sheet of paper, document style is better. If you want a create a log then tabular is better.
A conversation between multiple parties can be bulked all into one document, instead of a giant table of messages sorted by entry date that don't relate to one another. How you find it, is dependent on how you catalog your pages, like you would in a notebook, perhaps by title, or by creation date+title. With tabular, you'd have to create an index by some other sort of partition key that essentially duplicates your data or creates extra steps to access it.
24
u/[deleted] Mar 26 '20
I never understood this. It feels, intuitively, like it should be much, much worse for big Data. To say nothing about keeping track of development, don't you need to scan each record to find the key when you look for things?