Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Supercharging Node.js Applications with Sequelize

You're reading from   Supercharging Node.js Applications with Sequelize Create high-quality Node.js apps effortlessly while interacting with your SQL database

Arrow left icon
Product type Paperback
Published in Oct 2022
Publisher Packt
ISBN-13 9781801811552
Length 266 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Daniel Durante Daniel Durante
Author Profile Icon Daniel Durante
Daniel Durante
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

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

Validating Models

It is important to maintain consistency and integrity within databases. Databases often use some form of constraint stipulation to ensure consistency. Typically, these constraints consist of checking for a range of values, such as minimum string length, uniqueness, or existence. Integrity for databases involves managing the associations and relations between symbiotic records. This involves cascading updates and deletions of referenced records (for example, setting the associated identity columns to NULL when the referenced record has been deleted). Consistency and integrity are not mutually exclusive to one another, but the two patterns help to ensure organization.

Note

The term consistency refers to ensuring that only valid data will be written and read from the database (especially within the context of accessing data concurrently). Integrity refers to data that conforms to a set of rules, constraints, or triggers before it is inserted or read.

While...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Supercharging Node.js Applications with Sequelize
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime
Modal Close icon
Modal Close icon