132 points · by jasondc · 11y ago · 37 comments
NoSQL brought a lot of new ideas. Redis might seem superficially like NDB (MySQL Cluster), but underneath, it's extremely different. What kind of sane person could design a single-threaded, single process database? @antirez built something radical that delivers unbelievable performance.
More innovation and invention has happened in data in the last decade than in the previous thirty, and it's because people experimented and weren't afraid to fail.
Most NoSQL datastores swap limitations in one area for advances in another. Riak, Redis, DynamoDB.. S3 is probably one of the most successful examples of NoSQL, and its very limitations are crucial to its success. Each has clearly defined use cases.
Some people say "Big Data" or "NoSQL" when they really just mean Hadoop or MapReduce, but NoSQL just literally means "everything that's not SQL."
SQL is still great. Awesomeness like Postgresql's supporting every data type imaginable, Redshift and Aurora, file-based db's like SQLite...
So, yes, SQL won. But so did NoSQL. And all of the rest of us too.
I really like his point about the original breakthrough of SQL being the ability to abstract the way the data is stored from the application, and the language was just a natural outgrowth.
There are, but SQL is good enough and has so much inertia that its hard to see any alternative getting much traction.
(Its kind of like JS in the browser.)
I'm working on a simple note taking app, using IndexedDB and offline backups. Its been interesting working with IndexedDB -- but the primary problems I'm addressing are simple with SQL (Foreign Key's, join tables). I'm grateful to learn about dealing with the issue (and approaching it with very different solutions) with NoSQL -- but on the fence if I"m spending my time on something useful. I'd certainly be further on the path of working software if I could rely on something like SQL (via sqlite) being widely adopted in the browser.
SQL itself is finding itself in vogue again. Not full ANSI SQL but derivatives/half implemented equivalents e.g. CQL, HiveQL, Spark SQL, Presto. The type that this article refers to (AMPLab are the original creators of Spark).
But SQL databases themselves are definitely less popular. Mainly as (a) data grows beyond their capability, (b) data becomes more streaming/real time and (c) microservices pushes data into smaller disparate databases. The one big vertically scaled database at the hub of everything is definitely disappearing.
Maybe in Startupville, CA. But I think you're forgetting that it's a big world out there and there are lots of systems that are built on vertically scaled relational engines that practically print money. The vast majority of companies out there do not have Twitter-scale engineering problems to solve.
And the big EDW that you use to find powering everything has been broken over the years into unintegrated silos e.g. ERP, Web, Salesforce, Payroll etc. The big trend now is to reintegrate all this data and do analytics on it. To do this requires you to do (a) major ETL work between completely different schemas then (b) your data science/analytics work. In semi real time.
This article is referring to this type of workload since this is Spark's bread/butter. You land the data in HDFS, use Spark SQL to run ETL/Analytics jobs and then output the results in a single enterprise view for reporting, marketing etc. And yes this is identical to what Twitter's analytics team would be doing.
With cloud tools from Azure, IBM, Amazon this sort of analytics is going to be becoming much more common place. All using SQL the language but not SQL the database.
When they say "we implement a subset of SQL" they really mean "we have a language similar to what used to be a small subset of SQL 92". And let me reinforce that 92, from the times of Windows 3.1. It cannot be compared to today's Modern SQL (http://use-the-index-luke.com/blog/2015-02/modern-sql) found on modern relational databases, like PostgreSQL.
SQL allows for very generalized tools to be used to query data, aside from whatever application front ends get developed. This is simply harder with other database engines. Not to mention that it's a simple good enough tool in many use cases. Not everyone has twitter/facebook/google sized problems. Most applications can do just fine scaling up. And often too much importance is placed in hitting five nines of availability.
I really like NoSQL databases, flexible schemaless systems and horizontal scaling. That said, you can go a long way with SQL, it's just you can't solve some problems on multiple systems, and you can't solve some problems on a single system... depends on your needs.
And I wouldn't group SQLite in that list. I am assuming it has already has come from nowhere to be the most popular in use today (courtesy of iOS/Android ?) and I believe is part of an emerging trend of microdatabases.
What is happening is that SQL is becoming more popular but over the top of NoSQL systems e.g. HDFS, Cassandra.
If I could ensure SQL never using index/table scans and make it fail without proper indexes it would be a major help.
Indeed, I find NoSQL very unpredictable. When your query hits and index, the query goes well. When not, you usually end up doing a whole database scan. Plus you usually cannot use more than one index for a given query, and some NoSQL require an index just for ordering....
(you can't have a reliable system with random behavior where system drops to table scans when statistics are incomplete or something)
And yes, ordering requires an index.
In my opinion everybody needs to understand the differences and use each when it is the most convenient, use the best tool for the right job.
But maybe we will start to see some type of mixup between this two systems, because as he mentions in the article, OpenSource is driving the future of the databases, and due to this, the databases of the future would be more dynamic and more synchronized to the needs of the developer.