Sling Academy
Home/Node.js/Sequelize.js Tutorials

Sequelize.js Tutorials

Sequelize.js is a Node.js ORM tool that supports various databases and features. It allows you to define models, associations, transactions, and more. It also provides a promise-based API for querying and manipulating data.

This series of tutorials will help you learn everything about Sequelize.js, from basic to advanced, from simple to complex.

1 How to Setup Sequelize in Node.js

2 Sequelize vs Mongoose: Which to Choose?

3 Node.js & Sequelize: How to Make Join Queries

4 How to View Raw SQL Queries Generated by Sequelize.js

5 How to Use Sequelize with TypeScript

6 Fixing Docker + Node + Sequelize ECONNREFUSED Error

7 Sequelize.js: How to connect to MySQL database

8 Node & Sequelize: Fixing Model Association Column Creation Issue

9 Sequelize.js: How to connect to PostgreSQL database

10 Sequelize.js: How to Connect to SQLite Database

11 Sequelize.js: How to Create New Tables

12 Sequelize.js: How to Drop/Delete a Table

13 Sequelize.js: How to Alter/Change a Table

14 Sequelize.js: How to Set Query Timeout (Max Execution Time)

15 Sequelize.js: How to Rename a Table

16 Sequelize.js: How to Empty/Truncate a Table

17 Sequelize.js: How to Connect to Multiple Databases

18 Sequelize.js: How to Rename a Column

19 Is it Possible to Use Sequelize.js with MongoDB?

20 Sequelize.js: How to Delete a Record by ID

21 What is Eager Loading in Sequelize.js?

22 Sequelize.js: How to use CASE WHEN expression

23 How to Use Migrations and Sync in Sequelize.js

24 Sequelize.js: Using afterValidate and validationFailed hooks

25 How to Backup and Restore a Database in Sequelize.js

26 Sequelize.js: “Greater Than or Equal To” Operator Usage

27 Sequelize.js: How to Select Distinct Rows

28 How to Use RIGHT JOIN in Sequelize.js

29 Sequelize.js: How to use the IN and NOT IN operators

30 Sequelize.js: Find all records that match an array of values

31 Sequelize.js: Unique Constraint Failed Error – Causes and Solutions

32 Sequelize.js: How to add a column to an existing table

33 How to Prevent SQL Injection in Sequelize.js

34 How to Set Indexes in Sequelize.js

35 Sequelize.js: How to Delete a Column from an Existing Table

36 Sequelize.js: Create a table with auto incrementing id (JavaScript & TypeScript examples)

37 Sorting by multiple columns in Sequelize.js

38 How to Migrate from Sequelize to Mongoose (with Examples)

39 Fixing SequelizeConnectionRefusedError with Sequelize & Docker

40 How to Count Associated Entries in Sequelize.js

41 How to Run Sub Queries in Sequelize.js (3 Ways)

42 How to Use Enums in Sequelize.js

43 What is Model Synchronization in Sequelize?

44 How to extend an existing model in Sequelize

45 Sequelize.js: How to Validate Numbers and Text Length

46 Sequelize.js: How to Auto-Hash Passwords

47 Sequelize Upsert: How to insert or update a record in one query

48 Sequelize.js: How to insert multiple records at once

49 Sequelize: How to Update a Record by ID

50 createdAt and updatedAt fields in Sequelize.js

51 Dates, Timestamps, and Timespans in Sequelize.js

52 How to Implement Pagination in Sequelize.js

53 How to Filter by Date in Sequelize.js

54 How to Execute Raw SQL Queries in Sequelize

55 How to Select Records Between Two Dates in Sequelize

56 Mastering the LIKE Condition in Sequelize.js

57 Filtering by Multiple Conditions in Sequelize

58 Selecting a Single Random Record in Sequelize.js (3 Ways)

59 How to Select Multiple Random Records in Sequelize.js

60 How to Count the Number of Records in Sequelize

61 Best Practices to Name Tables and Columns in Sequelize

62 Transactions in Sequelize.js: A Complete Guide

63 How to add constraints to a column in Sequelize

64 How to Set Unsigned Integer Field in Sequelize.js

