PostgreSQL is a Hot Database Choice yet Again

It seems the venerable PostgreSQL database is garnering a new wave of buzz across the IT industry. Maybe our series of articles on Postgres earlier this year helped contribute to this newfound hipness? Probably not, but modern tech organizations hoping for a cheaper alternative to Oracle while still getting support for NoSQL consider it to be a worthy option.

Let’s look more closely at some of the reasons why PostgreSQL remains one of the hottest databases – relational or not – on the market. Perhaps it makes sense for your team’s next data-centric web or desktop application?

Postgres is actually growing in Popularity!?

PostgreSQL’s increase in popularity caught the attention of InfoWorld magazine, who recently talked about the database’s hot factor earlier this month. In fact, Postgres now ranks as the 4th most popular database in the industry, according to a study by DB-Engines. Not surprisingly, the only three DBs ranked higher are Oracle, MySQL, and SQL Server.

The reasons for the growing popularity of Postgres – especially with younger developers – are numerous. InfoWorld’s writer, Matt Asay notes the improved performance brought by the support for JSON included in PostgreSQL 9.2 and boosted in version 9.4. Another important reason involves programmers growing tired of trying to fit even hipper NoSQL options like MongoDB into solution where a relational database makes the most sense.

Ultimately, in a situation when an old-school DB works best, PostgreSQL’s open source nature is simply more cost effective than Oracle or SQL Server. In fact, Postgres first earned its mojo as a cheaper alternative to Oracle. Still, could this old school database scale fast enough for use in modern web applications?

PostgreSQL and its newfound Scalability

The ubiquitous nature of social networks like Facebook and Twitter puts the onus on modern web applications to be extremely scalable. Most RDBMS options generally provide poor scalability, as did Postgres for most of its existence. Asay notes the introduction of Citus, an extension for PostgreSQL, provides a level of scalability rivaling many of the popular NoSQL databases.

Citus supports Postgres instances across multiple nodes, while providing a distributed model for transactions and SQL queries. These features give this veteran relational database the parallelism required for a massively scalable application able to compete in today’s market place. Take that, Cassandra.

While Citus is available as an open source extension, the company that developed it also offers a commercial version with full support. This is a similar model that EnterpriseDB followed with PostgreSQL itself. Citus provides a great option for shops working with Postgres for development and them implementing Citus for extra scalability before going live.

It also lets companies take advantage of their in-house talent’s database skills without spending on training in the latest NoSQL database options. These bonuses are arguably behind the still growing popularity of PostgreSQL.  Elijah Zupancic‏, the Director of Solutions Engineering for Joyent comments on some of the other core reasons.

“From a developer perspective, it is a pleasure to use. The documentation is wonderful, the data types reflect the types developers work with, and there is little surprising.”

Keep coming back to the Betica Blog for additional insights on software development, testing, and occasionally, databases.

The NoSQL Capabilities of PostgreSQL

Many businesses of all sizes leverage PostgreSQL as an open source option to Oracle and other relational databases. Significant cost savings while maintaining a similar level of performance remains a preeminent reason for this switch. A robust community and the availability of commercial-grade support make Postgres worthy of consideration for your traditional database needs. 

With NoSQL gaining popularity all over the technology world, you may wonder how PostgreSQL supports this new database paradigm. Let’s take a look at what functionality exists today in the database with a quick towards the future as well.

Postgres NoSQL for the Enterprise

We’ve talked about EnterpriseDB’s commercial level version of PostgreSQL previously on the blog. The company also offers a Postgres version with support for document databases and key-value stores – two of the most common NoSQL database types. Known as Postgres NoSQL for the Enterprise, this is something worthy of closer attention at companies looking for an open source mix of relational and NoSQL databases.

This Postgres database solution combines the speed and flexibility of NoSQL with the traditional SQL database functionality required for enterprise use – most notably the support for ACID (atomic, consistent, isolated, and durable) transactions. Database instances also easily integrate into the existing business data infrastructure, no matter the platform. In short, it provides the best of both worlds – relational and NoSQL.

ACID transactions are vital for business organizations that depend on the real-time validity of the relationships within its data. Many current NoSQL databases don’t offer this feature, instead following the BASE paradigm which emphasizes speed and availability over the consistency of the data. Postgres NoSQL lets companies combine unstructured and structured data; mixing the performance of NoSQL with the more formalized governance of traditional SQL.

