A hands-on implementation guide to application development in Node.js using the powerful Sequelize ORM

Key Features

  • Use the highly powerful JavaScript library to map your database to objects easily
  • Build an application from scratch with easy-to-follow steps and examples
  • Discover industry best practices, tips, and techniques on Sequelize to manage your database with ease

Book Description

Continuous changes in business requirements can make it difficult for programmers to organize business logic into database models, which turns out to be an expensive operation as changes to the database may result in errors and incongruity within applications. Supercharging Node.js Applications with Sequelize helps you get to grips with Sequelize, a reliable ORM that enables you to alleviate these issues in your database and applications.

With Sequelize, you'll no longer need to store information in flat files or memory. This book takes a hands-on approach to implementation and associated methodologies for your database that will have you up and running in no time. You'll learn how to configure Sequelize for your Node.js application properly, develop a better sense of understanding of how this ORM works, and find out how to manage your database from Node.js using Sequelize. Finally, you'll be able to use Sequelize as the database driver for building your application from scratch.

By the end of this Node.js book, you'll be able to configure, build, store, retrieve, validate, and associate your data from a database to a Node.js application.

What you will learn

  • Configure and optimize Sequelize for your application
  • Validate your database and hydrate it with data
  • Add life cycle events (or hooks) to your application for business logic
  • Organize and ensure the integrity of your data even on preexisting databases
  • Scaffold a database using built-in Sequelize features and tools
  • Discover industry-based best practices, tips, and techniques to simplify your application development

Who this book is for

This book is for beginner- to intermediate-level Node.js developers looking to upgrade their skills and use Sequelize as their ORM of choice. Basic knowledge of and prior experience with JavaScript and SQL are needed to make the most out of this book.

Table of Contents

  1. Supercharging Node.js Applications with Sequelize
  2. Foreword
  3. Contributors
  4. About the author
  5. About the reviewers
  6. Preface
  7. Part 1 – Installation, Configuration, and the Basics
  8. Chapter 1: Introduction to Sequelize and ORM in Node.js
  9. Chapter 2: Defining and Using Sequelize Models
  10. Part 2 – Validating, Customizing, and Associating Your Data
  11. Chapter 3: Validating Models
  12. Chapter 4: Associating Models
  13. Chapter 5: Adding Hooks and Lifecycle Events to Your Models
  14. Chapter 6: Implementing Transactions with Sequelize
  15. Chapter 7: Handling Customized, JSON, and Blob Data Types
  16. Part 3 – Advanced Queries, Using Adapters, and Logging Queries
  17. Chapter 8: Logging and Monitoring Your Application
  18. Chapter 9: Using and Creating Adapters
  19. Chapter 10: Deploying a Sequelize Application
  20. Index
  21. Other Books You May Enjoy