image

Node database drivers

Node.js clients to connect to popular databases like MySQL, MongoDB, Redis, PostgreSQL, etc.

A database driver is a computer program that implements a protocol (ODBC or JDBC) for a database connection. The driver works like an adaptor which connects a generic interface to a specific database vendor implementation. Following libraries are official native drivers implemented in Node.js.


node-postgres

image

node-postgres.com

node-postgres is a collection of node.js modules for interfacing with your PostgreSQL database. It has support for callbacks, promises, async/await, connection pooling, prepared statements, cursors, streaming results, C/C++ bindings, rich type parsing, and more.

ioredis

image

github.com

A robust, performance-focused and full-featured Redis client for Node.js. It supports Cluster, Sentinel, Streams, Pipelining and of course Lua scripting & Pub/Sub.

mysql

image

github.com

A pure node.js JavaScript Client implementing the MySQL protocol, fully supported features and very popular.

node-mongodb-native

image

github.com

The official MongoDB driver for Node.js. Provides a high-level API on top of mongodb-core that is meant for end users.

couchnode

image

github.com

The Node.js SDK library allows you to connect to a Couchbase cluster from Node.js. It is a native Node.js module and uses the very fast libcouchbase library to handle communicating to the cluster over the Couchbase binary protocol.