Postgres NoSQL supports many industry standards for programmatic access and data exchange. These include Ruby, Python, and JavaScript for the former, and the JSON and XML formats in the latter case. The superior performance of PostgreSQL combined with the seamless scalability typical of a NoSQL database solution make EnterpriseDB’s combination of Postgres and NoSQL a valid option for any business desiring a flexible database infrastructure.

The Future of PostgreSQL and NoSQL

In a previous article looking at new features of PostgreSQL 10, we noted the relative lack of NoSQL functionality in this newest version of Postgres, slated for release later this year. The new XMLTABLE feature supports the direct querying of data stored in XML documents. Other performance improvements in version 10 bring the speed of the relational database closer to its other NoSQL brethren.

One recent enhancement in Amazon Web Services deserves mention for companies using a mixture of relational and NoSQL databases. The AWS database migration service now includes NoSQL databases, with MongoDB (as a source) and Amazon’s own DynamoDB (as a target) being the first two to be supported. This means companies with a PostgreSQL instance on AWS are able to stream data from Postgres to a DynamoDB instance.

Companies with an investment in PostgreSQL need to explore EnterpriseDB’s NoSQL option to see if any of its features make sense for adding non-traditional database formats to the corporate data infrastructure.

Keep returning to the Betica Blog for additional news and insights from the wide world of software development. Thanks for reading!

PostgreSQL 10 – New Features and Functionality

PostgreSQL remains a popular option for organizations that need a traditional SQL database, but don’t want to spend the money required for Oracle. We’ve covered this open source database in the past here on the blog. For those companies who want extra support, a commercial Postgre option like EnterpriseDB needs to be considered.

With PostgreSQL 10 scheduled for release later this year, many users are undoubtedly curious about the new features and functionality. Let take a closer look at what’s in the feature set so you can consider either an upgrade or using this new version on your next development project.

Improved Query Performance

One of the most important enhancements in PostgreSQL 10 is its faster query executor. The database is already known for performing essentially as fast as Oracle, so any additional speed boost is sure to make those benchmark comparisons even closer.

Robert Haas, Vice President for Enterprise DB and a major contributor to the PostgreSQL codebase, commented on the technical changes behind the executor’s performance boost. “Hash aggregation has been rewritten to use a more efficient hash table and store narrower tuples in it, and work has also been done to speed up queries that compute multiple aggregates and joins where one side can be proven unique,” said Haas.

Improved parallelism is another enhancement in Postgre aimed at boosting query performance. Haas noted that parallel queries now run two to four times faster in version 10. Index scanning is another function now faster because of parallel processing.

The new XMLTABLE support improves query processing against data stored internally as XML. This is the one PostgreSQL 10 enhancement aimed at the NoSQL market.

Replication is now Better – and Easier

PostgreSQL 10 now supports replication at the table level; previous versions required the full database to be replicated. This additional flexibility comes with the bonus of being easier to use as well. Called Logical Replication, it is a feature greatly anticipated in the PostgreSQL community.

Extended Statistics help with Query Planning

Developers who write complex queries against a PostgreSQL 10 instance enjoy the benefit of expanded statistics that help the query planning process. Haas explains this in more detail: “If the query planner makes a bad row count estimate resulting in a terrible plan, how do you fix it?  With extended statistics, you can tell the system to gather additional statistics according to parameters that you specify, which may help it get the plan right.”

Other PostgreSQL 10 Enhancements

Other significant Postgre 10 improvements include Declarative Partitioning which makes inserting new records faster, among other benefits. Support for SCRAM authentication enhances the security of a database instance. Durable Hash Indexes are another new feature aimed at boosting database performance.

One future enhancement potentially coming out in a point release is just-in-time compilation. This is expected to add yet another performance boost to any PostgreSQL implementation.

PostgreSQL 10 definitely adds enough new functionality for current users as well as organizations interested in an alternative to Oracle. While its NoSQL support remains limited, it is definitely a traditional SQL database worthy of your interest. EnterpriseDB also offers commercial-level support for companies still wary of an open source solution.

Keep returning to the Betica Blog for additional dispatches from the software development world. Thanks for reading!