If you're a read/write learner, don't worry we got you covered as well, with our articles/newsletters www.theimmigrantprogrammers.com/p/can-you-communicate-with-databases
Honestly! I have been roaming around net, searching for sequelize solutions. Unfortunately I found none. Here I am, landed in your channel. I have no more words but appreciation for unconditional distribution of your knowledge. Thanks a lot. You have earn my subscription
I learnt about sequelize for the first time today, then came across your tutorial this evening, and I must say, 22mins here have replaced hours I spent earlier understanding the concepts. Thank you.
Fantastic tutorial. You explain everything so clearly before you take actions and begin to code. You give the viewers enough time to follow. Too many times in tutorials on You Tube, content creators will quickly click on other screens, making it hard to follow if we are either taking notes or coding along with you. This video was very well-paced. Thanks so much for sharing this. This vid made me subscribe to the channel :)
I'm not sure if I have ever given feedback on a video before. But, everything about your style of teaching is just so good and so refreshing, that I had to comment! You are so easy to listen to and you do such a good job of explaining why you do at each step, often tying it back to the documentation rather than jus trying to fly through a bunch of high level stuff. I can't say it enough - You are really good at this and so helpful! Thank you and keep it up!
This is the best ever video on sequelize. All examples on sequelize on net are usually integrated with express server, it was difficult to differentiate sequelize code with server code bcoz they are messed up. Now this video resolved all my doubts. Thanks a lot. Love you couple.
Wow, what a fantastic tutorial! 🙌 I've been struggling to wrap my head around Sequelize with Node.js, but this video made it incredibly easy to understand. The explanations were clear, and the step-by-step guidance was just what I needed to get started. Thanks to this tutorial, I feel much more confident in using Sequelize in my projects. Keep up the great work, and I'll definitely be checking out more of your content!" 👏📚🚀
Thank you for the help, I spent so much time trying to add data to the relationship tables, although it's not what you covered in the video, with the example you gave I was finally able to do it!
By the way force sync is not always used, it is used only when you are planning to recreate the tables. If you see in the console it clearly states the drop table command and created it again. There is no need to drop tables for adding new records
If only you'd watched the video a little more, I did explain all of that in the video, in addition, to explaining why I am going to keep on using it in the video for demo purposes, so that we start fresh every time I re-run my script! Nevermind, thanks for your comment! Keep learning:)
Thank you so much for the tutorial. You explain it so well. Was able to get through the part of my project I was stuck on for a couple of days. Thanks again
How can I perform select and insert queries on manually created tables? Do I need to define model for them? Or is there a way I can reference already existing table in my database?
Great question! Yes, so in order to use Sequelize even with the manually created tables you need to define the structure of the model inside your code.
@@programmercouple Thank you. Can you also make a video about concepts like pooling and handling database connection error at production level using sequelize? It would be very helpful.
The force sync is going to dump data on restart. It works for this particular case or just for developer environment. Please make video about how migrations can be done using sequelize.
I need a help from your side ,,, I have one table which may be join with many table ,, so I can't use association.. with two field it join that table ,,, .. then how to implement join .. in this regard ...
Any way to get the code from db itself? Like, I'm using vs as an ide and for .net applications there is an option to import the database as a model and we get c# classes for the tables. Is there a way to replicate that behavior with vscode (or any other ide) for sequelize
Hi Mustafa, thanks for your question. So, performance-wise RAW SQL will always be better hands down! ORMs are mostly used for the (abstraction) convenience they provide. For security, although, query builders and ORMs do offer some basic security, IMO that's something you need to take care of as a developer in all cases, no matter what you choose(Raw SQL/Query Builders/ORMs). You need to restrict as well as validate user inputs to avoid SQL Injection. However, most ORMs offer in-built support for Input/Schema Validation. Hope that answers your question!
Hi krithika Thanku for excellent explanation on sequelize, I'm a Beginner,I need to know Is hasmany works on Innerjoin concept,I need to Innerjoin two tables
What a lovely tutorial. Loved the content just did not understood how did you made foreign key by customer id on order table from customer id field? Explain me this and you have new subscriber as well. Appreciate your lovely content 💖
Hi Madam.Thank you very much for sharing the knowledge with us.Please make a video on creating a model for already existing table structure which is managed by DBA people in production environment.
Just a suggestion in 15:20 this is not the right way to create an order and customer must be the one creating an order instead of tweaking the table directly via Order.create() when you return the customer promise with return Customer.create({ values }) on line number 12 you receive a customer sequelized value so in the next then block where youre adding the Order must be like customer.createOrder({ values if required }) where createOrder is a method developed by sequelize under the hood in relation to your second Tables named Order with preceding keyword create
Thanks! Any database can be used with Flutter. The real answer depends on the kind of application you're planning to build. That alone can decide if SQL or NoSQL is better for you.
Hello mam... I liked your content... 💯 How can I use one sequelize model for creating multiple tables? Because I just want to store records year wise in separate table. all the fields are same. I want to use same model instance for that
Im new to Sequelize and the Video helped me a lot but I come to one question. What if I have multiple orders? Say if the same Person has 2 Orders howto associate the second with the rest?
You can google the best practices to create project structures in NodeJs. This is a really good article on this topic blog.logrocket.com/the-perfect-architecture-flow-for-your-next-node-js-project/
Thanks you so much for this. but I have noticed one thing in the util file you have accidently keep you phone number as password if it is genuine then please clear that password.
If you're a read/write learner, don't worry we got you covered as well, with our articles/newsletters www.theimmigrantprogrammers.com/p/can-you-communicate-with-databases
Honestly! I have been roaming around net, searching for sequelize solutions. Unfortunately I found none. Here I am, landed in your channel. I have no more words but appreciation for unconditional distribution of your knowledge. Thanks a lot. You have earn my subscription
Glad I could help! Thanks a lot for your kind words!:)
I learnt about sequelize for the first time today, then came across your tutorial this evening, and I must say, 22mins here have replaced hours I spent earlier understanding the concepts. Thank you.
Thanks a lot for your kind words, comments like these encourage us to keep creating more videos
Fantastic tutorial. You explain everything so clearly before you take actions and begin to code. You give the viewers enough time to follow. Too many times in tutorials on You Tube, content creators will quickly click on other screens, making it hard to follow if we are either taking notes or coding along with you. This video was very well-paced. Thanks so much for sharing this. This vid made me subscribe to the channel :)
Glad it was helpful!
Your wonderful comment made my day :)
This is the best introductory tutorial on Sequelize. PERIOD.
Thanks so much! Appreciate the comment!:)
I'm not sure if I have ever given feedback on a video before. But, everything about your style of teaching is just so good and so refreshing, that I had to comment! You are so easy to listen to and you do such a good job of explaining why you do at each step, often tying it back to the documentation rather than jus trying to fly through a bunch of high level stuff. I can't say it enough - You are really good at this and so helpful! Thank you and keep it up!
Wow, this comment made my day!
Finally a short and nice guide on sequelize, thanks a lot for it!!
Thanks for your comment! We're happy to help!:)
In love with your teaching skills, subscribed.
Awesome, thank you!:)
thanks , really helped me , i wish you had a complete series of sequelize
One day
This is the best ever video on sequelize. All examples on sequelize on net are usually integrated with express server, it was difficult to differentiate sequelize code with server code bcoz they are messed up. Now this video resolved all my doubts. Thanks a lot. Love you couple.
Glad it helped! Thanks for your comment Rakesh 😀
this is the best tutorial I've seen about sequelize ever.
That's so kind! Thanks, we're very happy to help!:)
Great tutorial , the screen was very clear and readable - an easy to follow tutorials , keep it up and thanks
Glad it helped!
I spent a day and came here with successfully creating tables❤ Thanks you very much! Subscribed you as well🎉
Glad to hear this! Appreciate the feedback!:)
Wow, what a fantastic tutorial! 🙌 I've been struggling to wrap my head around Sequelize with Node.js, but this video made it incredibly easy to understand. The explanations were clear, and the step-by-step guidance was just what I needed to get started. Thanks to this tutorial, I feel much more confident in using Sequelize in my projects. Keep up the great work, and I'll definitely be checking out more of your content!" 👏📚🚀
Appreciate the honest feedback! Cheers!
you have explained really well, please make videos on more topics, it really helps a lot
Thank you for saying that, it boosts our will to make more content
Thank you, I was struggling with Sequelize but I found your video and it helps me a lot
You're very welcome! Happy to help!:)
Thank you for the help, I spent so much time trying to add data to the relationship tables, although it's not what you covered in the video, with the example you gave I was finally able to do it!
Glad it helped!
I am very grateful to you, because you explain it very well and easy to understand.
Glad to hear that
best Sequelize on youtube , crystal clear
Thank you 😃
thank you so much for simplicity and direct explanation, keep up the good work!
Glad to hear that! Thanks!
By the way force sync is not always used, it is used only when you are planning to recreate the tables. If you see in the console it clearly states the drop table command and created it again. There is no need to drop tables for adding new records
If only you'd watched the video a little more, I did explain all of that in the video, in addition, to explaining why I am going to keep on using it in the video for demo purposes, so that we start fresh every time I re-run my script! Nevermind, thanks for your comment! Keep learning:)
@@programmercouple with v6 force true does not work, instead we are now using alter
Hi, when i set force true it dropped every table. How to fix it and any idea about sequelize migration with typescript.
You can just unset the force field, mark it as false.
@@programmercouple Thanks for your reply, when i set force false it not add the new field in existing table.
Thank you so much for the tutorial. You explain it so well. Was able to get through the part of my project I was stuck on for a couple of days. Thanks again
Thanks for your feedback! I’m glad it was helpful:)
Hello! I love your content and your way of explaining things! Keep up the good work!
Thank you for this amazing tutorial. Loved it and your way of teaching/explaining is very exciting to watch the video till the end. Thanks
You're very welcome!
super awesome explanation mam 😍😍😍😍🤩🤩🤩🤩
Glad it was helpful!:)
How can I perform select and insert queries on manually created tables? Do I need to define model for them? Or is there a way I can reference already existing table in my database?
Great question! Yes, so in order to use Sequelize even with the manually created tables you need to define the structure of the model inside your code.
@@programmercouple Thank you. Can you also make a video about concepts like pooling and handling database connection error at production level using sequelize? It would be very helpful.
Noted
really helpful, I would like to see more videos on sequelize.
More to come!
Hi, are you also able to retrieve the customer name & email with the order details, depending on the customerId foreign key?
How can I define a model for already existing tables which have tons of data and which I cannot manupilate?
Is it okay if I write my relations inside the model that is after creating the schema. Will it work?
The final select query is querying by orderId and not customerId, where clause is wrong.
Oops, made a mistake there!
Thanks for letting us know 🙂
@@programmercouple what can we do to correct that where clause? what should we write instead?
You could just say: Order.findAll( { where: { customerId } } )
The force sync is going to dump data on restart. It works for this particular case or just for developer environment. Please make video about how migrations can be done using sequelize.
Such a great tutorial, perfect. Thank you so much. Greetings from Brazil. ❤️
Is there any option to query select data from tables of two different database
Instead of Orders.findAll can you do findAllOrders on the ParentObject Customer?
For Production Ready application we have to use Transaction concept. Could you please cover in your future video.
I need a help from your side ,,, I have one table which may be join with many table ,, so I can't use association.. with two field it join that table ,,, .. then how to implement join .. in this regard ...
Thank you so much for this tutorial, it was really helpful for understanding the syntax and working of sequelize.
Great to hear!
Any way to get the code from db itself? Like, I'm using vs as an ide and for .net applications there is an option to import the database as a model and we get c# classes for the tables. Is there a way to replicate that behavior with vscode (or any other ide) for sequelize
Easy to understand explaination, I subscribed... Please make more tutorials.
Thanks!!! Anything in particular that you would like to learn??
Best sequelize tutorial EVER
Thanks, glad it helped!:)
Great explanation! Thank you very much, please use async await in next videos, promise chaining looks awful
Thanks for your comment!:)
Which is better from performance and security prospective - using ORMs or Knexjs (or a likes) or using raw queries.
For large scale projects
Hi Mustafa, thanks for your question.
So, performance-wise RAW SQL will always be better hands down! ORMs are mostly used for the (abstraction) convenience they provide.
For security, although, query builders and ORMs do offer some basic security, IMO that's something you need to take care of as a developer in all cases, no matter what you choose(Raw SQL/Query Builders/ORMs). You need to restrict as well as validate user inputs to avoid SQL Injection.
However, most ORMs offer in-built support for Input/Schema Validation.
Hope that answers your question!
@@programmercouple thank you this was really helpful
We’re glad! Happy Programming:)
Hi krithika Thanku for excellent explanation on sequelize, I'm a Beginner,I need to know Is hasmany works on Innerjoin concept,I need to Innerjoin two tables
There is a query -select a.id, b.id ,b.name from a.products,b.users where a.id=1 and b.id = a.user_id(foreignkey). How can we write this in sequelize?
Please refer the docs :)
What a lovely tutorial. Loved the content just did not understood how did you made foreign key by customer id on order table from customer id field? Explain me this and you have new subscriber as well. Appreciate your lovely content 💖
This might help you better understand the concept:
sequelize.org/master/manual/assocs.html#special-methods-mixins-added-to-instances
Hi Madam.Thank you very much for sharing the knowledge with us.Please make a video on creating a model for already existing table structure which is managed by DBA people in production environment.
Noted
really helpful resource. from Sri lanka
Hello there, thanks for your comment! Happy to help!:)
Just a suggestion in 15:20 this is not the right way to create an order and customer must be the one creating an order instead of tweaking the table directly via Order.create() when you return the customer promise with return Customer.create({ values }) on line number 12 you receive a customer sequelized value so in the next then block where youre adding the Order must be like
customer.createOrder({ values if required }) where createOrder is a method developed by sequelize under the hood in relation to your second Tables named Order with preceding keyword create
Good video and clear knowledge. Do you recommend this language to connect as a backend with Flutter Front-End for an App mobile?
Thanks!
Any database can be used with Flutter. The real answer depends on the kind of application you're planning to build. That alone can decide if SQL or NoSQL is better for you.
Good for me
Glad it was helpful:)
I thing id object is no need to add for the model
How to organize models using different schemas? Example: accounts.payments, sales.payments, same table name, different schema
Wow so professional. Thank you.
Amazing Tutorial, it gave me a smile when u mentioned Chandler Bing 😁 #FriendsFan
😁
Great explanation Thank you ☺️
You’re welcome 😊
Nice and clean👏
Thank you! Cheers!
How Can I Use Json
please make new video about relational db
That's the plan
You need not use --save for saving in the dependency list, it's default now. For dev dependency, you need such explicit flag, like -D.
That's good to know. Thank you!
Lovely tutorial😍
Hello mam...
I liked your content... 💯
How can I use one sequelize model for creating multiple tables?
Because I just want to store records year wise in separate table. all the fields are same. I want to use same model instance for that
Good explanation. Thanks
Glad it helped:)
Thanks you soo much for the tutorial its very helpful for me 🥰
Glad it helped 😊
Im new to Sequelize and the Video helped me a lot but I come to one question. What if I have multiple orders? Say if the same Person has 2 Orders howto associate the second with the rest?
need tutorial from scratch ....how you have built the project structure ?
You can google the best practices to create project structures in NodeJs. This is a really good article on this topic blog.logrocket.com/the-perfect-architecture-flow-for-your-next-node-js-project/
Its shows as sequelize.define is not a function error
Checkout this link - stackoverflow.com/questions/49470508/sequelize-define-is-not-a-function
Also, check that you're not making any obvious mistakes.
hmm .. can you please explain us how to sanitize data in standard form ... :( ...
Thanks you so much for this. but I have noticed one thing in the util file you have accidently keep you phone number as password if it is genuine then please clear that password.
Thanks, and the number’s fake 😊
best one💥
Thank-you, we really appreciate it!:)
Thank you for the amazing video! Amazing explanation! Excellent teaching skills.
Glad you liked it!
Thank you so much, that helps a lot
Thanks, glad to hear that!:)
thanks for making it so simple
Happy to help
you're awesome, keep going
Thanks, will do!
so clear. thanks a lot !
Simple and neat. Thank you
You’re welcome 😃
Nice..🙌
Thanks ✌️
Awesome video ..
Glad you enjoyed it
Great video... thanks
customer.createOrder didn't worked for me,
It's giving me type error saying customer.createOrder is not a function
Perfect to start with. thx
Thanks a lot 4 this.tutorial!
Awesome video ++++++++++++++ 🙂
Thank you!:)
Amazing, thank you
Glad you found it helpful!🙌🏻
great video
Glad you enjoyed it!
Good video but createOrder does not work at all
You are the best
Thank you
You're welcome!
Thanks 😊
You're welcome!
thanks a lot mam
Most welcome 😊
Thanks...!
Glad I could help!:)
Thanks!
thnx
TypeError: Customer.hasMany is not a function
at
how get rid of this error
!
do upsert and then only this video will be true waste of time !
TypeError: sequelize.define is not a constructor ?? some help ??