Prisma Vs. TypeORM Vs. Sequelize | Which is Better?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys how's it going welcome back to my channel and in today's episode we're going to be comparing the three most popular arms in the JavaScript ecosystem now we're going to be specifically talking about um Prisma sqlise and typeform which I know many of you might have heard of it in the past I've made tutorials on the three of them in my YouTube channel so if you want to check those out first you can go ahead and do so but for those who don't know an arm is an object relational mapper which basically um allows us to translate database logic into a simple JavaScript code so in this video we're going to be looking at pros and cons for each of the three different orms and also more importantly discuss specific use cases in which you might want to use one of them over the other so if you're about to start working on your next big project and you're unsure about which arm you want to use stick around for the video and I'll tell you in the end and before we get into the video if you could leave a like And subscribe I would massively appreciate it because it will help push my videos to more people and I would be eternally grateful if you could do so so with that in mind let's get into the video [Music] [Applause] [Music] [Applause] okay let's start right off the bat with Prisma which is the arm that seems like everyone's talking about nowadays well Prisma is a modern and lightweight arm which supports typescript out of the box its syntax in my opinion is very clean and intuitive and it's typescript it's generated typescript types makes it extremely safe to use in any application this segues into the first pro that Prisma has which is the fact that is has really good support for typescript if you've watched my video on why you should always be using typescript no matter what use case you would understand that typescript is extremely important in any kind of application nowadays the only excuse for not using typescript in my opinion is either if you're making YouTube tutorials where people might not know typescript and might be more familiar with JavaScript or if you are a beginner learning JavaScript because it's totally understandable and it's how I learned as well but if you're anywhere near intermediate to Advanced and you've been working for a while now you should be working with typescript because it is necessary in any application now not only does Prisma have really good support for typescript but it also has a fantastic developer experience where they provide a lot of different software and features such as prism studio and even a visual interface for your own database now I personally never used Prisma studio so I can't really vouch for that but I've heard about it and I've seen people using it and it looks kind of cool but um it's definitely an addition that you have to take into account now the final positive thing I want to talk about related to Prisma is the fact that nowadays it's been gaining a lot of notoriety like people have been using Prisma in their own stack stacks and it's been gaining a lot of traction because of how typescript has also increased in its use in the past year and a half I would say I'm not the kind of developer that just likes to follow Trends because I think that it's not that the best way to do it especially in an industry where everything changes so quickly this is clearly evident by the fact that it took a while for me to even make any videos on next JS because I really took my time to learn it to perfect it to understand uh how to work with it and um to then do it because I didn't want to just make a video on it because it was a trend but at the same time you have to choose technologies that are popular because when you run into any bug when you run into any problem having a big Community online a lot of questions on stack Overflow a lot of data on charger PT that you can ask for to solve your bug that's that's necessary because if you're using a like a an unknown library or Orem out there and you run into a problem that no one has ever run into in the internet how are you going to solve it you're gonna have a lot of trouble so I think the popularity of Prisma nowadays is definitely something that should be taken into account now that can also be seen as a con in my opinion because Prisma is actually newer compared compared to typeform or sqlize I believe it was released in 2016. so maybe it might be gaining a lot of traction and a lot of people talking about it now but at the same time there hasn't been enough time of a huge amount of people working on it to have as many resources similar to type form and sqlites what I'm saying is if you're going to be building a project that is for the future maybe think about using something that you might see being projected to be more popular in the future like Prisma now what about type porn this one I really like to talk about because if you've seen my video in typeworm you know that I really loved it I believe typeworm is the most flexible type of arm in that it can be used in both active records and data mapper patterns now again I want to emphasize that maybe a big deciding factor for you maybe the syntax and I really enjoy type firm's syntax but one of the major Pros for this specific arm is that first it supports a very wide variety of databases out there it is very flexible on the architectural pattern you you prefer to use and if you're working for with transactions it has a very robust support for them now although I do like the syntax I do think that the learning curve can be a little bit harder than uh sqlize and um Prisma it starts to specifically get hard when you get into a little bit more advanced stuff so I would say that that should be taken into account it's not impossible to learn none of this is impossible to learn all of them are very similar in a lot of ways but I was just pointing this out in case you're just looking for something quick to use and you want to learn something easy I would actually say the easiest one to use is probably sqlize but I'll get into that later but typeform is the hardest one in my opinion and obviously the major negative with typeform is the fact that although it does have support for typescript it's not even close enough to what Prisma provides because Prisma was built with typescript in mind I I'm not sure if typeworm was but at least with the developer experience with the syntax notation I know Prince is fully completely supported supporting typescript and the type poem I don't see the same type of support so that's definitely something you should take into account now finally we arrived at SQL lights and sqlies uh let me know if I'm wrong I'm not don't call me on this I think it's the oldest one because the reason why I think that is because it's the first one that I've heard about so in my view I see it as the oldest one because back when I started coding uh at least using arms not coding in general but when I started using arms and looking to to choose one uh C plus was the biggest one it was what everyone was using or it seemed like it at the time so there's definitely a lot that I can talk about with SQL is because I used it with so many courses and videos and and projects that I've done in the past so this is definitely something that I can talk a lot about now in its core uh sqlace is just a promised based Orem that works in node.js and it's it supports the traditional promised based API requests for handling any kind of database operations now that two main benefits that I would say for sqlize and to this day I still think they are important to take into account although I don't use sqliers anymore the two main benefits is the fact that it definitely has one of the biggest variety of database compatibility out there similar to typeform and also the community it's I believe it is the biggest Community out there and because it is one of the oldest ones and it was massive back when I started um so I never had any trouble like fixing anything when I've had trouble uh with bugs on something like Prisma because I couldn't I found it harder to find someone who had the same bug as me when it's with sqlize I didn't have any trouble whatsoever now the syntax annotation for sqlies really sucks in my opinion it's very verbose a lot of times to do simple query you have to write a lot of things it's definitely not as easy and as simple as something like typeworm and Prisma so that's definitely something you should take into account and the worst one is the fact that it doesn't really have any good support for typescript ivy leaves sqlies to be a very um JavaScript based form uh because that's what everyone used back then but specifically for that I think it is something that people have been steering away from because of how big typescript has become in the web developer Community thing is it doesn't matter if I tell you the pros and cons uh it's still very confusing to know when exactly you should use each of them now that's up to you however I am going to provide you my insight on when I would believe it would be best for you to use any of them so I would say that this is how it's structured I would put Prisma and typeform together but the way I would look at it would be if I'm working on something that I don't think will take a long time um or something that uh I won't be working that much in the future or something that will just last a specific amount of time just a normal project and I don't want to learn Prisma or I already know Thai form I would choose typeform now if it were working with anything related to typescript that is probably something that you want to build upon and continue working in the future I would choose Prisma so those two is it really depends on whether or not how you see the future of the web developer industry and on the fact that which of those you actually already know if you already know Prisma stick to Prisma if you're ready no type horm if you're interested in that I would try to learn a little bit of prism but I would still stick with type 1 because Prisma is one of my favorites now you might be thinking what about sqlites well sqlize I would say only use sqlize if you're working on a project that already uses sqlize and you're gonna be uh working with it anyway so like in a company that um that you sqlize and you have to learn it to to work or if you want to use a specific feature or specific library that originates or is related to sqlize specifically now in any other kind of situation I would recommend typeworm and Prisma for sure although I love sqlines as well I would say those two are better options I might be asking oh what about so now I know you might be thinking as well like oh you didn't really mention uh microarm or what about um objection.js or what about mongoose now those options are good but first of all microarm and objection.js are not as popular as Prisma type worm and sqlize so that's why I think those are second plane to to to the other options because most people out there would probably want to use the ones with the bigger community so that's why I didn't really gave too much too much attention for those and if you're asking about mongoose well that's not actually an arm that's an actual odm it's a little bit different so that's why I didn't because specifically for mongodb so it's a non-relational database but the options that I gave although you do have support for non-relational databases as well they have way more support as well for relational databases so that's why I didn't mention Mongoose or anything related to mongodb so finally after all of this review which one would I personally choose well if I were to start a project right now I would have to go with Prisma and it's obvious right it's obvious I've been using Prisma for over two years I believe um and I've been enjoying ever since I did step back and use typeform for one project and I there was a period where I was like oh yeah type form is amazing it's way better than Prisma but then I got back to Prisma it really depends on what what what what you're using in the moment right I personally love to code on whatever I'm coding in the moment I always think it's the best thing in the world but then I switch it and I hate to switch it up but then when I do I realize that that other thing also has a lot of features that I personally love so that's why don't use my opinion as a fact you know if you want to use typeworm use typeworm if you want to use prism I use Prisma if you want to use sqlize that's just a wrong opinion no I'm joking obviously but uh I'm saying like choose whatever you think is the best option based on what you want by using as much knowledge as you can gain from this video or any other video out there and then make your decision that's that's my opinion this is it for today's video I really hope you guys enjoyed this video If you enjoyed it please leave a like that below and comment what you want to see next subscribe because I'm posting twice a week um if you're interested to see my channels just put notifications on because uh you it will let you know exactly when I post if you want to check out all the gear that I use in my YouTube videos those lights in the background the camera the light that I'm using it's all in the description a link to Amazon if you're interested in buying them and yeah that's that's basically it I really hope you guys enjoyed it and I see you guys next time [Music] [Applause] foreign [Music] [Applause] [Music] [Applause] [Music]
Info
Channel: PedroTech
Views: 28,419
Rating: undefined out of 5
Keywords: computer science, crud, javascript, learn reactjs, mysql, nodejs, programming, react tutorial, reactjs, reactjs beginner, reactjs tutorial, typescript, react js crash course, react js, node js, express js, pedrotech, traversy media, traversymedia, clever programmer, tech with tim, freecodecamp, deved, pedro tech, prisma, orm, prisma js, prisma orm, sequelize, typeorm, prisma vs typeorm, prisma vs mongoose, prisma tutorial
Id: 8WoeGcJ_nNM
Channel Id: undefined
Length: 12min 43sec (763 seconds)
Published: Tue Jun 20 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.