r/ProgrammerHumor • • Mar 25 '20

Meme Its a win-win situation

Post image
55.1k Upvotes

529 comments sorted by

View all comments

Show parent comments

21

u/ratonbox Mar 26 '20

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.

4

u/karmahorse1 Mar 26 '20

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.

2

u/ratonbox Mar 26 '20

If we’re going by semantics, you can store petabyte of data in your network packets, but it will be just as usable.

1

u/[deleted] Mar 26 '20

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.

4

u/ratonbox Mar 26 '20

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.