Why old-school PostgreSQL is so hip again
infoworld.com
infoworld.com
The release notes for each version on Postgres highlight dozens of important new features: https://wiki.postgresql.org/wiki/New_in_postgres_10 That team is crushing it.
Meanwhile MySQL has gone from 5.5 to 5.7 and added JSON columns and a bit of InnoDB tuning.
But as Datagrip matures, the landscape can only get better. Datagrip is not free, but I'm willing to pay for something that works better than pgAdmin.
There are some exciting things happening in the Postgres space. Outside of Citus for scaling out, TimescaleDB has a plugin that makes Postgres a strong contender in the time-series database space. Temporal joins have always been a problem with NoSQL time-series databases; otoh joins are what SQL databases have traditionally been optimized for. It'll be exciting to have a large-scale datastore where you can easily combine and recombine different time-series in a single query.
Could you share some user experiences, like how often you get updates, and the start guide has a 'Connecting to a remote PostgreSQL server via SSH' section, without content yet, does tunnelling via SSH work nice/as expected?
Tunnelling via SSH works great, but you do have to provide and save your ssh key password in Postico, because it does not use ssh-agent.
Lots of great features and small updates here and there: it was updated with touch bar support quite quickly. A killer feature is Ctrl+P fuzzy search for table names in database.
It's great for getting query data out of your db quickly or just browsing around. Ok to add the odd column here and there. However managing roles and permissions seems to be out of scope.
First thing to note, datagrip is a sql development ide, not a sql server admin tool, so it may lack some of the administration tool you might expect, like monitoring for example
Even as an IDE, it seems lacking some basic notions, for example, there isnt really a meaningful way to have a SQL Project, you get a bunch of connection and query shells, but you dont really get a Project that encapsulate both, also there is not support for deployment
Finally, I am getting the impression that Jetbrains, it getting too stretched, if you follow their bug list, its too big ... and many IDEs do not seem to get the same attention as others
In conclusion, dont bet on Datagrip, its got a long way to go, there doesnt seem to be a good designer with interesting concepts behind it .. so it will just be at best a glorified sql mode
And how. With the rate at which they're churning out new projects and initiatives, I have to assume that they're either severely understaffed, or seeing the average tenure of their development team dropping like a stone with all those new hires. Maybe both at the same time.
It's not free, and it's not cheap, but it's really quite nice.
It's not a niche.
Redis for HTML caching: Cool.
Redis for queueing: Are you really sure you need the performance gain? Really? You can do 10k writes per second with Postgres (100k per second with COPY). If you need more than that fine, but for 99% of web apps out there it's just one more moving piece that probably doesn't get included in your backups.
2ndQuadrant has a good write up of what is required to make sure you don't fall into any traps: https://blog.2ndquadrant.com/what-is-select-skip-locked-for-...
Now if we're just talking about persisting data to somewhere - postgres COPY is pretty amazing.
Spark is a terribly inefficient solution to any known/stable data processing or analytics jobs. If you want a common format to trade with buddies, it's useful now. I expect something else will come along to replace that fad tech.
Can you expand on that?
You gave a typo there.
Spark is a terribly inefficient solution to any known/stable data processing or analytics jobs I have ever come across.
There, fixed that for you.
Any job that is predictable, can be done faster and cheaper with some C (or Go) and ad-hoc delegation to load balanced VMs. Spark is difficult to optimize for consistent processes, poor on resource usage, and requires specialized knowledge. Just pay for someone who has done a little embedded programming and stop creating buzzword jobs because a prototype went to production without comparison.
I think Django has had some influence too, since they've always recommended Postgres.
* MySQL was looked at as cost effective and fast data store for developing less than mission critical things like backing web front ends; and back then much of the web work was really less than mission critical for a lot of organizations; this meant that so long as it was fast and didn't burden these new "web developer" types with too much ceremony, it was a compelling choice. Postgres of that era even then boasted a much better and more "correct" set of features that would appeal to enterprises, but wasn't all that fast and did bring that extra effort that most of these reckless developers on the fringe didn't want.
* For enterprise work, Oracle, DB2, or to a lesser extent MSSQL where the choices. Open source was distrusted (what do you mean "free", what's the catch? Must not be worth anything if you can't charge for it. Nobody got fired for buying IBM, MS, etc). So the people that would most likely look at the trade offs in Postgres of that time favorably were the ones least likely to entertain it. The innovation was on the web side of the world, and there I go back to my first point.
* PHP was also a big deal back then. Our company was convinced by one of our sysadmins to let him greenfield a help desk application for our internal support (~1997/98). PHP was the obvious choice because it was so easy and fast to write code that worked and was web focused... and the default database choice was MySQL. (We went way out on a limb and installed it on this new OS called Linux, Slackware if I recall correctly). PHP and its good support of MySQL as data store made it the default choice. Postgres wasn't even on the radar or a discussion point.
* MySQL was developed by a consulting company with an interest in promoting it. Postgres didn't have that kind of directly interested marketing support. Sure you could get the code and install it, but there really was no marketing as compared to MySQL.
So, easy to use, relatively friction-less technologies; targeted at really and an new technology industry that was just starting to take off; and that the concerns of that new industry didn't match up well with the strengths and weaknesses of the Postgres you could get back then, but did match up well with MySQL.... yep, I think all of those are reasons why things turned out as they did.
BTW... I say this as someone that was never terribly fond of MySQL and still not. Back then I was an Oracle guy, since about Postgres v8.0, I've been favoring Postgres.
Then Python showed up, which reversed it (Postgres is defacto standard database for it).
Acquisition of MySQL by Oracle sped up this change further.
It did a lot of questionable things to get that (mostly MyISAM, innodb is better) and it was a lot more tolerant of shoddy data modelling (again questionable).
Also, SQLite is embedded, not client/server. That means that the application needs to run on the same machine that holds the data. And because there is no server to coordinate access, concurrency is necessarily limited.
On the other hand, SQLite arrived just in time to get picked by smart phones, and is consequently the most-deployed database software in the world. There are far more instances of SQLite running today than there are MySQL instances.
In the early days of NoSql, a lot of dev were still shoehorning graphs, objects, or giant look up tables into SQL database, and yes, it turns out that there are some wonderful databases to store and query this sort of data that don't rely on a relational model.
And then... yep, a bunch of magpies decided that SQL shouldn't ever be used. It's important to point out that plenty of people who pioneered and promoted graph databases, object databases, and so forth didn't go down this rabbit hole. When the data was relational, plenty of these folks were all for relational databases.
But I don't think you can claim the "NoSQL => never use SQL => SQL is obsolete" crowed was just a few outliers. This opinion infected a lot of software development organizations, and did plenty of harm.
I love SQL, but let's not get too enthusiastic about sending the pendulum swinging back the other direction, even if tempting to watch it knock a few of the overly zealous NoSql types off their perches. Trust me, I still feel a flash of anger inside when I think of some of the arguments I had to go through when I advocated for relational SQL databases. But I don't want to be that guy myself - plenty of non-sql data bases are really well conceived and designed, and are ideal for the problems they address.
Trying to deal with object/relational impedance by sticking an object-oriented API in front of the database, and then using that to shoehorn OO ways of organizing and accessing data into an RDBMS, is a great way to place an upper bound on what kind of performance you can get out of the database. It also makes (what should be) routine schema migrations much more painful than they need to be. I think that that can explain a lot of the perceived success people were seeing with many document stores.
In short, the developers more or less used the ORM to serialize and object and write it out to disk. The persistent data basically makes no sense on its own, it has to repopulate the objects before it can be accessed in any meaningful way. There's little doubt that the devs behind these project had very little understanding of what an RDMBS actually is.
And if you don't, then I suppose NoSql makes sense, because your data is never relational - not because it the relational model wouldn't be helpful, but because the developer can't see the relational model in the data stored, and is incapable of structuring it this way.
I remember this idea (paraphrasing)[2] - the data will outlast the application, and the application will most likely outlast the developer.
To me, this led to a design principle - the database should always be useful outside the context of the application. If you want information about the data you're storing, the DB should be a very, very useful place to get it. I'm not ruling out the value of the app! There are lots of ops you'd want to do as a combination of code and data, lots of UI, plenty of things. But if your data is useless and nonsensical unless your app transforms it, that is probably a sign of a big mistake[3]
[1] I love rails, and I like ORMs. They save me so much typing compared to the old days of JDBC. It turns out it's not all that hard to create a well organized relational database through generators, and if you prefer to design the DB separately, it's not hard to map models to db tables. It really only gets out of control when people are essentially designing an RDBMS through generators and an ORM, but have no idea what idea what it all means on the backend.
[2]https://blog.jooq.org/2014/01/02/why-your-data-will-outlast-...
[3] probably
When I converted our application to Rails, I had a database that was pretty home-grown, as we were using a language/framework where you tended to write raw SQL. While I was able to tweak the model files to work with our schema, in most places I found it too challenging to construct ActiveRecord queries, and ended up writing a lot of raw SQL (or rather, copying it from previous iteration). Initially I thought I was doing it wrong because it wasn't Railsie enough, but realized that our database is our asset, and Rails is secondary. We do a lot of ad-hoc querying and report writing, so I definitely think database-first is the way to go in our use case.
Therefore, developers tried to minimize their need to go through a DBA by doing more data-ish things inside the application itself. That's more of a staff management problem than a technology problem, but OOP had the "fad cred" of the time and often bowled over DBA's. The pendulum has started to swing the other way as reinventing the database & querying in applications has proved messy.
The query language and hardware scaling are mostly two separate issues, and the NoSql movement unfortunately confused the two. It's mostly that SQL-based databases were slower to scale up, not that SQL is a horrible query language.
As far as query languages, I've been in long discusses and debates about alternatives to SQL. I was partial to a draft language called "SMEQL", but everyone has different opinions on what a query language should look like and emphasize: it's hard to make everyone happy.
On a side note, I was pretty excited that graphcool got open sourced, but their json limitation to 64kb is a dealbreaker.
I think there's a class of developer that is very against "old" ways of doing things and has driven a lot of that narrative.
Words such as these deserve a poster to live on.
https://cacm.acm.org/blogs/blog-cacm/50678-the-nosql-discuss...
http://www.labouseur.com/courses/db/Stonebraker-SQL-vs-NoSQL...
https://www.barrons.com/articles/michael-stonebraker-describ...
https://blog.jooq.org/2013/08/24/mit-prof-michael-stonebrake...