Knex and Bookshelf

  • Tim Ambler
  • Nicholas Cloud

Abstract

In this chapter, we will explore two libraries that work together to ease many of the difficulties that Node.js developers often encounter when working with relational databases. The first, Knex, provides a flexible and consistent interface for interacting with several well-known SQL platforms such as MySQL and PostgreSQL. The second, Bookshelf, builds on this foundation by providing developers with a powerful object-relational mapping (ORM) library that simplifies the process of modeling the entities that comprise an application’s data structure, along with the various relationships that exist between them. Readers who are familiar with Backbone.js and its emphasis on structuring data within Models and Collections will quickly find themselves at home with Bookshelf, as the library follows many of the same patterns and provides many of the same APIs.

Keywords

Relational Database User Model Configuration File Database Schema Structure Query Language 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Tim Ambler and Nicholas Cloud 2015

Authors and Affiliations

  • Tim Ambler
    • 1
  • Nicholas Cloud
    • 1
  1. 1.TNUS

Personalised recommendations