hello friends hello friends hello friends and welcome back to stay tonight this is abhishek in this video we will be talking about what are the differences between an rdbms database and a new sql database we are a little late in creating this video because no sql databases have been there since a while now and mobodb is one of the most popular example i'm pretty sure that all of you must have heard about so in this video i'll give you a brief overview of how you know you can judge based on your application requirement whether you should go with an rdbms uh database or a nosql database so let's start by understanding what these databases are and how they differ what are the characteristics of both and what are the pros and cons of both of these databases so starting with rdbms you know these databases have been here since a while now and they are built well tested uh widely implemented in a lot of applications oracle mysql sql ibm db2 all are based on rdbms concept and these are some of the most excessively used databases out there in the industry right now our website straightrank.com is also using mysql database now based on the complexity of the product that we are building and the requirements i wouldn't say complexity but the need of unstructured data led us to start using a nosql database as well which is my mobodb so now we have two databases in place so let's focus on rdbms database first so as i said it is mature proven well tested and widely implemented so it won't be very difficult when you want to implement a rdbms database and you can easily find tutorials you can easily find well written guides on whatever stack that you want to implement it can be an old stack like lampstand or you can also use a mysql database or oracle databases with the modern react js and node.js applications as well so rdbms works based on tables so we all know we must have all of you must have studied this in your college or you know while doing your jobs so rdbms data is based on tables the structure the schema is created and various tables that created tables have a relationship between them and that is the core concept around rdbms relational database management system that relationships are created between tables the schema is a fixed schema that you have to define in advance what a structure your table will have uh that means you know all the columns that will be there in the table what will be the data type of that column uh what sort of data it will store in itself so all of these things have to be pre sent it has to be fixed then uh to access the data from rdbms we use sql again something that is widely used and again a lot of you might already have knowledge about sql it is stands for structured query language which is used to insert update read data from idbms databases then another very important thing that is about rdbms is it supports transaction and asset guarantees are provided now when i say acid i mean atomicity consistency isolation and durability so these are very uh important aspects when we are creating a large enterprise software so these things are very important for example if you're creating something for financial market or if you're creating some application which involves uh serious data transactions then rdbms data base is a wise choice because data consistency is taken care of very well using rdbms while you know a lot of things are sorted in new sql as well but still i would recommend that go with an rdbms database oracle is a very good choice it's a paid software but if again you know if you're building something big if you have if you the security and the the structure the consistency of data is very important for you then you have to go with rdbms coming to the cons i would say rdpms is a little less scalable compared to nosql distributed setup is a bit tedious and mostly when we use rdbms and what i have seen around is that people scale vertically they don't go with horizontal scaling the scale vertically that is they increase the power of the machine that is running their rdbms database rather than creating a distributed setup with rdbms database because the parent child setup doesn't work well with rdbms people have such setups but then in that setup the primary machine is used for insertions of data into the databases but read is supported by the the whole cluster that is set up so when i say cluster that means that there are multiple servers running the same database setup the same rdba setup and replicas are created so some rdbms databases also provide replica features but not all provide that so i would say uh to summarize this i can say that rdbms is not cloud ready there is no sp databases because these are modern databases they are cloud ready now coming to know sql now uh nosql doesn't mean that it is just you know it doesn't support sql there is a different way of querying data from these databases but just to you know keep it drastically opposite the name nosql you know immediately informs that okay you know this is not the traditional databases the primary feature of a new sql database would be that it can store data without a structure and that is something that in itself can be confusing but once you understand it it will be it is one of the best features that the new sql database has that you don't have to worry about uh the structure of your data beforehand for example if you're creating a new application if you're developing a new application and you're not yet sure that what is what will be the data structure of the data that you are gonna save in your database so in that case mobile db or couchdb red is there are so many nosql databases those are very good choice and they're easily available on cloud all these databases are available as cloud service and you have to pay a very nominal fees to start using them as you develop your website the structure changes so you don't have to worry about you know uh the older data had a different structure new data had a different structure you just have to fix uh that the handling of that in your code and things should be sorted although it is not recommended but yes these things happen for example we are creating an interactive course on our website straightnet.com we started with html css now moved on to javascript and uh we initially thought that the the structure of the application will stay the same but html css were comparatively easier to implement and the javascript compiler came into picture which is based on node.js so the structure in which the data is being stored uh that is used to deliver the interactive course got changed with javascript and it was easier for us because we were using mongodb and that you know if we would have used mysql for that we would have faced a lot of problem but that's okay you know that's a different story all together we'll cover it in a different video so because uh the data is not structured in nosql so there is no foundation of setting up relationship the performance is very high in case of mysql or in case of rdbms the data has to be inserted in a certain relationship has to be maintained in case of nosql there is no such liability of maintaining a relationship so the data insertion is super speedy sometimes so there are different databases in noise field as well which are right intensive or read intensive so you have to choose based on your use case whether you want data if you want to for example collect an analytics data so you have to pick some database in no sql which is uh you know which conducts right uh operations very fast and if you have a requirement where you want to uh read data too much so you know based on that you have to decide what database you want to have ease of use is a very big plus point which i've already mentioned that deployment is easier it's available on cloud the pricing is cheaper the scalability part is sorted you don't have to worry about the structure of data so as of use is a big plus point scalability again because it's available on cloud you don't have to worry about how will i scale my database once my application starts getting too much traffic the data that i said is unstructured so it's mostly in json format although there are different formats so the main three four types of format that are available in new sql is document storage so document style storage is done again in form of json data then there is key value pair which is followed by redis which is a very popular in memory cache system as well then there is wide column storage and graph storage graph storage is in which the data is stored in form of graph notes and all that and it's very useful when it comes to searching data from an oscillate database apart from this as i've said multiple times that nosql databases are available on cloud so they are easily scalable and horizontal scaling is also very easy and they're a very good choice when you don't have to worry about how to maintain the database and all that stuff now coming to the differences of when to choose what that is very important that you should know although i've covered most of the points in detail in this video so you should have a better idea by now that what to choose when but still i'll cover a few points more to help you better decide uh which one to choose for your next project or application or in general you know you should know the differences if you are going for an interview right so if you don't want to get involved into writing too many queries to many complex queries which involves joins and all that stuff uh then nosql is a very good choice in case of generating reports from many uh tables it's very easy to use a new sql database than it is in an rdbms the next difference would be a deployment if you have enough time to manage a rdbms database which is deployed on a high resource intensive machine then it's okay you can choose rdbms again if you are into developing a enterprise level solution which involves financial transactions or you know data which is very important to have a better consistency with then rdbms is a good choice otherwise no sql databases are a good choice because they're easily available on cloud as service you can pay as you go scalability is easier but yes you know at times the consistency part can be missed a little bit when it comes to workload i think nosql databases perform well than rdbms databases although i've seen companies where rdbms databases like oracle are being used where data is you know coming in high volumes and it's still able to manage it using partitions and all that stuff but yes new sql databases are a better choice than the high when your application is a high work load in case of nosql you don't have to worry about uh normalization of data denominate data can be saved structure is not a issue in case of rdbms you have to make sure that tables are normalized and relationships have to be set so that is again one overhead that people i think you know in the modern era don't want to get into and the last point is that rdbms databases are less distributed whereas nosql databases are more distributed you will find a nosql database hosting in almost all the popular hosting services these days in aws google or seo or any other popular service you know in one click you can do the setups i would recommend movidb address as it is a very great service again cloud-based setup which mobile db is providing themselves super cheap initially free almost and then you can scale uh you know based on your requirements has a very good reporting dashboard we are personally using that so that's why i'm you know promoting it so much but that's a very good choice when it comes to you know using nosql databases in redis as well redis lab is also providing the same cloud-based offering in which you can choose your server to be set on aws such as the ocean or different other services cloud hosting services it is not that expensive to start with free to begin with and then you can pay as you go so these are very good options in case of nosql and now you know what differences uh to look for what uh points to focus on when you have to choose what database be it rdbms or nosql so with this let's end this video i hope you like this video if you have enjoyed or if you know this video help you in any way do give it a thumbs up share it with your friends and please do subscribe to our youtube channel almost 94 of the people who watch our video do not subscribe we just get a conversion of six percent which is very less and i'm requesting you you know to press the subscribe button press the bell icon so that you get notified by youtube whenever i post a video and we will surely be you know bringing in more content for you guys more informative content like this so keep watching and happy coding [Music] you