DEV Community

Paul Lefebvre
Paul Lefebvre

Posted on

7 Reasons You Should Be Using PostgreSQL

PostgreSQL is an open source object-relational database system that has had more than 15 years of active development. Here are 7 reasons you should be using PostgreSQL.

Free

PostgreSQL is completely free to use. It has a license similar to BSD and MIT which means you can use it with no restrictions whatsoever, unlike other open-source databases such as MySQL.

Easy to setup

Want to test PostgreSQL on macOS? You can use Postgres.app to get a working PostgreSQL database just by running a single app with no installation required at all.

Even if you need to install PostgreSQL, easy installers are also available with pre-built binaries for Windows, macOS and Linux.

If you need more support you can turn to EnterpriseDB, which offers PostgreSQL with support.

Often you don’t even have to bother with installing PostgreSQL because many server hosts automatically provide it as an option that you can easily turn on or configure. For example, with Xojo Cloud, you can enable PostgreSQL with a single click in its Control Panel.

With other hosting companies you may have to install PostgreSQL yourself, but steps are often provided. For example, Digital Ocean provides these steps for installing PostgreSQL in CentOS 7.

Powerful

PostgreSQL has all the professional-grade features you expect in a server database. You can have multiple users, multiple databases, stored procedures, robust types for your tables, views, full SQL, backups and more.

Secure

PostgreSQL has SSL for secure connections. It is updated regularly and is used by many, many organizations ensuring that it is kept up-to-date with security updates as necessary. For more information about this, refer to the full PostgreSQL security report.

Flexible

You can use PostgreSQL with any programming language. Because PostgreSQL is so ubiquitous, nearly any programming language easily connects to it. In Xojo, your code would look like this:

Dim pg As New PostgreSQLDatabase
pg.Host = “sheep”
pg.DatabaseName = “Mary”
pg.Port = 5432
pg.UserName = “lamb”
pg.Password = “foo”
If pg.Connect Then
  // Connected
End If
Enter fullscreen mode Exit fullscreen mode

In PHP, your code looks like this:

$dbconn3 = pg_connect("host=sheep port=5432 dbname=mary user=lamb password=foo");
Enter fullscreen mode Exit fullscreen mode




Lots of Tools

Working with PostgreSQL is much easier when you use a GUI tool. There are many, many tools available such a pgAdmin, Navicat and SQLPro. For a complete list, refer to the PostgreSQL tool wiki page.

Documentation

If you do happen to get stumped while working with PostgreSQL, you’ll find there is lot of information and documentation available. As always, the official documentation a great place to start.

There are also dozens of books and information that you can easily find on how to use PostgreSQL, many of which are listed on the official doc page.

Want to learn even more? Watch this PostgreSQL video:

As the PostgreSQL site says, it is “the world’s most advanced open source database”. Once you give it a try, you will most definitely agree!

This post originally appeared on the Xojo Blog

Top comments (2)

Collapse
 
xowap profile image
Rémy 🤖 • Edited

A missing few

  • PostGIS
  • HStore
  • JSON(b) data type
  • Recursive queries
  • Window queries
  • Trigrams
  • Amazing standard lib
  • Writing stored procedures in Python or JS
  • Foreign data wrappers
  • Full Text Search
Collapse
 
gvanleenl profile image
Gabri van Lee ❋

Came in to toss in Postgis. Happy to see I'm not the only one!