65 A Deep Dive into Sequelize’s Timestamps

66 SequelizeJS: How to reset auto-increment ID after deleting records

67 How to Set Default Values in Sequelize.js (3 Ways)

68 Working with Paranoid Tables in Sequelize

69 Replication in Sequelize: A complete guide

70 Sequelize.js: How to Update a Row Without Touching the Timestamps

71 Sequelize.js: How to Drop FOREIGN KEY Constraints

72 How to Use Singular Table Names in Sequelize.js

73 How to Convert Entity to Plain Object in Sequelize.js

74 Fixing Sequelize Error: Unknown column ‘*.createdAt’ in ‘field list’

75 Sequelize.js: How to Use Include with Attributes

76 Sequelize.js: Select Rows Where Column Is Not Null

77 Sequelize.js: Select Rows Where Column is in List

78 Sequelize.js: Implementing the Less Than or Equal To Query

79 AND and OR operators in Sequelize.js

80 One to Many associations in Sequelize

81 Many to Many associations in Sequelize

82 Many to One Associations in Sequelize.js

83 Fixing error: sequelize.import is not a function in Node.js

84 How to use BCrypt with Sequelize models

85 Fixing Sequelize Error TS1086 in Node.js Projects

86 Sequelize.js: Select rows by group

87 How to Insert Record and Return ID in Sequelize

88 How to Handle Nested Relationships in Sequelize

89 How to use LIMIT and OFFSET in Sequelize.js

90 Sequelize: How to Update Record and Return the Result

91 How to use regular expressions in Sequelize.js queries

92 Sequelize.js: How to exclude some fields from the result

93 How to use Sequelize CLI

94 Understanding GROUP BY in Sequelize.js

95 Sequelize.js: Exclude Password from Query Result

96 How to Perform Bulk Update in Sequelize.js

97 How to Safely Use Migrations in Sequelize.js

98 Sequelize.js: How to Safely Change Model Schema in Production

99 Sequelize.js: How to Select Rows Randomly Based on Weights

100 How to Get a Flat Object from Sequelize with Association

101 Cursor-Based Pagination in SequelizeJS: Practical Examples

102 Fixing Sequelize.js TypeError: Undefined is Not a Function

103 Sequelize.js Aggregation: Sum, Average, Min, and Max

104 Sequelize.js: How to save a JSON object in a column

105 How to Create Models in Sequelize (JavaScript & TypeScript Examples)

106 Sequelize Geospatial: A Complete Guide

107 Sequelize.js: How to Save an Array in a Column

108 Sequelize.js: Select the Latest Record of Each Group

109 How to Define and Use Nested Models in Sequelize.js

110 Sequelize: How to Migrate Data from One Database to Another (3 Ways)

111 How to Disable Logging SQL in Sequelize.js

112 Sequelize.js: Addition and Subtraction Assignment Operators

113 Perform JOIN query with multiple columns in Sequelize.js

114 Data types in Sequelize: A cheat sheet

115 Sequelize.js Error: Foreign key constraint is incorrectly formed [fixed]

116 Using Child Models in Sequelize.js

117 Sequelize.js: How to Validate an Email Address

118 Using beforeCreate and beforeUpdate hooks in Sequelize.js

119 Using afterCreate and afterUpdate hooks in Sequelize.js

120 Composite Primary Key in Sequelize.js: Examples & Use Cases

121 Using afterDelete and afterDestroy Hooks in Sequelize.js

122 How to Sort Rows by Date in Sequelize.js

123 Sequelize.js: Select Rows by Last Day, Last Week, Last Month, and Other Date Ranges

124 How to Use Hooks in Sequelize.js

125 Sequelize.js: How to Count Distinct Rows

126 Sequelize.js: Optimize Queries to Boost Performance

127 Fixing Sequelize.js onDelete ‘cascade’ Issue

128 How to use LEFT JOIN in Sequelize.js

129 How to use INNER JOIN in Sequelize.js

130 How to Use Column Aliases in Sequelize.js

131 Get the ID of the Last Inserted Row in Sequelize.js

132 SequelizeJS: Grouping Results by Multiple Columns