In this post we take a look at getting Postgres set up for developing with Node.js.In this post we take a look at getting Postgres set up for developing with Node.js.

This is part one of a three part series on using  Postgres DB with  Node.js.

Prerequisites

To use the examples in this post you will need to have the Docker client and Node.js installed on your computer.

Postgres

I am going to be giving a presentation next week and using Postgres SQL and TimescaleDB with Node.js for the JaxNode user group. If you are not familiar with Postgres, it is a relation database server that is very popular in the open source world, but also used heavily by large organizations. Whether you are large or small, you can use Postgres. There are Postgres services that are available on most of the large cloud providers.

To understand what a relation database is and how we can use it in our applications we need to understand what a relational database does. At the end of the day all a database is a piece of software that lets’ us persist data onto non-volatile memory, and query the data back quickly in our applications. Non-volatile memory can be anything from flash memory to a large drive array.

NoSQL vs SQL Databases

Postgres is a SQL database, or Structured Query Language database. SQL is an industry standard for a query language. There are many of other types of databases including graph databases, document databases and column stores. There are many reasons why you may want to use a NoSQL database, but the main reason might be scalability. While NoSQL database in many cases might be more scalable, they tend not to be as consistent as a SQL database because of the nature of how they store data. The nice thing about about Postgres is that it offers features that can be found in both types of database systems.

#nodejs #javascript #timescaledb #node

Using Postgres and TimescaleDB with Node.js Series
2.20 GEEK