SQL With Gen AI Full Course 2026 | SQL Tutorial For Beginners | SQL With Generative AI | Simplilearn
Key Takeaways
This video teaches SQL with Generative AI for beginners
Full Transcript
Hey everyone, welcome to this course on Genai powered SQL for business analyst. Let me start with something very simple. Have you ever felt stuck writing SQL queries? Or maybe you understand business requirements but translating them into technical queries feels confusing. What if I told you that you don't need to struggle anymore because today business analysts are not just writing SQL. They are writing SQL with the power of generative AI. And that's exactly what this course is all about. This is not just another SQL course. This is a business analyst course powered by Genai where you will learn how to think like a business analyst, analyze like a pro and use AI as your intelligent assistant. Now let me quickly tell you what we are going to cover in this journey. First, we will build a strong foundation in SQL basics. Understanding databases, tables, relationship, keys, and how data is structured in real business system. Second, we will move into writing powerful queries like select statements, filtering data, sorting, grouping, join constraint and everything a business analyst actually uses in real project. Third, we will connect SQL with real world business scenarios like analyzing sales data, customer data, product performance, and operational insights. Next, we will learn how to use generative AI tools to write, optimize, debug, and even explain SQL queries. You will see how generative AI can help you translate business requirements into accurate queries within seconds. Next, we'll work on practical example and hands-on exercises so you don't just watch, you actually practice and build confidence. And finally, you will learn how to think analytically, how to ask the right data questions, how to interpret query results, and how to present insights like a true business analyst. And by the end of this course, you won't just know SQL. You will know how to use SQL smartly, efficiently, and with the support of generative AI. So, if you're ready to level up your business analyst skills, and make SQL your strength, let's get started. So, before we move on, here's a quick information for you. If you are interested in boosting your career in business analysis, do not forget to check out our AI powered business analyst course. This course is perfect for professionals looking to enhance their skills with the latest tools like PowerBI, Excel, SQL, all while gaining hands-on experience with real world projects. You'll also learn how to leverage inative AI for smarter, faster decision-m our program is Babok B3 aligned and it will help you prepare for certifications like CBA, CCBA. You'll be engaging with 10 plus industry projects, benefit from live online sessions led by expert. Plus, with simply learn job assist, you will get the support you need to land your next big role. So, what are you waiting for? Hurry up and enroll now. The course link is mentioned below. So, before we get started, here's a quick quiz question for you. Which of the following is the main skill a business analyst uses SQL for? Your options are designing website layouts, analyzing and retrieving business data, editing videos, or creating mobile apps. Drop your answers in the comment section below and let's see how many of you get the right answer. So without any further ado, let's get started. >> A global company has thousands of employees and numerous projects and multiple departments. Of course, if employees are working in a company, take any MNC suppose multinational company which is located globally in multiple countries. So they're working on so different different types of projects and also they are having multiple departments and those departments spanning over various countries. So it stores data such as employee records, payrolls, budgets and project updates in multiple systems and locations. Of course I am working from India, you are working from USA or somebody working from Dubai or somebody is working from Malaysia. Okay. So that data will be stored in somewhere, right? Okay. So if you're working from different locations, the data will be stored in different different locations. But the company needs a way to access this data very quickly and maintain accuracy and store it securely. These two things are very very important. Right? What are the two things? Accuracy. Yes. If I am requesting the data immediately I can able to get it. And if I want to store the data, yes, security is very very important. If you are observing so nowadays in banking domain always they first always they will think about security right. So my account details or my account data for suppose my transactions data. So banks has to maintain very securely. So for that one so they need more security on the data. So storing is simple but uh maintaining the security is very difficult. So if if you are taking a global bank for example, so global bank or any company there are thousands of employees are working in that company on different projects might be one project will be credit cards and another projects will be account savings account or current account. So these type of products might be they are working on So where they are storing the data but how they are storing the data, how they are securing the data right and how to maintain the employee records and how to maintain the payrolls and how to maintain the budgets. So in multiple systems in different locations but the company needs a way to access this data very quickly and also it has to maintain its accuracy and store it securely. So now the game starts actually. So people has to tell your views about this one. How the global company manage and organize access large amounts of different data efficiently while keeping it as secure and always available. So even if you are working in a company you are doing going to do the same thing right if you are joining in a company so they are creating one user for you. So if you want to access any application so that means we need to store our data. So we are just filling a form and we are submitting the form. Our data will be stored in the database. But all the users are having access to all the applications means no right. So only the few people only having a access to the particular database. So that access control and everything will be managed. and possible by using the databases at least how the application is working you should know that is sufficient to complete this journey right so coding is not a problem nowadays if you are speaking about the coding uh even if you are asking charg nowadays it is giving coding right if you're asking uh charg to write SQL queries so any generative a model If you're asking question to write SQL query, it is automatically generating code for us. Now the thinking is very very important. So the coding is not a matter. So nowadays but previously before charges the game is changed actually. What the change? We are all working in different different companies. might be you already having having some experience. What is the game changed is nowadays if you are a developer. Okay. So you don't want so complete knowledge on so writing so deep code and all right we are having experience with uh how to write coding that's all that is sufficient we can make use of GitHub copilot and some other tools we can make use of GitHub copilot and some other tools to generate the code okay so that's all and also some other tools in the sense here in this session we are using some free tools like chat GPT because GitHub copilot these are all licensed ones okay so if I'm having license I will try to show you how to use the GitHub copilot also but anyway even if you are working in your own domain perose might be that is financial domain or banking domain you are not exposed to the coding no worries at all the major reason is code will be generated by the AI nowadays or through artificial intelligence especially by using generative AI we can generate the code but what we have to focus getting the business knowledge so that is the major focus right nowadays getting the banking domain knowledge or getting the financial industry knowledge where you are working in which domain we are working so getting that knowledge is uh uh what we can say it is uh giving more importance to you. So after getting the knowledge you can understand so what what's happening okay in your organization what type of business the organization is doing so that type of understanding we already have then writing the code it would be automatically generated by the AI so that's why so our course title is also something you can observe it's a generative AI so SQL learning SQL by using generative AI Okay, simply I can say so you can able to write the SQL queries with the help of generative AI but might be you are asking some questions without having knowledge on SQL so how can I write how can I write a prompt and how can I ask SQL queries correct I don't know SQL I'm new to the SQL but suppose I don't have any idea in SQL how can I write a prompt to generate the SQL queries. Yes, that's what we are going to learn in this course. So throughout this journey, I'm going to make use of chart GPT or some other tool for suppose Google board. Okay. So we are using so so many generative way. So some free tools are available right? We can make use of the tools with the help of the tools we can able to generate the SQL queries and uh that SQL queries will use it in our application application in the sense here we are interacting with the databases for generating reports and all other stuff right so for the sake of that one we are going to ask generative AI models to write the queries and we'll use that queries in our application like that. Okay. All right. So for this particular problem if a global company wants to maintain so thousands of employees and thousands of projects and uh multiple departments all these details they need to maintain one centralized database. the correct answer I'm speaking just uh let me show you the solution for this one then it would be very easy for you what is that one so how global company manage and organize access large amounts of different data efficiently while keeping it securely always available what is the main challenge here how we can maintain so large amount of data that is one question and another question is how can you maintain the data very securely and also how fast we are accessing the data. So the third question is how efficient you are accessing the data. For example, if I'm requesting for some data, how fast it is providing the data. So all these things we need to take care. Might be some of the employees might be noticed you noticed they are giving answers like yes we can leverage one cloud database. Yes exactly your answer is correct. You can leverage one cloud database might be MySQL database or Oracle database or some other database. So that is we can call it a centralized database right. We are not supposed to bother about how the data will be stored, how the data will be efficiently accessed and all. All those things will be taken care by the cloud people. If you are leveraging from AWS, AWS will take care. AWS stands for Amazon Web Services that is a cloud company. They are providing. So this SQL databases as a service. Some people are might be speaking about yes we can maintain distributed database. So we can maintain one database in uh Malaysia, one database in India, another database in Dubai. So all these databases are specific to the particular business but the data will be distributed across different countries. Correct? Might be Malaysia data will be stored in Malaysia. uh because to maintain the fast access and all because if I'm working in India if I want to access the data my server is located in my database server is located in India yes of course I can able to access it very quickly correct and also how this uh how can you make it all these things collaboratively to work together for that one we have some solution like distributed databases But nowadays most of the database servers are centralized. Centralized in a sense they're maintaining one database server in cloud almost all the countries transactions are connected to the database. That means uh even if you are making a transactions from Malaysia or Bangalore or Dubai or some other USA or different different countries. So all the data will be stored in what is that one in a centralized database. So might be if I'm asking what kind of problems could happen if the data is stored in different systems do not connect it shows many duplicate data correct because we don't know right so the same record might be the same person will be registered in USA and also same person will be registered in India in such cases what happens there is a duplication of the data and also we cannot retrieve the data from what is that are some central place and another important thing might be you can think of uh if you are doing ETL per suppose extraction transformation and loading what we have to do so your data is not located in some centralized place right in such cases you have to extract the data from different data sources one data source might be from India and another another data source is from USA so different different data sources okay so all these headaches. Okay. So the next question is why is it important for the data to be available quickly and accurately? Why quickly quick data access is required? If quick the if the data is not accessible very quickly what happens. So let's think about the scenario you are using an application in called as Amazon. I am not talking about so Amazon because Amazon is serving very quickly. Think about some mobile application so e-commerce application. If delay happens what happens so the customers they are losing the customers right so truly they are losing the customers. For example, uh you are attending my session, my internet connection is bad, then what happens? Same thing happens with respect to the delay also, right? If you are attending my session, my internet connection is slow or uh whatever the my audio is not getting rendering properly. In such cases, you are getting you are feeling that one has a bad experience. Correct? In the similar way, so you are purchasing a product in some e-commerce company. So always you are using some mobile application or something. You are trying to access the data always the customer experience is very very important. If you the the business organization is not providing so the customer experience properly automatically the customer will go to the another company. If I'm purchasing some product in some APC company, if they are not providing the product very quickly, so definitely I can say feel some bad experience about that company, right? Definitely I will go for another company like that. Okay. So that's what I want to tell you uh in a real view. So data is always make sure that we need to make sure that even if you're writing some SQL query to fetch the data always we need to make sure that uh that query fetches the data very quickly okay if you're not accessing very quickly it's not possible and also what role do you think database or tools so like SQL might be playing in to solve this. So that means to solve all these problems that means how to store the data and how to retrieve the data there are several things right how to store the data that is one thing how to maintain the large amount of data yes how to maintain how to access the large amount of data very quickly and how to secure the data so that is another question another challenging part is what is that one how to secure the data and also if you are talking about So one global business company global company how that global company is organizing this data in a proper way. Okay. So that is also another challenging part. All these things should be taken care by the database service providers. Who are the database service providers? Some of the database service providers nowadays uh these databases are provided by several companies right what are the different types of companies that are providing there are different types of databases that are available first one I'm talking about what is that one so relational databases correct so what are the relational databases that are available in the market so the popular one is what is that one so Oracle so if you are working in an enterprise price. So, Veracle is very popular one and also MSSQL server. So, Veracle is from Verra Corporation, right? Veracle Corporation is very big company. They're providing. So, this database as a solution per suppose what we can say to solve all these problems. So, Oracle is providing one solution in the similar way. uh one another popular company is what is that on Microsoft right Microsoft also providing their own solution called as uh Microsoft SQL server and also we have some open-source databases so like MySQL this one is become popular because this is open source open source means we can customize it according to our requirement and especially we are undergoing training right we are not getting enterprise licenses. So that means if you are working in a company uh under a particular account so the company will pay for you right to access the database and all but if you're in the training per suppose if you're working in working for the training and also especially for your uh simple projects open s databases are sufficient. So this MySQL we can call it as this is a opensource database right open source means what you can use it without any enterprise license no licensing is required license means one database license it will cost around uh for a particular amount account it will cost around in lakhs okay so if you are working for your personal projects it's not an enterprise application your own e-commerce application or something you can go with what is that one so open source databases okay and uh tell me some other databases might be hard about very lightweight database what we can it is SQLite SQLite is also an open-source database and also very this is very lightweight database lightweight in the sense the size of that one is very less very good so another Great choice is what is that one? So, Postgress. So, Postgress is also providing their own database and especially in the relational database flavor it is providing so this database. Okay, I'm just closing with the relational databases. So, one important note is all these relational databases are using SQL language. So, almost all the relational databases are using SQL. SQL used in what is that one? So relational so databases is a cloud service provider. So they are providing Oracle database as a service, MySQL server as a uh service. Okay. So they are offering almost all the databases as a service. If you are speaking about the cloud, cloud is providing platform as a service, software as a service, database as a service. Okay? Different types of services, right? Okay. So you cannot consider AWS as a database. AWS is providing so database services. All these database services, Oracle service, MySQL server service and all those stuff. But uh you have to understand so some of the key important things but suppose what are the different types of uh databases that are available you need to understand right so because if you are working on so in real time so different types of applications so as a developer we have to understand about some of the so different types of databases uh to be used in the market. So you can just look into this one. So this is the learning objective for this session by the end of the session. So you can able to understand identify different types of databases and match business needs and guide data and structured data decisions and distinguish the main features of DBMS and RDBMS. You need to understand so what is the difference between DBMS and RDBMS who recommend suitable tools for business applications and also entity relationship diagrams. So and you're explaining requirements to the stakeholders. Stakeholders means that means the people who are involving in the business they can call it as stakeholders. So by using ER diagrams we are explaining so how you are storing the data and everything to the stakeholders and uh we are understanding the relationships between the different data type uh entities or suppose so interpret the relation relationship types to design. Okay my first question is how these applications are getting the data very quickly. So I want to I'm just searching for a restaurant uh in the application. How you are getting the data about the restaurant very quickly to place the order. So just you are searching right. So that means the data will be stored where in the database correct but if the database it is okay database means what anyway it is storing in storing in the hard disk. But how you are retrieving the data very quickly and how you are typing some such query in your application Amazon application or Swiggy application how it is going to the database. So all these questions right so let me explain in a with a simple scenario so all of you can able to understand. So database is holding large amount of data. It's capable of holding what is that one? So large amount of data. So these are all some of the features I'm writing. And another feature is nowadays databases we are using to store our application data. Right? So that means you can able to access the data and we can able to perform operations on data. So perform operations on data. So very quickly how it will perform because application programs that means apps are integrated with the database very easily. integrated with the so database very easily. So that means we are not supposed to write any complex code to integrate to provide the integration between what is that one our application and database for example let's say just a second yeah this is my swiggy application per suppose or ja application you have a search box for searching restaurant per suppose uh so tell me on famous restaurant so in Bangalore or some might be I'm searching in my own per suppose um okay Jon okay so if you're searching for this name so automatically the data about the restaurants will be stored in this database right so database means it is maintaining some database software so this is a separate So this is a database server for what is that one? So Swiggy company. So Swiggy company is maintaining separate database server for their application. So this company so is maintaining separate application. But suppose this is a mobile application or web application. Whenever we are searching for so Jun restaurant so automatically the request will is going to that server and it is giving the response that means it is giving the response with all restaurant details whatever the items that are available and all those details will be getting displayed here. So in this way so the database is running on separate server. Your application is running on separate server. Always database is used for what is the purpose? Storing the data and uh getting data very quickly. So getting data very fast and also securing data. So these databases are taking care of about what is that one? So securing the data and also another thing if you are talking about so overall it is managing right so managing users access means for maintaining security okay all those things will be taken care by this database itself. So what are the companies that are providing so this type of services? So the major companies are first one is Veracle and another one is MySQL. So MySQL is it's a open source database actually opensource and also if you are speaking about so MSSQL server but of course all these are all what is what type of databases what type of databases relational databases But nowadays mostly most of the situations we are using what is that one? So relational databases only. Okay try to understand most of the people are using relational databases. But along with that one along with these databases these databases can be categorized into different types. I want to show you some of the types here. Please look into these types. So then we can able to understand so somewhat internals about so what are the different types of databases we have. Uh so these are also different types of databases. I will talk about each and everything very clearly. Uh first one is go in a relaxed way. So relational databases and next one is what is that one? So no SQL database of course if we are speaking about relational databases. So that is nothing but SQL databases only right. So we are using SQL queries to interact with the databases to perform some persistence operations like insert, update, delete, all these operations and uh something so looking strange right? No SQL databases. So no SQL means what? There is no SQL. We are not using SQL. and some other another definition like graph databases uh I can see like if I'm working with jenna applications I am working with jenna application development also uh there I am using so neo4j1 database which is especially graph database I will discuss about that one what is graph database and how the data will be organized in the graph database and all and also centralized database of Centralized database in the sense it is a networking terminology. We are not going to maintain distributed databases. That means in each country we are not going going to maintain a separate database. Instead of that we are going to maintain one centralized one database in centralized location might be in northern Virginia or somewhere and uh all the clients are connecting to that database from Singapore and Malaysia from India from Dubai from all business locations all the people are connecting to that database right so there are different scenarios we have so one is central ized database and another one is distributed database. So let's talk about all those stuff. What is open source in the sense I developed one software for example? Uh so I developed my own database solution. So by providing all these features what are the features? So first one is if your company wants to develop a database solution what are the things we need to take care so fast access and also uh app developers you need to make sure that app developers can easily integrate to the database. Right? If I'm an uh if you're developing a database, we need to make sure that application developers for suppose JTO I am developing my own application food delivery application. I need to make sure that I need to provide some API so developers can easily develop the application and also as well as security. Security means database level security. So database uh DB security and other level other levels of security also. Okay. If all these things if you are satisfying so then only your database solution will be standing in the enterprise. Correct? Otherwise nobody will use your solution. So in the similar way so if I'm developing my own solution initially I'm releasing it as a opensource because I don't have so very big revenue per suppose I have very little team with the team I developed the solution so I have only 10 members per suppose in the team I developed some solution which is very good so I'm making sure that so all these things will be getting satis satisfied. So the second point I'm speaking about so the application developers can easily integrate into the database. What is the meaning of that one? For example, if you are doing a Facebook registration per suppose how the Facebook application form looks like any registration if you are talking about so the name they are providing one text box so something so they are providing email so like that they are providing multiple fields and finally you are clicking submit correct So my question is so once you are clicking submit where the data is getting stored I think stays ultimate solution is so you're going to store this data somewhere somewhere right somewhere in the sense might be in the text files but the most advanced solution is what is that one so you can store this data in the database And also once it is successfully stored in the database that means your user data. So user data is successfully stored in the database then what happens? So once we'll get the message what is that one? So registration successful. So we'll get the message something like so we'll get the message registration successful like this that means how the application developers for example application developer means I am working on so some Java how Java developers can integrate with this databases. So by using one language called as what is that one SQL. So if Java developer wants to talk to the databases they need one language called as what is that one? SQL. SQL stands for what? Structured query language. So the SQL queries are embedded in JavaScript correct or Java. the SQL queries are embedded in Java program to perform this operation. Okay. So what I'm saying is so if an application developer wants to connect to the database application developer so must have a knowledge. So must have a knowledge on programming language and also as well as what is that one SQL so this is super important right without having knowledge on SQL so how they can integrate in your application so that's what I'm saying so about the second point so the databases are offering one separate language which is called as SQL So by using SQL so we can able to perform what is that one? So different types of operations like insertion or updation or deletion or fetching all these types of operations like that. Is it clear? I think your question is clarified. So the databases are offering so some separate language called as SQL. So with the help of SQL so we can able to perform so different types of operations. So let me explain. So different types of databases different types of databases architectures that are available for suppose relational databases but we have some other types of databases are also so that are available in the market. So we need to understand set what type of scenarios and what type of databases that are suitable for the particular solution. So let's observe the scenario for suppose here. So these are all different types of databases. So first let's try to understand so what is database actually what is data after that we'll jump into what is that one. for the architectures. So data is nothing but a raw fact. Okay. So simple example I will tell you for suppose while joining in simply learn right we are all attended this program you're all attending this program while joining in the simply learn might be you filled out some form in the sense you are providing your data correct so I'm my name is this and my email is this one and my mobile number and also along with that one so your uh filling out some information related to you. What is your experience and what is your qualification and all those stuff that is nothing but a data. Okay. So for example from simply learn might be somebody so somebody in the sense like uh uh the people who are very good experience uh who are having very good experience in uh understanding your existing knowledge but suppose to propose some courses what we can say counselor or some analyst might be they are going through your data and they are identifying some insights Okay. So this person is already working in this domain banking domain. Might be we are suggesting this type of course that would be helpful for their career to get into the next level. So for that one so what they are doing is who are the analyst working in simply learn they are getting your data and they are getting some insights from your data. Right? So how many years of experience you have and how which domain you are working and do you have any coding experience or not. So all these things will be taken into the consideration uh by exploring your data and they are preparing some what is that one? So some information we cannot get it directly. So try to understand information is always getting from data. data is nothing but it is a rough act. Okay. If I'm just throwing one Google form or you are I'm just conducting some survey you are providing your data. So from the data I will get some insights about you right? So that means you are having this much of experience per suppose how you are suitable to this particular course whether this course is suitable for you or not. Who are all these are all these things will be come comes under what is that one so information so finally conclusion is data is nothing but what is that one so the raw fact so I will show you the slides also no worries try to understand so in simple terms why because if I'm writing and explaining you people can understand easily yes so it's a consolidated data uh it is helpful ful for what is that one? to getting the information getting some insights about so the particular persona perose so next one is what is that one so information so information if I'm talking about so the processed data so can be arranged in so can be arranged in a So meaningful uh way per suppose can be arranged or shown in a meaningful way shown in a so meaningful way that is nothing but what is that one information so is it possible so like if I want to present some monthly sales how can you present it if I'm showing in some Excel sheet uh the manager can able to understand so what are the insights about that one? No, it's not like in a Excel sheet. So it's a contains numbers, right? It contains so many numbers the people cannot understand. So like how the sales will be increased or decreased something like that. So what is the alternative solution? Yes. So you might be speaking about the tools PowerBI and all that means through some visualizations we can explain entire data through visualizations might be the people can easily understand right might be through some bar chart in uh monthly month wise some bar bar chart you can prepare and we can show showcase it to the manager so the manager can easily understand so what are the sales to be done like that information means we cannot say the information should be presented in an excel sheet. So the data like that information is might be present in a uh might be in a bar chart or might be in a pie chart. So through some visualizations we can provide the information might be you are looking into your suppose your child progress card progress report. If I'm looking into my son child my son uh progress report right I can able to see how I can understand like whether this person is studying properly or not. I'm not going getting into the details of how many marks he is getting in uh uh science and how many marks he's getting in math and where exactly the last month and current month what is the change all those things if I want to observe accurately if I'm looking into the numbers I cannot get it if I'm looking into some image or some visualization so I can able to get it very easily Right. Okay. So for that one so maybe you are using some of the tools like PowerBI right. So PowerBI is integrated with the what is that? SQL. So we can use SQL. So to fetch the data and that should be integrated with PowerBI to display some visual dashboards uh table view. Okay. All these tools we are using. So we understand. So what is data and what is information? See why this data is important from where we are getting the data. So some might be I'm asking question. So from where we are getting the data I think you know uh regularly you are working in some companies you are getting the data right so from what what type of sources we are getting the data. So just you submitted your data through Google form right and might be you can think of like some trucking company uh they are getting the data from sensors. So to the trucks they are arranging some sensors. So whenever the location is getting changed every 5 minutes they are tracking the trucks and they are getting the sensor uh they are getting the data from the sensors and also the weather information if you are observing. So some applications like windy there are so many applications we have in the market. All the applications are visualizing the weather information in very clear way. How that weather information they are getting actually the weather information they are getting from satellite or something right. So through different sources we can able to get the data but if you want to present it in a proper way if you want to present the data in a proper way that is we can call it as information. Is it clear all of you understand what is data and what is information let's proceed with the next level because we spend so lot of time in uh understanding data and information. So let's jump into the next level. again we'll uh uh we have recall all these things in the PPT so I will discuss about that part next part next thing is what is database right so we need to understand about what exactly so database how it works actually so we are working with database only if you are observing so nowadays you are working with what is that one so databases if you want to access the Google for suppose if you want to access google.com what is the software we are using so people are using so different different type of web browsers right what are the web browser softwares we are using to access any worldwide web for suppose okay so different types of browsers we are using. Okay. Why this browser? Actually, this is a one application software which we are using to connect to the worldwide web without that software. Is it possible to get uh so the information from the web? Can you please tell me is it possible to get the information from the web without this software? No, not at all. In the similar way I need to maintain the data. In the similar way, similar case you can keep in your mind. In the similar way, I need to keep I need to store my data. I need to process my data. I need to get some insights from the data. But suppose I need to get some required information from the data and also I need to secure the data. all these things. So we need to get fast access to the data and also I need to secure the data. I need to structure the data in a proper way. I need to structure the data in a so proper way for suppose and also I need to export this data by using some so simple query language called as what is that one so SQL SQL stands for what structured so query language So all these features are shipped with what is that one? So databases. So we need to get access to the data very quickly. It is providing a mechanism to quickly access the data and also it is providing a mechanism to secure the data whatever the data you are storing right. So we can provide role based access we can secure the data and also we can able to structure the data by using uh different types of approaches relational approach different types of approaches and also it is providing especially one language so which we can call it as SQL. SQL stands for structured query language. With the help of this language without writing any complex program, right? Even you are not supposed to write 100 lines of code to uh get some insights from the data within single line with the with the help of single line query we can able to perform some complex operations also. So that is the power of what is that prono database softwares. So we can say in a practical way a database is an application software. So like Google chrome or like some other software which you are installing Microsoft Office. If you want to store your data, if you want to secure your data, all these things, whatever I mentioned here, if you want to perform all these things, what we have to do? We need to install that application software in your machine. So what it is offering? So it is providing several features, right? What are the features? the fast access and also secure data structuring data in a proper way and also along with that one so multi-user access. So multiple users can able to access to the database. We are all there are 50 plus employees are there in this uh cohort perose for all these employees we are maintaining single database. So all the employees can able to connect to the same database like that and also you can able to structure your data in the form of what is that one. So tables, so views, there are some other database objects. So all those things are possible with the help of this database software. Database management system software. But what are the different types of database management system softwares are available. But uh we are using different types of databases according to their uh context I am speaking about. So I'm writing some of the databases. First one is relational databases and another one is NoSQL databases. What is that? So no SQL databases and another type of databases is distributed databases and also centralized databases. Centralized databases. Okay. We have so different types. First let me explain. So these are all so the main things. So first if you are talking about so relational databases for example another one will be so what is that one? So graph databases and another type of database might be recently introduced. What is that one? So vector databases. So these are also database softwares only. But we these softwares can be used for different purposes. Okay. So we need to understand what is the purpose of these databases. How these databases are suitable for our requirement. For suppose because if you are working as a database analyst, you must know about what is relational database, how the data will be stored in these relational databases and where we can use NoSQL databases instead of relational databases. Right? So there is a separate NoSQL database is available. So we need to know about when what type of situation we can use this NoSQL databases with respect to relational databases and also what is the power we are getting if you are using distributed database management system. What power we are getting distributed in the sense in the name itself the database softwares that means database servers are located in what is that one? So multiple locations but all connected through the network and another term we are using here. So this is distributed and this one is centralized. Centralized means we are maintaining a single database server. That single database server will be sharing the responses to all the users like that. And also another word you can see here. So graph graph databases. Great. It should be like a graph which contains nodes and edges. We will see that one. And also recently in the gen world if you are working with generative a technologies. So we are going to store our data in the vector databases. So we'll discuss about that part. First let's jump into relational databases. This is most probably we are covering in this course. So first let me talk about what is that one? So relational databases. So relational databases if you are talking about the data will be stored in the form of what is that one? So the tables. So first one is what is that one? So relational databases. So if your data is structured for suppose if your data is structured structured format then we should go for relational databases structured format in the sense for example I am doing employee registration of course my employee data is structured so from the user interface I'm getting only so structured details right so I'm getting employee number so name and also address so this is called as what is that one so structured data okay so what what does it mean even if multiple employees are registering also all the employees records are in the following the same structure. Correct? All the employees are having employee number, name and address. So same schema that means all the employees are having so all the employees are maintaining same schema. One record and another record cannot be differentiated. Cannot be differentiated in the sense one record contains employee number, name and address. Another record also contains employee number, name and address. It should be represented in which format? So table format. So this type of data we can call it as what is that one? So structured data. So simply try to understand structured data in the sense it should follow the same schema, same rule, same regulation. So that type of data comes under what is that one? So structured data. So let's this one is suitable for all types. Can you please tell me some of the situations regularly you are using applications right? You are using Swiggy, you are using Jato, we are using Amazon all the applications. So for all these applications structured databases are suitable that means relational databases are suitable all you are sending such structured data for example you are placing an order first question let me ask one by one question per suppose so let's think yourself so you're placing you are selecting an item and you are placing an order so for this functionality So this is a functionality in the application. So this one requires so the that data you are sending that is structured data or unstructured anybody for suppose even if you are sending if you are placing an order I am placing an order what details we are getting name order id right so these are all the details right so name might be order ID uh location item name. So something others per suppose might be some other information all the people are sending same details right like in the similar way another functionality so somebody is saying payment details so if you are paying if you are paying if you're making payment perose so the payment details also structured only almost so that one contains what is that one so the card details So uh this one contains payment ID. So card ID. So that means uh what we can say card number and type of the card status that means the payment is done or not. So these details are also getting captured in what that one structured way. So for all these type of functionalities. So what I'm saying is structured databases are sufficient right structured databases are sufficient that means if your data is structured then blindly we can go for relational databases yes so tracking order all these comes under what is that one structured data so let me introduce some other scenario so let's uh let me tell you another scenario it is not structured okay it is not following all the for suppose even if I'm placing an order you are placing an order. All following certain schema, right? All are filling the same form. All are submitting. Whatever the details we are sharing with the database that is following certain schema. Okay. So, can you please tell me some of the applications might be social media applications you are most interested regularly using? I I can see like most of the people are using Instagram. Correct? Yeah. First question. First answer I can able to get it but uh I think I know few years back I am using Facebook but my account is now I'm not using at all. Okay. In Instagram people are using most of the so if I'm talking about unstructured so no SQL databases will come into the picture. So what is NoSQL? So NoSQL is capable of storing both structured or unstructured data. So it is capable of storing so both structured data and also as well as what is that one? So unstructured data right. But what is unstructured data? If you are speaking about say Instagram or any social media application, if you are developing, if you are observing social media data so is it possible to store social media data in a table? No. Right? For example, I'm sending a post. So take LinkedIn or otherwise what we can say Instagram. So LinkedIn H what are the other types of applications? Uh I am not using Facebook. Okay. So these are also different types of applications right whatever it may be. Can you please tell me whatever the post you are making the post data whatever the data you are posting that data will be common common in the sense for example I'm making a post so what are the major data might be we are posting so every post contains what is that one so the post ID so the data associated with post will be so the post for every post post ID will be generated and also the content of the post. But this content might be text or image or audio. We cannot say so right is it might be text or audio or image and also might be uh so at what date or time the post is posted. Yes, it will generate the data. But let's think yourself, is it possible to store this type of data in a structured table? Not at all. Because there are millions of users will be there. Millions or billions of trillions of users. All the users are posting some different posts in their social network. I am posting it some text message. So Pin is posting some image. So some others are posting some other uh audio perose. Some others are posting video. In such cases you you're following whatever the data you are storing in the database it is following certain schema. If I'm creating a table like this for suppose if the table contains what is that once the post ID and also the content of the post and date whether this content will support all types whether this content will support image audio and video. No, not at all. That means each post what we are posting that should be of different type right? So one post is of type image, one post is of type audio, one post is of type what is that one? So in such cases we can go for what is that one? So no SQL databases. What is that one? If your data is unstructured. So if your data is unstructured especially so then we can go for so no SQL databases example so MongoDB or Dynamo DB so these are all different types of databases I'm not speaking about so more about internal details just I'm providing a picture that what type of situations we can go for SQL databases If you are having structured data per suppose then we can go for SQL databases if you are having unstructured data the data is not fit for what is that one so so the particular schema table schema so if I'm speaking so I think uh uh bara is asking so Mahapatra is asking something so could you please give me more example yes that is great Let's observe it's very simple in NoSQL databases. So the data is stored in JSON format for example. So this is an array of records. So the first record contains what is that one? So the post ID so 01 and also the content of the post. So this content of the post will be image some abc dot jpg and also date. So some date this is the first record but the second record so we cannot expect so same data right. So post ID is so 02 and the content of the post it's not image in this in such cases for example this is a uh video file per suppose abc dot mp4 and here date is not displayed so that means what I'm trying to say here is in the case of nosql databases your that data is not structured. So if you are observing this is the first record. This first record contains process uh post ID, content and date. Whether we can expect same details in the second post as well. No, you can store whatever you want. So that means each record is not following any schema any certain structure that type of data we can call it as unstructured data. So let me give you another example for suppose simple example you can take it text data for example. So you have an employee data it's an array. So it's an employes data. So in unstructured databases so the data can be represented like this. It's an array which contains what is that one? So the first employee employee number one name is subu. Okay. So something like that and we cannot expect so same fields in the second record. So this is employee number two and name is Suresh and this one contains extra field called as location. Okay so some ch and next another record if you're taking so this one contains employee number three and also Employee location is so USA per suppose this one does not contain so that many fields but all are following same structure all the records are having same structure so all the records are not following certain schema in such cases we can go with what is that one soql databases so that's why I given simple example right in Instagram so all the people are posting similar type of data. No. If you are developing an Instagram application, all the people are posting similar type of data. No, not at all. Some people are posting image, some people are posting audio, some people are posting video in such cases whether structured databases if you are storing the data in a structured way that one is suitable. It's not suitable. Then we can go for what type of databases? What type of databases? No SQL databases. Okay. Your data is structured. Your functionality as per your functionality. We are going to store our data in a structured way. Your data is structured. So then simply we can go with what is that one? So structured databases. Your data is not structured. In such cases we can go with NoSQL databases. So these two are commonly used databases nowadays. What are those? One is relational databases and another one is what is that one? Relational databases means alias we can call it as SQL databases. And another type of databases is No SQL databases. So which is nothing but so some of the companies they are offering. So MongoDB so Dynamob so these are all what is that one? So no SQL databases but these databases can be served in a different patterns but suppose I'm not speaking about relational databases SQL whether SQL databases or NoSQL databases. So what are the major things we need to consider? So while working with the databases say according to the databases I'm speaking about whether it is SQL database that means you are storing structured data or unstructured data according to we are having so different architectures. So we are having so what is that one? So different types of so different architectures. So to manage the data what is that one? So different architectures to manage data. What are the different types of architectures we are using in the case of what is that one? So databases. So the first one is centralized databases. So if I'm speaking about what is that one? So centralized databases. So try to understand. So for example, so I'm doing some business. I'm having some company, e-commerce company like Amazon. So what I'm doing is uh my safest location might be I'm choosing so northern Virginia. Uh okay. So my database I'm keeping it in what is that one? So northern Virginia. So this database is located in Northern Virginia. So all my applications for suppose So my applications are storing data right. So this is application one and this is application two. So all the users I am saying so simply all the users can able to access this database. So from different locations if any user is performing any transaction per suppose transaction is nothing but if any user is performing so insert or update or delete all the operations are updated in what is that one? So one centralized database. Okay. So this is our what is that one? So centralized DB. So all the operations whatever the users that are performing operations right insertions or updations or deletions they're going to perform it on what is that one centralized database very simple so I need in cloud might be if I'm using AWS or Azure so we are choosing one location which is near to my main business area per suppose so that means my business is mostly located in USA I can choose northern Virginia. Okay. So that is the best place there I can maintain my database but suppose in a data center. So all the my applications are integrated with the centralized database. If any transaction is performed from any location per suppose from India or USA or so Canada or somewhere all the operations will be performed in what is that one? for centralized database only. So what is the benefit with the centralized databases? The major benefit is data cannot be duplicated. Right? So data cannot be duplicated. So entire data is in a entire data is in a single location. single location. Okay. So what are the problems? Okay. These are all pros for suppose. So we can say pros. Pros means what? So benefits. What are the cons? So every time what we have to do? We have to back up the data. Why? Because if a centralized database is lost per suppose. So what we have to do? If data is lost means we are losing money. Correct? If data is lost something we are losing money. We are missing we are losing credit card information. Per suppose that means data is lost. We are losing our money. So we need to back up the data. That is we need to invest money for backing up the data. And another problem is we need to get fast access to the data. If the data is located in USA somewhere northern Virginia, if you want to get access fast access to the data, it is very difficult because we are accessing from so very that means uh we are accessing from India or somewhere for suppose uh some latency will be there right in accessing the data. So that one also we need to take care. Okay. So remaining security and all it would be common. So across the databases that is not a cons like that. This is about what is that one? So centralized databases. And next another type of databases is distributed databases. What is that? Distributed databases. So try to understand so this distributed database because if you are talking about distributed databases your database servers will be located in so multiple locations per suppose. Okay. So this is USA and this one is Canada and also this one is from India per suppose. So these databases are located in what is that one? These database servers are located in so multiple countries different different countries but all these databases are representing so single business per suppose they are not talking about they are not storing about so different databases they're always stoing about what is that one so single what we can say so single business might be these are all databases belongs to Amazon assume that But still the business is it is happening in USA. So that data will be stored in USA database. The business which is happening in Canada that is stored in what is that one? So Canada database. The business which is happening in India that is stored in India database. But even though so they are all connected through what is that one? So the network that's what I want to tell you. So these databases are located in different different places still they are connected to each other with the help of what is that the network. So with the help of so simple terms we can we can use it as internet. So with the help of internet so these databases are connected each other whenever the user is requesting for data. So automatically it is fetching the data from uh it is fetching from so different location databases in a seamless way. This type of databases we can call it as what is that one? to distributed databases instead of keeping the database in a centralized way because if you are speaking about Amazon it's not a small company right it's a very big company they are processing so millions and trillions uh we cannot say so the data is very huge if the data is very huge it is very difficult to maintain a centralized database in a single location you are maintaining database to serve all the needs. In such cases what we have to do we need to maintain databases. So similar type of databases same Amazon databases we are maintaining in different locations uh to fulfill the needs of a particular location. And finally when coming to the operations when coming to the operations we need to make sure that all these databases has to work in a centralized way to provide the information. So that means all the databases has to work in a centralized way in the sense all the databases has to be connected through internet. So then whenever we are writing some SQL query to fetch the data. So from all the locations it has to fetch the information fetch the data and it is providing a detailed report like that. This type of databases are called as what is that one? So distributed databases and another type of databases I want to talk about what is that one. So graph databases. So generally this graph databases how it works you know graph what is graph graph is a collection of nodes right. So these are all nodes for suppose these nodes are connected with what is that one? So edges. So each node contains some data. This node contains some data and this node contains some data and this node also contains some data. So whenever we are working with graph databases what we can feel is we have multiple servers each node represents one database server and it is looking like a distributed system right but I cannot say like uh this this node is associated with some data data in the sense some small amount of data per suppose this node is associated with some small amount of data and this node is also associated with some some small amount of data and this node is also associated with some small amount of data. But whenever we are querying so based upon this uh node connections like these edges so we can uh collect the data like that but uh we cannot think more about this graph databases. So we are not using so this graph databases in our scenario but uh example is what is that one? So Neo4j so these databases are comes under what is that one? So graph databases. So you can just observe these slides might be you can able to get some idea what is that one? So what is graph databases? So we have so these are all different types of databases I already discussed. No SQL databases example MongoDB. So, Dynamob DB and uh Apache HB okay it's a non-tabler database I already discussed right it's not storing structure structural data so these are all classified into what is that one so several categories like data models keys and values and it is a designed to flexible scaling scaling in the sense you can able to create multiple instances of the servers and all Okay. So I will discuss about that part. What is scaling and all but right now we can try to understand so like what is structural data, what is nonstructural data. If your data contains nonstructural then definitely we can go for NoSQL databases. And another type of databases is what is that one? So graph databases, right? So it it is a database that uses graph structures. So to describe and store the data in a semantic queries with nodes and edges and attributes. So each node represents what is that one each node is capable of storing the data and edges. So the connection between the nodes which is mainly for what is that one? So uh what is that one to tell the relationship between the data. Okay like that. So these are all particularly effective at managing complex interconnected data that are widely used in social networks and also recommendation systems and also so fraud detection and network analysis. So you don't know about these terminologies. Social networks means LinkedIn. Okay. And also Facebook. These are also different types of Facebook applications. These are all and recommendation systems means uh generally recommendation systems can be used in machine learning especially I purchased laptop in big billion days per suppose. So automatically I'm getting the recommendations. uh you can purchase this mouse or we can purchase this keyboard like that. So if you want to develop such type of systems uh this type of databases are getting sortable. Okay. So in the similar way network analysis and all. So centralized databases already discussed right almost that is SQL database or NoSQL database which is located in only one place that is called as what is that one? So centralized database it is located it is stored and located and maintained in a single location just like server one server I cannot say it is a mainframe computer it's just an example okay such as mainframe computer in the sense mainframe computer is located in some physical location right okay so like that uh for example in USA in northern Virginia or somewhere you are just putting some one physical machine that is capable of uh managing the data that is one database server. Nowadays we are not maintaining physical machines also we are observing nowadays almost we are maintaining what is that one virtual servers in AWS we are purchasing virtual servers and we are maintaining our data okay so as will take care about security and all those stuff and it is frequently accessed via internet connection so such as LAN or van and examples are what is that one so MySQL and also SQLite and Microsoft SQL server. So these are also different types of databases and distributed databases. So these are all like especially you can use it for what is that one complex data processing. So for example if you are using Hadoop might be some people know the name of technology called as Hadoop. Hadoop means it's a distributed file system. Actually your data will be processed in a distributed way. Okay. So in such cases some of the data will be located in USA, some of the data will be located in UK and some data will be located in so some other location. Even though we can able to uh perform operations on the data in a distributed manner in such cases we can go for what is that one distributed databases. Okay. So like okay so just a quick check could you please look into this question which system characterized having its data structured especially structured logically interconnected and physically distributed over several sites within a computer network. See they are not using the words within several sites means distributed over several sites means we can simply give centralized but they are clearly mentioning the correct answer is C. Okay, it's a distributed database. What is database? And also you understand so like uh what are the different types of architectures the database is providing right? There are different types of architectures the database is providing. So like uh distributed databases and also like graph databases different types of databases but try to understand so we are purely working with the relational databases what type of databases so relational databases so in relational database management system especially I'm speaking about RDBMS. So RDBMS RDBMS stands for what? So relational database management system. So this relational database management system. So contains several tables and each table is related with another one. For suppose at high level I just want to discuss with you what is a table. Anyone can you please tell me what is a table? What is the purpose of table? To store the data right. So to store the data. For example, so let's say we have an employee table. So this employee table contains so few fields. What are the fields? So we have an employee number and name and also as well as address. Okay. There are some fields according to our business requirements. So these fields will be getting changed to keep on. So we have an employee number and also name and address and date of birth or something but try to understand so with respect to RDBMS relational database management system. So this employee we can call it as an entity. What is that? entity. If you are taking any business problem, so every business problem contains many entities. For example, so entity can be represented in what is that one? So rectangular symbol. So if you are speaking about the entity, entity can be represented like this. So this is an employee. So this employee is having some attributes. These attributes are represented with eclipse symbol. So ellipse. So this one is having employee number and also as well as name and also as well as address and also some other properties like so date of birth like that. So these are all attributes of an employee. Attributes represents the columns like employee number, name and address and date of birth and also might be you can think of so employees having so some other attributes like phone number all those stuff right but try to understand so these attributes are represented as columns in a table if you are assuming employee table it is nothing but an employee entity which is representing an employee in a database Right? Every employee is having employee number, name and address and date of birth. But in these attributes there are different types of attributes. Right? For example, some attributes are mainly used for uniquely identifying an employee. We have these attributes. For example, I'm writing some extra attributes here. So email and also like date of join. So which attribute is mainly for uniquely identifying an employee in this attributes. So there are some attributes which is which are mainly for uniquely identifying the employee date of birth also but uh we cannot say date of birth uniquely identifying a particular employee. So might be two or three employees if you are having in a company there are 60,000 employees in 60,000 employees might be few people are having same data birth but right so we cannot say name also name should be same so full name means we cannot store full name like that right so uniquely identified attributes are what is that one so employee number so every employee is having so their own employee number and email. Email is also mainly used for uniquely identifying that particular employee and also as well as some case might be address because two employees might be not working from same address might be not belongs to the same address but this is not uh to be taken into the consideration. secondary secondary options and date of birth is also secondary. Okay. So most probably you can expect so email and employee number is acting as what is that one? So unique unique keys. What is that one? So they are uniquely uh they are uniquely identified uh they are using uniquely identifying for an employee. So what we can say this keys we can call it as candidate key. So candidate key. So candidate key means what? In a table we are using particular attribute or particular property for uniquely identifying a particular employee. Okay. So this employee number must be unique and also email must be unique. Every employee is having unique email id like that. And we have some other case we have some attributes like uh derived attributes. What is that? So derived attributes. So what are the derived attributes? For example, if I'm speaking about so another attribute I'm adding here experience. So this experience is a derived attribute or not? So this experience is derived from which property? Experience is a property. But especially if you want to find out the experience, how can you calculate the experience? So from data of joint, right? So from date of joint so we can able to calculate the experience. If you don't know date of join, how can we calculate the experience? So the experiences is derived from so date of join this type of attributes we can call it as so derived attributes. So for example experience any other fields if you are observing uh or otherwise age for example if you are adding another property called as age. So age can be derived from what is that? So date of birth. So this type of attributes we can call it as what type of attributes? Derived attributes. Age is depending upon data birth. If you don't know data birth, we cannot find out the age. Right? Is it possible to find out the age based upon the data? Uh without data birth. Okay. So now the question any other attributes could you please tell me according to your view? So for the employee what are the derived attributes I already specified for suppose experience date of join. So can I consider retirement date? So date of retirement. So do date of retirement. So this is a derived attribute or not. So that is completely based upon. So what is that one? So the experience so based upon the experience the date of retirement will be decided. So from date of birth how many years of experience you have. So it should be calculated in such a way. So based upon date of birth only. So date of retirement will be calculated. So anyway that is a derived attribute or not. It's a derived attribute. And also we have so composite attributes. So composite values composite values means some attributes are having so multiple values. If you are taking an employee so I'm just adding another attribute called as what is that one the mobile number. So one employee is having so mobile multiple mobile numbers right one employee is having what is that one? So multiple mobile numbers. So mobile number is a column. So multiple mobile numbers one employee have and also one employee is having multiple addresses. Great. That is also multivalued attribute. Right? Multialued means what? So one attribute is having multiple values. But in these attributes also we have single valued attribute. The attribute is having only one value and sometimes the attribute is having so multiple values as we discussed. So what are the examples for composite attribute which is accepting multiple values? One is so multiple emails might be and multiple addresses and multiple mobile numbers. Okay. So these are all comes under what is that one? So multiple multialued attributes that attribute is accepting multiple value for the particular employee. Okay, great. But here if you are working with the database management system, we should consider to resolve the duplicate values. Multiple emails is possible but that is according to the system right what we are working. Yes. If you are speaking about me, I have multiple emails. I can able to create any number of emails in Google, right? An number of emails in Google. But with respect to the company, I have been associated with only one single email id. Please try to understand. So what I'm saying is one person, one employee is having multiple emails also that should be accepted. Okay. So you understand so what is entity? Entity is nothing but a table. If you are practically speaking, so that is nothing but a table. But with respect to ER diagrams, right? What is that? So ER diagrams. So this one we can call it as what is that one? entities. So table in a practical way but in theoretical way we are representing that one as what is that one? to entity. But my question is how to design your database, right? For example, if you are storing application data in your database, for example, okay, if you are storing application data in your database, for example, any e-commerce application, if you are talking about so Amazon or Flipkart, if you want to design a database for that particular product for suppose for the particular website. So how to design the database is single entity is sufficient. So how to design? My question is how to design a database is it single entity is sufficient to store all the data? No. Right? Because that involves what is that one? multiple tables. It's not a single table. Multiple entities will be involved in that particular scenario. Okay. So let's take a simple scenario. I am a customer. I am purchasing products. All right. So what is the relationship will be involved? For example, let's go through some of the uh basic things with respect to these relationships. So we have so relationships actually what are the different types of relationships. So what are the key attributes actually? So let's come from this one. Yeah. What is entity? Entity is nothing but a real world object, right? Which is really existed. Let's suppose in real life it can be a physical object or abstract concept. For example, so salary account bank. So if you are speaking about so salary account, it is a weak entity. So weak entity is represented by using double rectangle. It cannot exist without being associated with the owner entity. So if you are speaking about weak entity and strong entity let me give one example for suppose you all of you have an idea about what is entity but I want to give some examples related to what is that one a weak entity and a strong entity can you please tell me I'm asking some questions here so let me take some entities university so departments and also professor without existing university there is a department will be existed could you please confirm without existing university is it possible to exist a department your understanding is so important that's what I'm questioning without existing university there is no department but try to understand Without existing department there is a an existence of professor. If department is uh uh destroyed per suppose might be there is an existence right we cannot say the professor will be uh like uh automatically getting uh removed like that professor will be kept might be that professor can be used for other departments. So try to understand. So there are two cases right? One is weak entity and a strong entity. Weak entity means what? Without existing of without existence of one entity there is no existence of another entity. Without existing of bank there is no existence of what is that one? accounts. Correct? So without existing of university there is no existence of departments there is no existence of departments all the departments automatically getting deleted. Correct? In the similar way without existing of without existence of department there is an existence of professor. I'm repeating it again. So what I'm saying is the scenario will be we have three entities per suppose what are the three entities. So university and also department and also a professor. So these are the three entities for suppose. So my question is without existing university is there any possibility of existing department? No. That means if university is getting destroyed, department is also getting destroyed. That means what I'm saying? So this department we can call it as what type of entity? Weak entity, right? Weak entity means what? Without existing of university there is no chance of existing department. But uh think about the professor. If the department is getting destroyed for suppose that means department is not existed but still professor exists. The same professor might be teaching in another department right. So in such cases what is that one? So if department is still not existed so there is an existence of professor like that. Okay. So these are all things just for understanding. So weak entity, strong entity like that. Okay. So but this one these details are not that much useful in a practical point of view. But anyway we have to know about this part. So for example in this slide if you are observing so salary account right and bank. So what is the weak entity without existing bank salary account is getting existed? No without existing bank there is no salary account is getting existed. So salary account we can call it as weak entity. So in the similar way I already discussed with you all of you attributes. What are the attributes? Attributes. So every entity is having some attributes. But there are some attributes are called as key attributes and derived attributes and composite attributes and multivalued attributes. So I already discussed about key attributes. in the employee what are the key attributes employee number which is nothing but a key attribute here there is no email so that's why here I am not specifying what is that one email and all but while explaining what we can say key attribute is mainly for uniquely identifying a particular employee okay so with the help of the key attribute we can easily uniquely identify a particular employee and next type of attribute is composite attributes sorry I specified so composite as multialued so composite means what for example if you are taking one attribute is having several other attributes for example so if you are speaking about address is having country state and zip code. This is nothing but a composite attribute. Composite means what? So one attribute is having so more than one attributes. So if you are speaking about address, address is having so country, state and also zip code. Okay. So this type of attributes we can call it as what is that one? So composite attributes. And next multivalued attributes. So that means that attribute is having so more than one value. So that can be represented in double. So like this for suppose. So the quantity it is accepting what is that one. So more than one value. So quantity might be uh differentiated right oneing one value and another one is accepting another value. Okay. So let's uh clearly explain. So what are the different types of attributes we have? So key attribute and another one is what is that one? So composite attribute and another type is what type of attribute? So multivalued attribute if I'm showing the slides you cannot understand. So that's why I'm just writing. So any other attributes you can able to see here. So derived attributes right. So as discussed another type of attribute is what is that one? So derived attributes. So these attributes are from derived from another attributes. But the so many questions will be arised from this one as per my experience. So with respect to so the employee entity what are the key attributes employee number so just guess it as yourself what is that one email is a key attribute but email is a key attribute yes so that email is used for uniquely identifying a particular employee so key attribute is mainly for uniquely identifying a particular employee. So if you are taking for suppose another example for suppose so let me talk about what is that one. So the customer so customer is an entity. So here what are the unique key attributes in the customer for suppose with respect to customer entity. So key attributes customer id customer name no might be customer name might be multiple names will be there. So mobile number, email. Okay. By using email also we can able to uniquely identify the particular customer. Okay. So composite attributes means for example so the customer for example if you are speaking about the customer so customer contains what are the properties customer ID customer name customer address but this address is not associated with a single property right might be this address is a separate entity This one is having so some composite values. What are the composite values? Address is having. So what is that one? Street name, right? So it is having street name which is having so door number and also location. So these are all comes under what is that one? So the composite attributes like that. So we have a street name and also door number and also location. So for example, if you are observing this attribute. So this uh this address attribute is associated with what is that one? So complex values, right? It's a separate object address object which is having what is that one? So street name, department number and location. But how to represent this composite attributes? I will discuss. Okay. So simply we can say composite attribute means what? So the attribute which is accepting what is that one the multiple values. So this type of attributes we can call it as what is that one not multiple values what we can say which is composite which is associated with some other attributes like street name. So door number and location this type of attributes we can call it as composite attributes. But how can you represent it? So if you are observing so the customer table name is also composite. How we can say name is composite? Yes of course if you are speaking first name and last name it is composite. Great. And bank details whatever it may be like if you are speaking about one attribute it is associated with that one. multiple values not multiple values it's a complex object for suppose let me explain so in detail so just take some simple entity how can you represent in a table for example if you want to represent simple entity employee which is accepting only scalar values so if you are taking employee what are the fields that are available employee number, name and address. So your employee number is the key attribute. So how can you say so this table is having so unique values for suppose. So if you're observing here this table contains employee number so name and also address so this employee number so something should address will be Bangalore for suppose So we are storing single values right? So this is a simple entity we can fill it. This one does not have what is that one? So address is not having multiple attributes. This is what is that one? So simple entity. So simple entity means what? So we can directly store the values. But our business requirements sometimes it is not looks like that right. For example, so the same thing if you are speaking about what is that one? So some complex entities. So same if you are speaking about so employee observe this scenario. This one is also having employee number. So name and also address but address is composite. What I'm saying address is what is that one? So composite. In such cases what we have to do? So we need to create two different tables. So one is employee table. So which is having so employee number so name and address. No not address. So this one is called as what is that one? So address ID and we have to create what is that one? So separate address table. So this address table contains what is that one? So, so ID, every address is having some ID and also street name and also what we can say door number something like that for example. So we have so street name so some Gandhi street and location is so Bangalore. So this employee belongs to so the particular street. So employee name is Sur is address ID is what is that one? So one. So we are mapping it like this. In the similar way if employee number two so his name is Ram. He also belongs to same employee uh same address ID. What does it mean? is also belongs to same address. Right? That means multiple objects are address associated with this address. Correct? Address is not accepting scalar value. So this is associated with what is that one? So one composite entity. So composite means what? So that one is associated with multiple multiple other attributes like that. One example you can take it same. What is that one? So customer or otherwise so product. So can you please tell me product ID is a composite? No because this is a key attribute and product name is composite. So model number these are all associated with what is that one? Multiple attributes. So product name is not accepting. So what is that one? Singular value. It is associated with one object. That type of attributes we can call it as what type of attributes? Composite attributes. So now tell me if price it's composite or not composite. Not composite. Right? Because the price is just representing in dollars or rupees or some other currency per suppose. It's a single value for suppose if you are specifying $400. It's a single value, right? So it's not composite. If you want to make this one as composite, what we can specify? It's there is no possibility, right? So directly we can store the value in the table as a singular value. So for example, so $500 or something. So like that this type of attributes. So we can call it as what is that one? So uh scalar attributes. Scalar means what? That attributes can accept only single values. Single values means it is not associated with any object. But if you are speaking about so the product name here in this case this one is composite. This is what is that one? So composite because every uh so for suppose if you are taking a laptop that laptop is manufactured by particular company. So that company is having so the company ID so company name. So there are some fields associated with that attribute. Right. So this company is referring to the particular object. So the company object like that is it clear? So we have a concept what is that one? So normalization. So so let's try to understand. So what is normalization? So normalization means so decomposing a big table. So decomposing a big table into smaller tables to reduce data redundancy. So to reduce data redundancy and some anomalies. So why we have to decompose the big table into smaller tables? Let's observe the scenario you can able to understand. So let's assume that we have an employee table. So we have an employee data and also location data. So employee and also department data. So that employee belongs to department right and also location data. But assume that all the data is represented in a single table. So we have a so multiple fields right what are the fields we have so employee number and name address and also when coming to the department table so we have so department name and location so these are all fields belongs to employee entity only we are representing entire data in a single entity which is nothing but so employee is it a best practice that is the question right so we have employee number name and address this employee number name and address especially belongs to employee and department name belongs to so department entity and location belongs to so location entity for example it is not a best practice to keep all these properties in here what is that one so single table so for example what happens for example if I'm specifying so one employee number one and name is today's so address is Chennai Okay. Or otherwise we can specify so internationally. So department name is what is that one? Analytics and location is so USA. So might be the same employee another employee. So Ram he's also belongs to USA. So he's also belongs to same analytics department and his location is USA. So if you're observing the data is getting duplicated right same department name is repeated again and again and same location also repeated again and again. and address also if you're observing address also repeated again and again. So in such cases what we have to do if data is getting duplicated we have to divide this table into what is that one source. So by using normalization so normalization is a process of decomposing a big table into what is that one so smaller tables to reduce data redundancy. What is data redundancy here this is redundant data right? So data which is repeating keep on repeating that one is called as redundant data. So to reduce this redundant data what we have to do we need to split this table into one multiple tables you can observe here so in this case what I'm doing here is I'm just creating so employee table separately so which is having so employee number. So name and also address and also we have so department table. So this department table is responsible for managing department details. So which contains department number and also another column is what is that one? So department name. So we have departments 10. So what is that one analytics? So who are all the employees working in that particular department? So employee number is one and name is Suresh and address is USA and his department number is what is the department number here we can keep it what is that one foreign key so foreign key means what so it's a reference key which is referring to what is that one department number 10 like this okay we'll see all these things practically but uh let's try to understand so another department So two so ROM and also ESA and department number is 10. So if you're observing so this department ID is acting as what is that one? So reference is acting as a reference that refers to what is that one? So this department because the department is a composite attribute actually composite composite means what? So employee entity contains department entity uh department attribute but that attribute is composite. So that one is associated with another object. So while creating the tables for department we have to create a separate table and for employee we have to create a separate table but we need to link these two tables with the help of this reference. Okay. So this is called as what is that one? So relationship between the tables here this type of relationship is what is that one so many to one like that okay we'll discuss about that relationships so practically how what is foreign key and all those things so linking with what is that one is a common column so let's introduce what is database first suppose practically before that one all of you please open you have to select Mac here right al so Linux Mac OS is available. So you have to select an option for Mac. But here we are using in Windows. So if you are going down you can see go to download page. Click on that go to download page. So in the go to download page we can see some options. What are the options? So one is 2.1 MB and another one is 558 MB. Which one we have to select? So we can select 558 MB. Got it? You just download this 558 MB. Just click on so 558 MB. Okay. We are getting the screen like this. After going to the download page, I'm going back. I'm just explaining. So we are getting the select version. So Microsoft Windows and then next what we have to do. So you can go to the download page. So if you're going to download so automatically it is uh just suggesting this 558 MB. Okay like that. So you can just download this one. Just click on so download. Here don't log or sign up. Here we can below we can find an option no thanks just start my download right just click on this link I don't want to login or sign up just start my download so then automatically download is getting started automatically once this uh is getting downloaded we have to install that particular software actually okay so just wait I will tell you the steps how to install the particular software in your machine. Nothing you just double click on that one. But please follow me. Okay. While doing that steps see this one is getting downloaded. So go to the downloads. You just double click on that one. But what happens means in my machine MySQL is already installed actually. Okay. So let's see if I'm starting. So this MySQL installer what it is suggesting? So it is automatically so launching some wizard it is displaying. So please wait. Windows configures MySQL installer like that. Which option we have to choose a server only or client only or full? Okay. All of you select full version. What is full? full in the sense we'll get all the tools which are required for MySQL. So click next. See these are all full means we are getting all these tools. What are the tools? MySQL server. Just read it. MySQL server, MySQL workbench, MySQL router and MySQL documentation and samples and examples. So click execute. So if you're executing, if you're observing, it is installing one by one. Right? See, look at that one. So if you're observing that wizard it is installing step by step right first it is installing MySQL server it is completed status and MySQL workbench it is installing so now it is 43% like that it will you just wait until all the tools are getting completed the installation so until so just wait until getting completing all these things if you are connected to the uh it will take some time actually because if you're observing bias workbench 75% only completed once it is completing 100% then only it will come to the completing status like that all of you follow the same process click next all of you please follow the same steps so click next next so provide the password as root. Here also retype the password as root. So click next, next, execute. Now click finish. Again click next. Finish. So like that click next and provide the password. Click check. Click on check and click next. and execute and click on finish. So for one last configuration is pending click next finish that's all what we done here is try to understand all of you I'm just explaining overall so if you are speaking about so MySQL server it's a database so it is so that means one software we installed in this machine so this one we can call it as what is that one so server so server means what it is providing So database services what type of server it is. So database server especially this one is MySQL server that means what software I install in this machine MySQL server software. So MySQL some 8.042. So this is the software I installed. So this is called as database management system. Okay. So if you are speaking about DBMS, it is a software package which we need to install to work with that particular system. So generally in real time this MySQL server will be installed in the remote location. For suppose uh if I'm working for Amazon might be Amazon main branch is located in San Francisco. So in San Francisco they are maintaining the Amazon database. Okay. So we need to install the software on the server. We done that step. But my question is how to connect to the server? To connect this to the server? So we need MySQL admin. What is this MySQL admin? So what is MySQL admin? This is called as client tool. So this is called as what is the term? So client tool. So this client tool is mainly for communicating with the server and getting the response. Okay. Server is running. The server is capable of managing tables and managing security and all other stuff, right? But what we have to do if you are sending data from client for example if you are writing some SQL query so where you are writing SQL query here we are writing so in in MySQL admin we are writing some SQL query say select star from so employee like this this SQL query will be sent to the server and it will execute that query and it will process the data and the data will be sent back to the client. Right? So this query will be sent to the server and the server will execute that query and the data will be sent back to the client. Data will be sent back as a response to the client. The table will be displayed. So but what happens means if you are installing MySQL full version. Okay. So if you're installing so MySQL full version per suppose MySQL full so we can able to get so MySQL server and also we can able to get so MySQL client as well MySQL client as well. So client means what we are getting. So MySQL admin so MySQL admin software also we can able to get it. So these two softwares which are required so to execute our queries. So as of right now so there are some other softwares are also getting installed. we are installing whenever we are installing MySQL that is MySQL router. What is that one? So MySQL router this one is not required for us. This one is required for application developers especially if you are working on Java your Java application wants to connect with MySQL database. So like that in such cases so this MySQL router and all other are required but right now I just need MySQL server and also another one is what is that one? So MySQL admin. Okay you installed MySQL server in this machine and also MySQL admin in this machine. How can you check it? So how can you check? So the MySQL server is successfully installed in your machine and MySQL admin is successfully installed in your machine. If you are installing MySQL server, okay, if you are installing MySQL server in machine, it is running as a service. Okay. What is the port number it is running? So 2306. Okay. Once you install MySQL server in this machine, server means what? It is a MySQL engine which is capable of processing your SQL queries. Whatever the SQL query we are sending from client side, right? We are writing some SQL query in MySQL admin client and that SQL query will be sent to the server. who is capable of processing that query and getting the results. So the server is responsible for that job right. So the server always listens to the request which is coming from MySQL admin. So how can you check whether the server is running or not? We can check the services in your Windows. You have to check services whether the MySQL server is running or not. So I'm just showing. So please observe here I'm just going to this Windows machine. So search and I'm typing services. So if I'm going for services, so in this services I can able to see. So these are all different types of services running in your machine. And my service name is MySQL, right? You just type it. So M I cannot see any MySQL service. Okay, just type it. So M. Okay, do one thing. So I'm just searching for so MySQL admin. That means MySQL workbench. So this is called as client tool actually client tool means what? So this one only we are using to communicate with the server. So we are getting this welcome to MySQL workbench. And if you are just double clicking on MySQL at service. So might be it is asking some password. It is not asking for me password. But here look at this. It is showing. So no connection is established. So what it is showing? So server status it is getting stopped like that. So we need to start the server. So the server is getting stopped. So we can just go to the services. So that MySQL service is up and running always. But you can check it what where exactly. So this MySQL is present. So if you going down if you're typing M it has to come. But uh you cannot see. So here what is that one it is showing it is status is not running. So you just right click. So for me it is not running right. So what I am doing here just right click I am clicking start. So if I'm just right clicking and I'm clicking start then automatically the server status is uh running. So you can able to see. So look at this MySQL 80. What is the status if it is stopped means you have to start it. So could you please tell me how to stop this service? Just right click and what we have to do just right click and click on stop. So we need to understand. So what is SQL? Actually SQL stands for what? Structured query language. So this is the fifth generation language. Uh the reason is if you are using SQL so with the single line of query we can able to perform so complex operations as well. So what are the benefits of SQL? So if you are speaking about the benefits of SQL with minimal code so we are not supposed to write some complex codes with minimal code we can able to perform operations on database. So what is server? Anyone could you please tell me what is server? Server means server provides services to the clients. Right. Server provides services. But uh this MySQL is what type of server? This one is database server. Correct? This one is DB server. DB server means what type of services this database server will provide? This one is providing. So database services. Database services means it is providing so tables, views. Okay. So different types of objects. So first if you want to work with database services. So for example if you want to store the data, retrieve the data or insert data or delete data. The first step is what we have to do. We need to install database server software in the server machine as discussed. So even for the training what we are doing we are installing so the MySQL server in this machine right inside this machine we are installing so MySQL server. So if you are installing MySQL server that one is shipped with some predefined programs. Okay these are all programs. So that are coming along with the so the MySQL server software and the server is running on what is that one? So my laptop itself okay I installed MySQL server in my machine. So the IP address for this server is 127.0.0.1. What is the purpose of IP address? Uh network means what? It is a multiple computers are connected right? So in such cases, so what is the purpose of IP address? It is mainly for what is that one? So locating uh a particular machine. Every machine is having their own IP address in the similar way. So every server server is also one machine, right? Server is also one machine. But if you are installing local in your laptop, the IP address for local host is what is that one the IP address for local host is 127.0.0.1. But this is a training machine. So in training what we are doing we are installing server locally in our laptop itself. So if you are installing MySQL locally in your laptop that one we can call it as what is that one? So local host are the IP address for that particular server is 127.0.0.1. Okay. The server is installed. How can you check the server service is running or not? We need to we can able to start the server and we can able to stop this service. Right? That is in our hand. If you want to start the server, we can able to start so MySQL service. So in our machine, so MySQL service name is MySQL 80. If you are starting the service, then automatically server is up and running. If you are stopping the service, so server is not available like that, right? Can get the data from IP address without duplicate data. See generally if you are speaking so IP address is mainly for identifying you in the network for example you are using one mobile like many people are using mobiles right so there are some certain people might be using some network like in ATL network your mobile is identified with or otherwise uh you're using so internet connection for suppose at internet connection So your connection is identified with some IP address. So the people can easily identify you with the help of that ID uh IP address like that. The IP address cannot be duplicated. Data it is not related to data. I am saying IP address is just for identifying your machine in a network. Okay. We all connected with the internet right? So but how can you how can I identify you? So how many packets are transferred from you like that with the help of IP address I can able to identify what you are sending and what you are receiving everything in the network. So here also if you are installing so one MySQL software in your machine that one we can call it as ser server so this is a server software that's what I'm saying so especially if you're talking about so MySQL here so database so MySQL database is a server software so we installed already where this service is running if I'm installing in my machine so the service is running in my machine itself right is it correct so I installed in my machine so the service is running in my machine only how can I check it you can check it go to search box and type services in the services it is listing all the services which are running in my machine. So at the time of installation, my service is taking a name called as MySQL 80. So search for what is the service MySQL 80. So is there any service? Just scroll down bit and verify. Is there any service MySQL 80 service is running? I'm just scrolling down. So please have a look into this uh services list. I cannot identify. So I cannot identify. Let's see. Yeah, great. He identified. See, look at the service MySQL 80 service. This one is running. But in real time it is not running in your machine. That's what I'm trying to say. Okay. For example, if you are working in a company. So this server is not located in your machine in your laptop. The server is located somewhere. We are remotely connecting to the server. But for training purpose, we installed the server in your machine itself. And also we identified what is the service name it is running. What is the service name? MySQL 80. And what is the status of this service? It is running. Let me stop this service. How can I stop this service? Just right click on the service. Click on stop. So if I'm clicking stop, automatically the server will be stopped. MySQL 80 service is now it is not running it is getting stopped. So no longer we are connect we cannot communicate with the MySQL service. If any service is running in Windows if you are installing any server software or if you're observing so Microsoft passport service there are different services are available. My question is these services are running on which IP address which machine it is running in my machine. Why it is running in my machine I installed in my machine itself. But please think yourself if you are working in a company like any company any small company or big company or very big company these servers are not in your hand. Correct. These servers are not in your hand. So the company will maintain one separate server for you. That means all the data is going to so the company server it is not located in your locally. But for training purpose what we did here is so we install locally MySQL server in my machine itself. Okay, that's what I'm trying to shall tell you. So, and also I'm running this service. I'm just starting. So, the service if I'm starting this service now look at this. So, the server is up and running. Let's open the service. So, if I'm double clicking on that service, I can able to see. Okay. So, it's a manual startup type. You can stop or start. All these things are possible. And also it is provided with some password. During the installation we provided some password, right? Root. Okay, that is great. But one important thing we have to understand here. Now try to understand what I'm saying here is this is a MySQL DB server which is installed in my machine. If it is installed in my machine that one I can call it as what is that one? local host. Local host means the software is not located in remote server. For example, assume that if you are working in a company simply learn for suppose we are all employees of simply learn. So simply learn is having some database server. So the database server IP address will be something like this 192.168.10.1. What is this 1 192.16810.1? This one is the IP address which is allocated for the server in the simply learn network. But in this case, so we install locally in our machine itself. So that's why uh always the IP address for the local host. Local host means in my machine itself I installed MySQL server. So the IP address for this local host is 127.0.0.1 which we can call it as local host. Okay, great. So what I observed here is so my service is running successfully, right? So how can I check my MySQL service is running successfully? go to the services and let's look into what is that one so the MySQL 80 service so which is available here where I can see I it is not getting sorting down so the MySQL 80 service okay anyway so I previously shown so this is the service actually so it is up and running. But please remember during the installation if you are running any service for suppose okay if you are running any MySQL service or any service that is allocated with some port number. So what is this port number in any service? For example, if you are using Postgress server or any database server, by default the database server is allocated with some port number. So the MySQL server so the port number is so by default it is running in so some port number. So let me check it in Google. It's 3706 something. During the installation also it will ask you port number. So 3706 mostly by default it will pick up. So 3706 sorry this is 306 this is the port number. So what is the port number? So for MySQL so if you are installing in your local machine so 306. So if you want to send request to any service please make sure that IP address is required and also this port number is also required because so from the client if you want to connect to the server. So for example if you are working in a company the server is not in your hand okay the server is running remotely might be the server service is running in northern Virginia or somewhere what client will provide. So that means uh uh the company which we are working for that one we can call it as client right. For example, what we can say if I are working for Amazon, Amazon will provide this IP address and this port number and they are providing some client software, right? So this one is called as client tool. So especially in MySQL, so this one is MySQL admin. So this MySQL admin is called as client tool. By using this client tool, we can establish a communication between the client and server. Okay, we can establish a communication between so the client and server. What is the tool? The tool name is MySQL admin. Might be you're asking me question. Hey Subu could you please tell me this MySQL admin only the tool I can use it or any other tool I can use it? Yes of course there are so many tools are present in the market. So from company to company they are using different set of tools right. So some people will use only MySQL admin some people will use some other tool any tool that does not matter only the thing is we need IP address of the server so the IP address of the server is what is that one so 127.0.0.1 0.1 especially in the current scenario and also another one is what is that one on which port so MySQL service is running so what is the port number so 306 it just provide so this IP address and this port number and also the password for that uh at the time of installation of the server okay So the database administrator will provide some password for you username and password then seamlessly we can able to connect to this database. So this one is we can call it as what is that one client tool. What is client in the sense this is also one software which we are using to connect to the server. Which server? MySQL server like that. So client in the sense in the meaning it is not only MySQL admin I am saying for example I'm developing Java application. Okay I'm developing some Java application or Python application. So these are all clients only. So these clients can communicate with the server with the help of this IP address and also this port number. Why? Because Java applications are or Python applications or PHP applications all are performing database operations, right? You are submitting a form. What happens? The data will be inserted in the database and we can able to delete the data and we can able to insert update all those things are possible. But as a part of this data analyst course, we are not going to worry about developing applications. Okay. So we are not worry going to worry about developing applications. That's not required for us. Only we need to master how to perform operations on the database. Right? You must have a proficiency in uh writing SQL queries to perform operations. So where we can write it? So where we can write it? So we need some client tool. Okay, we need one client tool to communicate with the server because if I want to send some SQL query, so we need some client tool. So thanks to this MySQL this MySQL itself it is providing so one tool called as so MySQL admin okay so this tool is providing some graphical user interface okay this tool is providing so GUI GUI stands for what graphical user interface to connect to the MySQL server And uh if you want to execute any SQL query, we can easily execute the SQL query on the databases. So now this is the right time to look into what is that one. So the MySQL admin correct graphical user interface means what? So it is providing some user interface for you. We can it is facilitating we can able to write SQL query and we can send it to the server, right? we can able to send it to the server to execute it like that. It is providing a facility for you uh we can able to write the SQL queries and send it to the database to execute the query like that. Okay. So what if you are getting if you are installing MySQL server what we are getting it? So that is the good question right? If you are installing so MySQL full version so MySQL 8 full version so what we installed in the previous session we'll get this MySQL server and also we'll get so this MySQL admin both both we can get it this one is called a server which is running as a service in my machine and this MySQL admin we can call it as what is that the client tool okay so let's open the client tool to connect to this server so MySQL admin in the sense workbench only uh and just speaking terminology uh it is workbench only otherwise I can call it as admin admin in the sense MySQL admin is a tool. Okay. So it's like a workbench. Workbench is nothing but which is mainly for communicating with the MySQL server. So if you want to connect to the MySQL server, what are the steps we have to follow? First make sure that your service is up and running. Correct. That is the first step you have to check. You have to verify in your machine whether the MySQL service is running or not. If the service is running then only we can able to connect. Otherwise is it possible to connect to the MySQL server? Not at all. You can identify where is this MySQL. So I'm just checking. Yeah. So what is the status of my service? So for this if you are installing MySQL so go to the search box Windows search box and just type it. So MySQL workbench. So this one we can call it as MySQL admin or something like that as per our terminology. Just open this client tool. So once you are opening this client tool we will get a window like this. So here you can specify. So local instance MySQL 80 you want to connect to the server just double click on that one. So it is getting connected automatically. Okay. So if I'm selecting show databases or otherwise just we are just getting a window like this. We are successfully connected to that server. How can you say we are successfully connected to that server? So we are getting so some schemas here. So schemas means what? Databases. Go to the SQL and we can just execute this query. What is the query? Show databases if I'm executing this query. So look at this. This query is successfully executed. Okay, let me run it again. So for your understanding so I need some SQL editor to execute the SQL query actually. So here if you're observing here uh this tab right so we can create a new SQL file. So here we can just write the query and execute the queries and below you can see action output that means if you are executing any query that action what is the action for that query will be displayed in the bottom. So what I'm doing here is I'm just writing so show show databases. Okay. If I'm executing show databases then what is the action? Could you please guess it? If this query is correct then automatically it is successful. Right? So look at this action is green. If you're observing, if you're getting so this green color, that means this query is syntax is correct, this query is not giving any error. And also what is the result? If you are observing the result here, the result is displaying here. These are all databases. If you are observing result grid information schema and MySQL and performance schema and secilq basics these are all databases these are all databases which are already present in my SQL ser MySQL server these are all databases which are already present because if you are installing MySQL server itself By defaultly some of the databases especially information schema and performance schema and shaky law these are all databases by defaultly shipped with the MySQL server that is not created by me. These databases are not created by me. information schema and uh MySQL these are all system databases system databases in the sense these databases are coming along with the system only I created these database what is that one SQL basics okay so that's why don't delete these databases these databases are provided to support your SQL queries okay if you are deleting these databases is your SQL queries cannot execute. Okay. So we don't want to worry about all those stuff right now. Just I'm saying if I'm executing query where I can check the output. I can check the output in the result tab. Right? In the result grid I can able to check the output. And how can you verify whether your query is successfully executed or not? where we can verify in the action output. If it is coming green color that means your query syntax and everything is perfect. If it is not coming green color, red color. For example, let's say if I'm writing so show database here itself it is complaining right here itself it is complaining. So show database in the sense there is some syntax error here. Okay, even though I'm just writing the query and I'm executing. See what is the color it is coming. Okay, so let's jump into the details. So now we successfully connected to the server. That is great. So our things are becoming simple now. Once we connected to the server. So in database what is the exact definition of database? In the starting session I discussed it right? What is the purpose of database? Database is mainly for storing and retrieving the data and all those stuff. Right? But the practical definition of database is it is a collection of database objects. So database contains several objects. So to perform the operations, so some of the objects will be tables, views, synonyms, so indexes, so clusters, so stored procedures. What is that? Stored procedures. and functions. So like that so there are so many objects are there as an SM I'm writing continuously but mostly if you want to store the data or retrieve the data so most probably we are using what is that one so the tables okay so if you are working with the MySQL or if you are working with Oracle or if you are working with some other database the main object which you are working with is what is the difference? So the table right what is table? So generally in real life it's a collection of is a collection of what is that one? So rows and columns. So almost we are storing the data in the form of tables especially if you are working with RDBMS. So relational database management system but my question is in MySQL or any database what are the database servers nowadays available in the market MySQL SQL server all these companies are providing so the databases right so if you are taking any relational database we have tables But all these tables belongs to what is that one? So one database right all these tables are present in one database in MySQL. So first step is how to create the database you have to know and this one is especially this course is designed in such a way you can get the assistance from what is that one. So geni tools. Okay. First I will drive first I will teach you how to create database and all and after that I will uh uh show you how charge GP is generating how to create database. So without database is it possible to create table? Without database is it possible to create a table? No. First step we have to create a database. Then what is the query? So the query for creating a database is so create database. So database name for example let's say employee DV okay so like that. So let's create this database then. So first if I'm executing show databases, is there any employee DB database is present here? No. Right. So please make sure that the database is not present. So the next press enter. And one more important point I want to tell you if you are new how to execute this query. So just select this query. So we have buttons right? Execute the selected portion of the script. And another one is you just place a cursor on the particular line. You just put a cursor on the particular line and you can just click on execute the statement under the keyboard cursor. Okay. So second button. So always best practice is you just select the query whatever the query you want to execute and just run it. That's all. Okay. So now I want to create a database. So generally if you are working with any programming language that might be SQL or Java or any language we can write comments. Write comments. What is the purpose of commenting? So comments are mainly for what is that one? So uh if uh any functional people are looking into your code per suppose functional people means they don't know what is the code we are written right they will just understand by you reading the English statements. Okay. In a company there are some people are working functional side. Some people are working as developers. So the functional teams wants to understand the SQL query. So what we have to do? So just we are writing so some comment for writing the query. So what is the command? So create database employee DB. So this is just a comment. It is just for readability purpose. Right? It is just for what is that one? So readability purpose. So now I am writing the actual query. So what is the query is to create. So database. So the database name is what is that one? So employee DB. So this query is not giving any error syntactical error. So just select this query and execute it. How to execute it? So just select that query and execute it. Run it. So look at this. This query is successfully executed. So create database employee DB. So one row affected. So that means how can I check whether the database is created or not. So here look at this in the left side panel in the schemas I cannot see employee DB. Just refresh it. Here we have refresh icon, right? So just refresh it. Look at this. I can see one employee database is getting created or not. Yes, one employee DB is successfully created. But I want to fetch the databases which are already present from the SQL query itself. I want to write an SQL query to fetch all the databases currently available in this server. What is the command? So I just select this show databases. So thanks to this SQL editor, we can write query once and we can able to execute many number of times. Okay, I already written previously just I'm executing that query. Now look at this. So it is listing my employee database or not? Yes, of course it is listing my employee database. Don't write query uh many times repeatedly. Okay. So in workbench you just create the query once and uh if you want to execute multiple times so no worries you just select that query and execute that query. That's enough. It is just displaying what is happens to the employee DB like that. If you want to tell for suppose you want to write another query here. So you can write it here. So create database. So customer DB. Okay. So what does it mean? If you are putting if you are writing multiple queries in the same line the semicolon tells this this is the end of the statement. But if you are not putting semicolon then what happens? It is giving error right? error. So semicolon is a termination statement. That means this query is ended here and after that this is the another query like that the SQL will treat it as instead of semicolon if you are asking if you are putting any any other character ultimately it is giving an error because other characters are not treating as termination statements. Got it? But it is always best practice don't write the queries in the same line. always push the queries in the second line. H so I've written the query. How can I execute? Select that query and just run it. Right? Execute this query. So that customer DB is created. How can you verify it? So in the bottom in the action output you can just drag up. You can able to see. So create DB customer DB this is green color and also it is stating like one row affected and also it is successfully created but how can you verify it in the right side in the left side panel if you are refreshing this cameas of course you can able to see this customer DB or otherwise if you want to manually execute this query show databases Okay. So then automatically it is listing your databases, right? Whatever the databases that are already present. It is automatically displaying all those databases. What is the database here? Customer DB which we created earlier like that. Now tell me we have two databases available guys here. Employee DB and customer DB. Which database I can use it for creating employee table? I will use employee DB right. So we can use the command. So use what is the database name employee DB. So what is the purpose of this use command? What is the purpose of this use command is we have multiple databases are already present in the server but you want to select only one database. inside the database I want to create tables. So for this we are using this command use employee DB. So whenever I'm executing this command so automatically employee DB is getting activated here. Look at this in the left side panel. We can see this one is in bold. Bold means what? What is the currently selected database? What is the currently selected database? employee DB in the similar way for example again I'm writing use customer DB so for example we have multiple databases employee DB is there customer DB is there and also as well as invoice DB is there multiple databases we have but especially in which database you are going to create your tables and all correct How can you switch from one database to another database? If you want to switch to customer DB currently, what is the database you are working for? So just execute this command. Use customer DB. Now look at this employee DB is deactivated and we switched from employee DB to which database. So what is the my current working database? What is my current working database now? But my interest is I want to create an employee table. So where I can create it in employee DB use employee database. Okay. All right. So I switched successfully to the employee database. So now next next step. So we are currently in employee DB. I want to create a table in employee DB. So if you want to create an employee database but employee table what is the syntax? So we have to follow. Just observe this. I want to simplify this one. If you are creating a table say especially employee table. So first we have to identify the attributes for the employee table right. Employee number and name, email whatever it may be, contact number. So there are many things. Okay. So if you are creating a table so first we have to understand so what are the attributes for suppose so as discussed this employee table I want to ask you few questions here for your understanding so this one contains employee number name address and uh email and date of All these stuff in these attributes. What are the attributes can be used for uniquely identifying a record, uniquely identifying an employee? The candidate keys. So this one we can call it as what is that one? So candidate keys. Candidate keys means these keys, these attributes can be used uniquely mainly for identifying a particular employee. I can identify. So based upon employee number and also as well as I can identify based upon email correct one email will be allocated to one person only the same email ID cannot be assigned to another person is there any other one might be if I'm adding contact number or we can say so mobile number so mobile number can be used for uniquely identifying that person say yes or no. Yes, one mobile number will be allocated for only one employee. These are all we can call it as what is that? So candidate keys but from these candidate keys of course these are all unique unique in the sense. So these these values are cannot be duplicated. Employee number cannot be duplicated. Email cannot be duplicated. Mobile number also cannot be duplicated. Say yes or no. So in this also let's think yourself. I need to identify. So the primary identification key this one we can call it as primary key. Of course that is your wish. So in this I am identifying always the primary key as ids right? Almost these are all suitable. These are all candidate keys are suitable for identifying an employee because these are all unique values. But among those we need to select only the particular one as primary one. Almost in every table uh ids will be should uh customer ID or employee number the all things will be treating as what is that one. So the primary keys right. So primary key is also a candidate key. There are multiple keys are there. Multiple candidate keys are those there. Among those we are choosing only one key as what is that one? So primary key. So we can choose it as email as a primary key. We can choose it as mobile number also primary key. But according to your database design almost we are choosing ids. the ID number which we are allocating for the table that one we are choosing as primary key correct and another key is alternate keys. Alternate keys. What are the alternate keys here? If you are choosing employee number as primary key alternate keys is what are the other keys? Email and what is that one? mobile number. Of course, email and mobile number also can be used uniquely for identifying an employee but that one those are all not primary. The remaining except primary key remaining all we can use it as alternate keys. So we have to identify what is the primary key. There are so many keys are there so many candidate keys we have among all those which one is treating as primary key. Great. Now let's jump back to this discussion. So I want to create an employee table. So I'm just writing command. So create table. So employee having attributes, right? Having attributes. What are the attributes? Employee number. So comma name and address H what are the other columns H email okay initial adding these attributes. So this is the actual query. So create table the table name is employee and E number. Can you please tell me the C number is a primary key and also what is the data type of the C number? So we have to understand so data types. So if you are specifying so anything so every attribute is having some data type right most commonly used data types in MySQL. For example if it is a for suppose employee number what is the data type you are using is int. If it is a name we are using care and we are specifying the size where care of size. So for example so where care of 100 like this either we can use care or care. So car of some 20 like that I will tell you what is the difference. The major difference between the var and car is for example if I'm assigning so the name whose data type is var of 100 but if I'm storing name as subu how many charactersu is having anyone could please count it five right five but how much size I provided 100 that means this name column should allow up to maximum of how many characters how many characters 100 characters but if I'm writing so select I'm writing a query so select length of name so from employee how many characters what is the number I can get it five not 100 I'm getting five because for subu the name subu it is giving just five characters but what happens if I'm giving same name data type as car of 100 so this car of 100 is mainly for representing fixed length string what is that length string fixed length strings so fixed length string means what it will accept to only fixed length so for example if I'm saying if I'm storing subu here even if I'm writing a query. So select. So length of name from emps means it will give 100. It is not giving five characters. But actual name length is how many characters? We have five characters. What happens? Oh, I will repeat it. No worries. Just wait. What else means even if you are giving so car of 100 this is the actual name right? So subu it will add some spaces so 95 spaces how many spaces 95 spaces to this actual name. Why? Because this one allows only fixed length. Fixed length means what? So the actual length of that name is 100. You must provide 100 characters. Even if you are providing five characters, what happens? Remaining all the characters will be appended as spaces. That is the problem with what is that one? So fixed length strings. So generally in any databases we have so two types of strings, right? So one is variable length strings. What is that one? So variable length which we can call it as V cap. And another type of strings is what is that one? So fixed length strings. So this is care. If you are specifying so of 100 and care of 100 what is the differences? If you are specifying car of 100. So here we are just specifying. So the maximum length as 100. Okay. So the maximum length is what is that one? 100 characters. So we can put it any name no issue in that particular column. For suppose if I'm putting the name as subu actually the name the length of that one is five characters. Yes it will take it as five characters only but the maximum length it cannot be exceeded more than 100 characters. But the same scenario in the case of care of 100. So what happens? This one is not variable length. What is that one? So fixed length. Fixed length means generally this one is used uh for such type of columns like married or unmarried. Right? So married or unmarried or marshall status we can say. So the column is what is that one? So marshall status. So for marshall status it will allow only one character. So just I'm putting one car of one it will accept only these two characters right yes or no. So y is treating as one character and n is treating as another character. For example, another scenario if you are putting so so same name ascara 100 then what happens if you are giving any name for suppose for example if I'm storing so the name sur how many characters the sur is having six characters right but how many how much size it will take 100 what happens so the magic behind the scenes is it is taking sur and it is appending 94 spaces in the ending. Even if you are giving sur it is adding so 94 spaces to that one. So total length of the string it will become 100 characters. It is always expecting fixed length strings like that. Next another data type we have what is the date. What is the default format supported by the date in MySQL? The default format supported by the date is year, month, day and especially in the case of uh this date formats uh hyphen we have to put it right y by y by y - mm dd this is the format. Okay, we have to put in between that one. So from database to database what I'm saying is this date format will be different. If you're going with Oracle so might be the date format will be different. If you are working with MySQL this is the date format. Even if you are working with Postgress SQL this date format will be same. So we have to verify we have to identify what is the default date format. Right? What is the default date format supported by the particular data? The columns employee number and whose type is what is the type in type and this one is a primary key say yes or no? Yes, this one is mainly for uniquely identifying the employee. So we can specify what is that one? So primary key and also name what is this type? So w care of 100 and also address and also here also we are keeping. So ware of some 200 and also email. So here also I'm just specifying what is the data type. So let me create this table. So practically you can able to understand can you please tell me currently which database we are using we need to get clarity right where we are creating table plainly we cannot create table somewhere so let's execute this query create table employee employee number who type is integer and I'm just putting what is the one so primary key and name worker of 100 so worker of 200 another one is what is the one email right worker of uh some 300 uh not required this much you can give worker of 30 that's all because mostly emails are having so 50 characters maximum h so this is the syntax how can I execute this query how can I execute select and execute It is successful. So table is created successfully. But where this table is getting created in which database? So table is created. But how how can you check? So I'm just using so how to describe a table. So how to describe a table? So d or describe we can use both. D. What is the table name? employee if I'm specifying describe employee so it is describing the employee table with all the columns right what are the columns we have employee number name address and also email and uh it is showing what is that one so key also primary key so for employee number we assigned primary key all those details we can able to see We understand. So what is primary key? So employee number and also email and mobile number. These are all used uniquely for identifying. But among those we are choosing employee number right as a primary one. But try to understand. So what is the purpose of primary key? Oh, so we have a concept called as what is that one? So constraints. What is that concept? constraints. So before going to constraints, let me talk about what is that one. So by using SQL, we are going to perform so different types of operations. So these operations can be categorized into different types of languages. One is called as DDL. DDL stands for what? >> Data definition language. data definition language I am going from ground actually so just we can observe just listen to me for 10 minutes and after that DML so data manipulation language and also we can another one is DRL so data retrieval language. Okay. So we have some other languages also but these three are more important. So first we are talking about what is that one? So DDL and DML. What is DDL? Actually DDL stands for data definition and DML stands for data manipulation. But try to understand if you want to understand these two concepts. First we have to understand what is data definition and what is data correct we need to differentiate between data definition right so data definition versus data. So we need to understand these two. Let's assume that so we have a table per suppose so it's an employee table right which we created earlier for example this employee table contains some columns employee number name address and also email and also there is some data which we inserted for example so one sur address is USA and same some email sur ofgmail.com okay something like that and to John UK so John at the rate ofgmail.com okay so now we have to understand so what is the difference between so data definition and data. So from this table. So if you are speaking about the data definition of this table, if you are speaking about the data definition of this table. So what is the table name? Data definition basally tells about table name and columns. What are the columns? Employee number, name, address and also as well as what is the email and also what is the data type will be assigned for this employee number integer and what is the data type for name where for address also vare for email also vare and also what are the constraints that are applied on the particular columns we don't know about constraints but we know only what is that one so the primary key constraint so these all details comes under what is that one so data definition so we can simply we can say data definition represents the schema of a table schema in the sense what exactly the table name and what are the columns present in the particular table and what is the type of that columns and what are the constraints that are applied on the columns. Okay, this is all representing what is that one? So data definition this one we can call it as what is that? Meta data, right? Metadata about a table. Metadata means what? So data about a uh data about data, right? We have an employee table. If you want to get the metadata, metadata is nothing but what is the table name and what are the columns present in the table. We have employee number, name and address and what are the data types associated with that particular column and what are the constraints that are applied on the particular column all these concern what is that one? So data definition then what is data here? So data definition is this one but data is nothing but the rows right. So this is these are the rows which we inserted into this table right this is nothing but data okay so the actual data which we inserted into the table that is nothing but data and data definition in the sense this data is having some some metadata right what exactly the table and what are the columns what are the columns here employee number name and address and email and what is the data type of that column, what type of data that column will allow all these comes under metadata. So we have so two different languages, two different types of queries we are writing to differentiate between what is that one. So data definition and uh data manipulation. So first one is data definition language. Especially we can call it as DDL. In DDL we can able to perform so create, alter and also drop. These are the three operations which we are performing on DDL. What does it mean? So if you're talking about create, so create is mainly for creating any database object. So example so creating a table. So alter means assume that the table is already existed for suppose if you want to make some changes to the structure of the table. Okay. If you want to make some changes make changes to the definition. Make changes to what is that one? So definition what changes we can make it. So by using alter we can rename column we can rename column what our constraint if you are applying any constraint. So we can rename a column or constraint and also we can add or drop. So column war constraint and also we can change so data type if you want to change the data type or size of a column. So we can do that one. All these options comes under what is that one? Alter that means we are just making some changes to the existing table for suppose the table is already present. If you want to change the data type that one comes under alter operation. If you want to rename a column unfortunately we provided wrong name. If you want to rename a column that one is also comes under alter. And finally another option is what is that one drop? What is that one? So drop. So drop is mainly for dropping a table. So dropping a table in the sense it is completely removing a table. Okay. So if you want to completely remove a table, we can use what is that drop. So right now we performed only creating a table. Correct? We know how to create a table. So I will just explain. So what is alter how it works? Just you can observe. So assume that so we have an employee table. So these are all the columns present in this employee table. So what are the columns? Employee number. So name, address and sale. So these are the columns and employee number is a primary key. We have a separate discussion on primary key. No worries. But right now I'm not speaking too much about the primary key. Let's uh finish out this alter option. Okay. So this is my definition and this is the data. So one John and address is UK and Sam salary is some $3,000 or something whatever it may be and address uh two Adams and uh he is from USA is having some $4,000. Now my requirement is I want to change this name from cell to salary. So the command is might be you can use alter table. What is the table we are altering employee rename. So this rename is a keyword especially I'm highlighting. So rename column. What is the old column name? cell to >> what is the new column name salary. Okay, like that. And also in the similar way I want to add an extra column. So adding an extra column. Uh what we can say here uh email So the table already contains four columns. What are the columns? Employee number, name, address and salary. I want to add an extra column. Can you please tell me adding extra column comes under DDL, DDL or DML? It comes under DDL, right? So if you want to add an extra column, so how can you add it? Alter. So table employee yard. So we can specify. So what is the keyword we are adding? What is that one? So column open parenthesis not required. So add column. What is the column name? Email. And what is data type? worker of 100 per post. So this is the way we can add a new column. So let's see all these things practically. So right now I'm not touching the data. Try to understand I'm not working with data. Okay. I'm just working with the table definition. So in this if you are observing I created a table. So if I'm executing so describe employee what are the columns are there could you please look it and confirm employee number name address and email correct so let's add another column what is the column I want to add it here salary how can I add it so that one comes under alteration right so alter table. So employee add. So we are just using add column. So this syntax add space column and column name. What is the column name? Sty whose type is what is the type? Integer. So if I'm adding this column. So if I'm executing this query this is successful. So after that where we can check whether this column is added or not. Anyone could you please tell me describe employee right? So just describe employee. See this salary column is added. Okay. So now another question but I unfortunately I added sal. I just want to change this name of this one name of this column from salary sal to salary. Anyone could you please guess it? It comes under alter. Yes. Alter table employee. What is the command? So rename. So I'm renaming a column. So old column name is cell. I'm just changing that one to what is that one? So salary, right? I'm just executing this query. It is successful. Where we can check it? How can you know whether this column name is getting changed or not? Describe employees. See, look at this. This name is got changed or not. This name is getting changed. So drop column and what is that column? So that one is getting dropped. How can you know? So describe employee. So salary is dropped, right? So now tell me this table contains any data. No, this is just data definition. How to retrieve the data from this table? If I'm writing select star from employee okay so employee is the table name. Select star from employee means this one does not contain any data. This one contains only so it is displaying only column and names but it does not contain any data. So what is select query? This one comes under DDL or DML or DRL retrieval language. Only select command comes under data retrieval language. Just basic I'm introducing. Now the question is I want to insert the data into this table. Insert data into what is the table? Employee table. So if you want to insert the data into this employee table first we have to identify what are the columns present in this table right. So for that one what is the command we can execute describe employee what are the columns are there okay total how many columns four column employee number name address and also email there are many ways we can insert the data into a table first one is inserting values into all the columns for example here I'm writing like this insert into employee space values of if you are using this syntax we need to make sure that we have to insert the data for all the columns for example so one and John and also as well as address address is USA and also the email so John at the rate ofgmail.com or But try to understand here if you are observing strings here John is a string USA is a string what is string anyone could you please tell me what is string actually it's not only we cannot say collection of alphabets right group of characters especially in SQL so this strings can be represented with strings and dates especially string and also date can be represented with single quotations not double quotes but if you are from programming background might be you can able to see strings can be represented with double quotations right yes >> in Java and other programming languages but in SQL so strings can be represented with what single quotes so now if I'm executing this query so one record is inserted successfully how can I verify it whether this record is inserted or not we have to retrieve the data from employee table. See one record we are getting or not. So try to understand describing in the sense we are just observing the columns if you want to retrieve the data. If you want to retrieve the data so then what we have to do we have to use select query. So select star from employee. Look at this one record is successfully in inserted. So let's insert second record. How to insert second record? So two and also RAM. So he is from so Hyderabad and also Ram at the rate of so gmail.com suppose no. So now tell me how to execute this query. Just select this query and execute it. How can you know whether this record is successfully inserted or not? Select star from employee. We have two records. First one is one John USA and second one is Ram and also hydro. So try to understand. Now tell me this insert command comes under DML or DRL. >> DML. So it comes under what is that one? So DML. So we are working with data right. Insert update delete. These are all comes under what is that one? So DML. Select query comes under DRL create alter drop DDL. So now we inserted this query but try to understand the syntax here. How many columns are there in this employee table? Anyone could you please guess it? Okay. So now tell me if I'm trying to insert three values then what happens? like this insert into employee space values of I'm inserting third record of course third record is Ross he is from so Chennai but what happen means I'm not inserting value for the email id is it possible with this approach no Why the table contains what is that one? So four columns. Correct. If table contains four columns. But uh you have to insert you're inserting only for what is that one. So three columns. It will automatically giving an error. So look at this. If I'm trying to execute this query, so it is giving an error. So we are inserted of only three values. But actual values required is how many values? Four values. So in such cases what we have to do explicitly we have to put it what is that one? So null. I'm not going to I don't know the name of email of the particular employee Ros that's why we are putting it like this. In real time this data will be generated. You are not supposed to insert the data and all those stuff. During the training only we are getting a chance to insert the data to understand the insert query and all but uh mostly we are writing select queries as a data analyst. Understand the data is already there in the databases in real time only we have to fetch whatever the records we are expecting based upon some criteria and all but as a part of the training what we are doing because if we are talking about the data already systems are already built okay some data we are getting from sensors if you are tracking travel company per suppose every 5 minutes they are tracking their trucks Right through sensors and all they are keeping some sensors in the truck that sensor is sending some data that data is transformed and it is stored in a table based upon the time stamp in the similar way. So data is generated from if you are booking an appointment in the somewhere hospital or somewhere you are just visiting uh uh the front office and you are submitting your details automatically data will be generated. So we are not data generator. Data is already there in their databases. What what is your job? Mostly we are writing these queries. What is that one? Select queries. We need to fetch the data based upon the requirement. We don't want to generate the data. But as a part of the training our job is how to create table, how to insert the data and how to update the data. All these stuff we'll teach you. But in real time we are not going to generate the data. Even if you are having millions of records all those records will be generated from applications only. Correct? Right. If even if I'm uh morning I visited some hospital for suppose to check my cold and throat problem. What happened? So I just visited hospital. So automatically they made some entry in the system. Automatically my data record is getting created right. Data is inserted in the database. My data is available in their hospital database. I am not creating any SQL query to insert the data. Right? Like that. Okay. So if you want to insert so all the values just execute this query. What are constraints? So if you are speaking about the constraint, so constraint is nothing but a rule or regulation. Okay. So that is applied on the columns. Rule or regulation that is applied on what is that one? So the columns of a table. Every database even if you are speaking with Vacra or MySQL or DB2 or any database almost all the databases are providing some predefined constraints. predefined rules while inserting the data into a table. What are those predefined rules? Actually the first constraint is unique constraint. Unique means what? So it does not allow duplicate values, right? Unique means it does not allow what type of values? duplicate values. So for example, assume that you have a table. So for example, if you're having an employee table, in this employee table, if you are having employee number, name and also email. So for this email if I'm assigning so email and also as well as some other columns like address. So for this name if I'm assigning unique constraint so what happens this name cannot accept duplicate values right so for example one subu and also email is subu at the rate ofgmail.com something and address is so Chennai in the similar way if you are repeating the same record so again if you are repeating the same name it will accept Can you please tell me why? Because this one is allowing only unique values. Unique means what? It does not allow duplicate values, right? The particular column is not accepting duplicate value in this case. So this particular value cannot be accepted here as a second record. It is automatically constraint violation. It comes under constraint violation. Violation means what? We already assigned unique constraint on the particular column and name but we are trying to insert duplicate value. What happens if we are trying to insert duplicate value? Of course ultimately we are getting an error. So especially the error is stating that unique constraint is violated. Unique means what? It does not allow duplicate values. And another constraint what is that constraint? So it is called as not null. So not null means what? It does not allow. It does not allow null values. So null values. So null means nothing will be there. Right? Null is not equals to space. For example, if you are giving space character for suppose. So null is not equals to space. So null is not equals to null. Generally in any database null is not equals to null and null is not equals to space. That means what I'm saying is one row contains null value that is not equivalent to another row null value. Okay like that null is not equals to space. Even if you are giving some space character that is not null value. Okay. So from database to database this meaning is getting changed. What happens if you are assigning null value for example here if you specifying employee number name and address. So for this name if I'm assigning not null is it possible to insert null value here? No. it does not accept null value. Okay. So let's assume that so I have a table right I want to insert unique and also not null for suppose for example I'm having a table so employee number and name and address but what I am expecting here is for this name I want to make sure that this one does not accept duplicate values and also null values. What are the two constraints I have to assign? Unique and also as well as not null. Correct? Yes. This one does not accept duplicate values and also does not accept null values. So in such cases we can go with what is that one? So the primary key. What is that? So primary key. So what is primary key actually? So primary key is mainly for uniquely identifying a particular record in a table and primary key means what it it will it does not accept duplicate values and it does not accept null values. Can you please tell me in a table there are several candidate keys we have. So the employee number should not accept duplicate values and also null values. So we are specifying so employee number, name, address and also as well as so email. So here email is unique and also what is that? So this employee number should be what is that one? So the primary key why I'm specifying so primary key is it possible to create more than one primary key in a single table? No. One table contains only one primary key. Correct? So one table contains one primary key. So this primary key what is the purpose of primary key? This one is acting as an identity, right? This one is acting as an identity to identify the particular record. And also some other important points we have to remember while working with this uh primary cases always foreign keys. Okay. So foreign keys in another table always references. So primary keys So references what type of keys? Primary keys. So always if you are designing a database we need to make sure that so some other table if you are working in a relational relationships always foreign key is referencing the primary keys. We'll see that part also. What is foreign key? How it affect how will how it is referencing the primary keys. But uh as of now we need to understand so what is the main purpose of primary key in a table there are several candidate keys we have candidate keys are mainly for uniquely identifying a particular record but in that candidate keys also we have to identify only one key that one is called as primary key. So that primary key can be used mainly for uniquely identifying a particular record. Okay. So another type of key is check constraint. What is the constraint name? Check. So check constraint. So if you want to apply any condition per suppose if you want to apply any criteria or condition while inserting the data in a table then we can go for check constraint for example let's say if I'm having so an employee table similar way employee number name address and salary but on the salary column So maybe I'm writing so some check constraint. So what is the constraint I have written? So salary between $1,000 and $5,000. If I'm writing the query like this, what is the meaning of that one? Explicitly I'm assigning some constraint on the particular column. Right? on the salary column explicitly I'm assigning some rule what is the rule so it will allow only the salary between $1,000 and $5,000 $1,000 and $5,000 so for suppose if you are trying to insert so $10,000 it will accept no it will not accept because already some check constraint is assigned on the particular column Okay. So it will allow only the salaries which is ranging from,5,000 only $1,000 and $5,000 only. In the similar way if you're writing a check constraint so name so must starts with some s character for suppose if you are writing a constraint like that. So what happens? So the name column should allow only the values whose name is starting with only the character S. Okay. Other than that character for example if I'm providing the name if I'm trying to insert name Adams it will accept this is a valid value. No this is not valid. So if you want to apply some condition or criteria on the particular column. So then we can go for what type of constraint a check constraint. So I discussed about so these constraints right first one is what is that one unique constraint and next one is not null and next one is primary key and next one is check constraint. try to understand here if you are applying a constraint on a particular column. Okay. So first what I'm doing is I'm creating so I'm just dropping this employee table. We have already some tables which are already present. Let me implement this part practically. So already we have employee DB which is already present. Uh how can you check it? How can I check it? How can I know whether the database is present or not? What is the command? Show databases. Not database. What is that one? Show databases to see all the databases. Correct. So look at this. It is displaying. So all the databases customer DB, employee DB and all those stuff. Okay. So now I have to use this employee DB. So how can I switch to the employee DB? What is the command? >> Use employee DB. So if I'm writing use employee DB, so then automatically it is switching to that particular employee database. Okay, great. Now I want to see all the tables present in this employee DB. Okay, what is the command? So I want to see all tables not databases all tables in DB. Okay. Show tables. But suppose if I'm executing command show tables. What happens? It is displaying. So all the tables present in this employee DB. What is the table is present already? Employee table. So I want to drop this table. I just want to drop it because I need to check my constraints, right? So I want to this is a command line, right? iPhone represents what is that one? So the command line I want to drop this table H what is the command? So drop table what is the table name? So if I'm writing so drop table employee so automatically the table is getting dropped. How can you know the table is dropped or not? It is successfully executed. But uh if you want to see show tables >> there is no table is present in this employee table employee database. Correct? Okay. Describing in the sense describing is a description. It is providing the description of a table. If the table is present, it is providing description. For example, if I'm executing command describe employee first employee table is present no right, it will give you an error. What it is showing so we have to check the error. Okay, the employee table is not existed like that. Okay, great. Now what we have to do? I need to create an employee table. Correct? Okay, I am just specifying some command here. So create employee table with the employee number. What is the for the employee number? What is the key I am assigning? So what is primary key then? Primary key means what? Unique plus not null. >> Not null. >> It does not allow duplicate values. It does not allow. Is it possible to create multiple primary keys in a single table? Always we can create only one primary key. Correct? So let's create a table. So create table employee. So for employee number what is the data type? Integer. And what is the key I'm assigning here? Primary key. >> Primary key. >> What is the next step? Next we have to specify name. If you are talking about name cannot be null. Correct. So what is the constraint? We can assign it for name not null. Right? First is a data type and also we can specify what is the constraint not null. If you're assigning not null what is the meaning of that one? That particular column name it does not accept null values. Yes. Okay. And also address. So assume that address also must be required for suppose must be required means compulsory. The particular person must have address. In such cases we have to specify here also >> not >> not null. And also another one email. So email is of some 30 email should be unique right for every person. Is it correct? the same email cannot be assigned to another person. So this one what is the constraint can I assign here unique okay so you understand this query can you please tell me I'm asking one question here so this is the query can you please tell me why I am assigning so employee number as primary key so simply you are saying so it is not accepting null value and also it does not accept duplicate values why only employee number only I'm choosing for this purpose I can choose some other email also right so in some other table might be foreign key is referencing this employee number right so in such cases always employee number is a best practice to choose it as a primary key and also why email I'm choosing as unique if you're using Gmail also you can create only one uh Gmail with only one email id right like that so based upon that one you have to understand uh for which column we have to assign unique for which column we have to assign. So all these stuff. So now we can execute this query. So the table is created successfully. So how can you provide the how can you get the description of this table? What is the command? Describe employee. Okay. I'm executing this describe employee command. Look at this. It is displaying. So table description which contains employee number, name, address and also email. Correct. So for employee number what is the key is assigned here primary key. For an email unique uh uni stands for what? Unique constraint. What about name and address? It will accept null values. No. Why it is showing? No. Because we provided what is the constraint here? Not null. Okay, everything successfully created table. So now try to insert the data into this table. So inserting data into employee table, right? Inserting data into what is the table? >> Employee table. >> First approach. So this is the first approach. In the first approach, you must insert the values for all the columns of a table. So what is the way? So if I'm writing insert into employee space values of so employee number is one and name is subu and address is bad. So why I'm putting in single quotations? Why can't why I can't use double quotations? Please remember it's not C language or Java right in C language or C++ or Java we are writing strings in double quotations but in SQL so we must write it within the single quotations and also as well as another value I need to supply it here address and also email right so this one also should be within the single quotations like that so let's execute this query so it is successful ufully inserted or not. How can you know whether it is successfully inserted or not? So what is that one? So select >> from employee. So is just for displaying the tables whatever the tables present in employee DB. Correct? Okay. It is just displaying what are the tables. For example, let's say if I'm executing here show tables. Okay. Executing show tables. Currently we are using employee DB. In employee DB what is the table is present. If you want to fetch the data from the table I am saying from the table we have many records right? One million millions of records we have for example. Then at other situations we can use select star from employee. What is star here? Star means represents rows and columns. We are retrieving all the rows and columns from the table like that. Okay. Just execute this query. Select star from employee. Okay. So let's try to insert another record. So here so to John. So another record I'm inserting for suppose. So USA. So John algmail.com suppose. So if I'm trying to execute this query this record is successfully inserted. It will insert successfully. Yes. Because this employee number K is not duplicated. Right? For suppose if I'm putting one here again if I'm executing it will allow no. Why? Why? What is the reason? Employee number I assign primary key. Primary key means what? Primary key means unique plus not null. So if I'm trying to execute what is the error I am getting? So that's why it does not allow duplicate values. Okay. Now tell me if I'm providing so same Gmail ID for this. Is it possible to assign same Gmail for this John also? No. >> Uh because of unique constraint. So automatically unique constraint is getting violated here. Look at this kubu at the rate ofgmail.com will not allow. Okay. Now tell me so if I'm writing John here. So John thegmail.com is it possible to insert null value here? So what is primary key? Primary key means what? Unique plus >> not null. It does not accept duplicate values and also it does not accept null. So if I'm trying to execute this one, we are getting an error. So we are getting an error. What is that one? So employee number cannot be null. So it does not accept duplicate values. It does not accept null values. So what about name? But suppose can I insert name as null? We have applied not null condition. These are all things we have to remember. why this record is not getting uh accepted. So if I'm executing so I'm getting an error. So that's why the name should be not null. So you must provide the name. So what I'm doing here is I'm just putting some name here. So subu and also John. Okay. So now this record is record. We can able to insert it right. Yes. So now we can run successfully one row is inserted. So now we are creating table right database is already created. So just select that query first before executing the query first we have to understand the query. So for employee number what is the key assigned actually primary key right? Why we are assigning primary key for that one unique and also it does not accept >> null values. For example, you are having Excel sheet. For example, in Excel sheet, employee number column, you you need to make sure that there should be unique. It does not allow duplicate values and also it does not allow null values. In the similar way for name also we specified what is the constraint not null. So that means what does it mean? It does not accept null values. Unique is different uh not null is different. So like that we assigned all the constraints. So just select that query and execute it. What happened? We are getting error. So uh read that error first. What is the it is showing? So what we have to do first? If you want to drop the table, write already existing table. What is the query? We have to write it. Drop table just write it after that line. Drop table employee space space employee yeah employee not employee DB employee. So put semicolon H select that query and execute it. So existing table is dropped. Dropped means no table is present. How can you check whether the tables are present or not? What are the tables are present? Show. Show tables. You're executing. You have to execute show tables in the bottom line number 16. Right. Okay. There are no tables. Now you can create table. What is the query? We have to execute. Create. Don't write it. Already query is there. Right? Create table query. Just select that entire query and execute that query. So now we can check table is created. Right? How can you say table is created? What is the query we have to execute? How can you say whether the table is created? Show tables. Yes. Okay. So next, if you want to retrieve the data from tables, select star from employee. There are no records right now. And the next point is what is that one? So the foreign key. So let's observe this scenario to understand in a clear way. So generally if you are doing if you are working with databases your data it is not recommended to store it in a single table. Okay. So let's assume this scenario suppose so we have so all of you are having passports most of the people. So nowadays are having passport correct? So if you are talking about so the relationships so one table is related with another table. So there are different types of relationships we have. First one is so one to one relationship and another one is what is that one? One to many what are inversely so many to one and another type of relationship is what is that one? So many to many. Okay. So these are these are also different types of relationships. So we have one to one relationship and also one to many relationship or many to one and also many to many relationship. So first let me explain with one to one relationship. Can you please give me tell me one scenario like I'm giving a scenario here employee and passport. What is the relationship between these two entities? So it is one to one employee is having only one passport. So is it possible? So one employee is having multiple passports. No. Or otherwise so let's take this is not an employee so we can take this one as what is that one so student so this is one to one so in the case of one to one relationship okay so assume that so we have student entity so student table and passport table so this passport table contains what are the columns passport ID and every passport is having so the passport number and also something like expiry date. Can you please tell me what is the primary key in this passport table? Yes, of course the passport number you can take it as a primary key. Why unnecessarily I provided an extra column here passport ID it's not required right? So if I'm putting passport ID then you can consider this one as what is that one so primary key column. So this is called as passport number is alternate key in the similar way in the student table if you are talking about in student table. So we have student ID and student name and also student location. So these are the this is the student table. So can you please tell me what is the primary key for student table. So now tell me I need to provide the relationship between these tables. Suppose for example let's say if passport ID is one and passport number is something and expiry date is something so now student so name is subu his location is Chennai so this passport is attached to this particular person subu how can you attach this particular passport to this person in such cases what we have to do here is you have to specify here what is that one so the passport ID So this passport ID is acting as foreign key. So this foreign key is a reference. So this reference refers to what is that one? So this passport record. So what is the passport ID value here? One. So that means subu is having. So the passport ID one that means that is referring to this record. What is that one? So the passport ID one in the similar way. So you have so the second passport ID. So this one is some other passport number something like this. So John he belongs to USA and his passport ID is two. These two records are getting mapped right. So what is the purpose of this foreign key? What I'm saying is for foreign key is acting as a reference. Okay. So in one table we are providing the reference to the another table. So this two is a record. This one is matching with what is that one? the passport ID too. But why this one comes under one to one mapping? One record of student table is associated with another record of passport table. Say yes or no. But suppose if I'm providing one here, this one works. Is it one to one relationship? It will not work. But please make sure that if in the case of one to one, what happens? One record of one table must be associated with what is that one? So one record of another table. One record of one entity is associated with another record of one entity. So for example, one student is having one passport. Subu is having only one passport. John is also having their own one passport. It's not one to many. It is one to one relationship like that. For this we are using so this foreign keys. So here passport ID is called as what is that one? The foreign key. Okay. In student table we are having passport ID. This one is called as what is that one? So the foreign key. This foreign key is referencing what is that one? So the primary key right so one important point I'm noting here so always foreign keys so always foreign keys or references so primary keys so can you please guess it what is the foreign key column here in student table this P ID is the foreign key column one extra column we provided and that one is referencing what is the primary key column in the passport table P is the primary key column. So if we are storing the data in two different tables and we have to identify the relationship between the tables first that is the important thing once you identify the relationship between the tables if it is one to one mapping for suppose it is a one to one relationship or something so we have to specify so the foreign key in one table so that foreign key always references what is that one so the primary key of another table this is called as one to one mapping. So let's take another scenario. It's a one to many relationship. So this one is in a department table or student table for suppose. What are the fields present in the student table, student ID, name, address and also this is in department table. Can you please tell me what are the columns present in department table? So department ID department name. So it does not contains department uh student ID does not have. So try to understand. So department table contains only department details. Correct? Department name and location. So in such cases in student table what is the primary key? Where we can put the primary key? Uh where we can put the foreign key here. This is one to many. First of all, could you please confirm this is one to many relationship? What is the relationship between department and student? But in such cases, you have to understand. So where we can put the foreign key always foreign key should be we can keep it in many side actually. What is the many side here? Student right? >> In student table we have to keep it. What is that one? So department uh ID or number suppose the column name is up to you. So this department number we are keeping it as what is that one? So this one as foreign key. So this foreign key always references which column >> department table department ID. Foreign key always references what is the key? Primary key. Student table department number. This one is a foreign key. This one is going to reference to the primary key. So department ID which we can call it as what is that one? So the primary key like that even if you want to provide for example so department ID here no worries you can provide department ID or department number whatever the name you want that's not a problem but only the thing is for example so if you are having so department number 10 department name is something so Java department and location is hydroad so there are two employees belongs to same department for example so one subu and address is So Chennai and department number is 10 and also 1 2 Ram is belongs to Sahra his department number is 10. So but with these two are referring to the same record right. So these two students belongs to so same department Java department like that. So try to understand if you are using foreign key the column name should not be same foreign key name and primary key name should not be matched should be matched or should not be matched then there is no issue at all only the thing is the data should be matched so we have 10 here that means what is the meaning of that one so subu is belongs to subu and ram both are belongs to so the department ID 10 so in the converse okay in In the converse might be if you are talking about uh this one to many relationship right in the reverse way we can check it. What is the reverse way? One department contains many students. For example, if you are taking department number 10, how many students are there in this scenario? So reverse way we can check it out. Means it is many to one rate. That means many students belongs to one department. What is the key rule we satisfied here? What is the key rule? We have to uh make sure that always many side we have to specify the foreign key. Okay. So what is the many side? So many side we can keep so foreign key like that. So what is the many side here? Student side right in student side. So we are just keeping the foreign key like that. So that is the one rule of thumb we have to follow. So generally if you are working with relationship we have to follow the some rules. What are the rules? So one department contains many students and many students belongs to the particular department. In such cases always many side it is a best practice to keep the foreign key like that how to execute these queries. Okay let's create student table and also department table. Can you please tell me which one I can create it first in these two tables? Which one I can create first? Because department is not having foreign keys, right? So that's why first step is what is that one? So we can create what is the table. So this one is having so department ID whose type is what is that one? So integer and this one is a primary key and also department name. So where of 100 and what are the other fields? Location right. So location where of 100. So that is sufficient. This one will create what is that one? So department table. Let me execute this query. Yeah. So department table is created. What is the command? Show tables. See the department table is created successfully. So I want to describe the table. What is the command? So this one is describing the table. What are the columns are there? Department ID, name, location. Okay, great. Now the next step we have to create a student table that refers to the department table. What are the columns we have in student table? Let's look into this table. What are the columns present in student table? >> ID, name, address. >> Oh, we are missing another column especially specific column. Department number >> foreign key. Yes. >> Uh please focus on that one. So create table. What is the table name? Student. And student number whose type is integer. And this one is going to be what type of key? >> Primary key. >> I made a mistake here. Primary key. >> Primary spell. Yes. Name var of 100. and also address Ber of 100. But here one more extra column we need to keep it. What is that extra column? >> Foreign key the column name whose type is what type? Integer type >> integer type. >> So here we can make use of what is the keyword references. If you want to specify the foreign key, we can specify one keyword called as what is that keyword? References. This one. This column is referencing which table? Which column? Is referencing department table. Right? Name. So we already created this table already. Department table is already created. Department table contains what is the column name? What is the column name? Department ID which is called as primary key. Foreign key. This is the foreign key. Department number is the foreign key. Okay. Agree. This one is referencing which table primary key. That is important very understanding. Try to understand always foreign keys are always referencing to the primary keys. So these two tables for suppose what are the two tables? Department table and also student table and also especially this is one to many. In such cases in student table we specify one extra column. What is the column? >> Department number. >> Department number. >> Department number. >> Department number. >> Department number is referencing which table primary key. >> Department table. >> Department ID. >> Now tell me these two column names are same. So it's understanding is super important. You can just execute that query. I'm just uh taking to the next level. Can you please tell me I want to create this scenario. So we have student table and passport table. I want to provide the relationship between the student table and passport table. So what I'm expecting here is I just want to drop this uh what table I have to create first. Can you please tell me in this case? Okay. So let's create passport table first. I am not modifying the existing table. I just want to drop student table and again I have to recreate it. So create okay create table. So passport. Let's execute this query. It's created. How can you check whether the passport table is created or not? What is the query I have to execute? So whether the passport table is created. So but if I want to create student table, what is the problem? Already student table is already present. So that's why I'm just changing the name another name student one. So we have so student one table. What are the columns? Student ID whose type is integer and this one is what type of key and also okay address passport ID. So passport ID integer. So references. So what is the table uh of so that's all so I just execute this one so let's think about so we have so if you are designing a database per suppose what are the entities for example so if you're taking an e-commerce application so e-commerce application so what are The entities will be there basic e-commerce which contains product right product table. So e-commerce means what? Amazon, Flipkart. So these are all e-commerce websites. Can you please tell me some of the details? So we have product table which contains what are the fields? Product ID, name. So this category I'm keeping in what is that one? So separate table called as category. So this one contains category ID and category name. Category ID and category name that is sufficient. So here I'm putting it as in product table. What is the primary key in category table? What is the primary key? So now I have to link these tables. What is the relationship between this uh in many side? We have to keep what is that one? So foreign key, right? It is a one to many. One category contains what is that one? to many products. So this category ID is what is that one? So let's create these tables quickly. First I am creating category table here. So how I am creating category table? So create table so category of category ID whose type is what is that one? integer and it should be what type of key? Primary key and also category name whose type is the where 100y whether the table is created or not. How can you verify whether the table is created or not? What is the command? created. Next step is so we have to create a product table. So product so product ID whose type is integer and also it should be a key product name. So var of 100 whatever it may be and also price so whose type is integer and now this product belongs to so the particular category so here I'm specifying so one extra column called as category id whose type is integer here what is the keyword we have to spe references which table so we have to specify so category of very good So C is the column which is primary key. So here what is the foreign key here? This one is the foreign key. And what is the primary key here? C. This one is called as primary key. That understanding is super important. We completed one to one and one to many. And one last task is pending. What is the task? It's a many to many. Can you please tell me what is the relationship between the student and courses? Okay, you are all students. You registered for business analyst program. Might be you registered for some gen course also, right? So the relationship between here is many to many. One student can register for many courses and the same course is registered by many students. What what we have to understand at what type of situations we can go for many to many relationship one side one to many correct. So one student. So what we can say here one student registered for in the similar way reverse in the reverse process one course is registered by >> many student >> offer many to many relationship correct can you please I'm asking can you please give me some examples related to many to many relationship. So try to understand in the case of many to many relationship. So assume that in this scenario. So we have student table and also another table is what in student table we have some column and student ID and in course table what are the primary keys for these tables. In the case of one to one and one to many what we did actually in one to many we specified many many side we added foreign key but in the case of many to many relationship what happens means what strategy we have to follow. So the strategy we have to follow here is we have to create what is that one? So separate table. So this one we can call it as junction table. So this table is student course table. In student course table we are specifying so two foreign keys. One is student ID. So these two are this is a foreign key. So this foreign key is referring to student ID and this course ID foreign key. This one is referring to course ID. For example, assume that we have a student. So name is Subu whose address is Hyderabad and also the course ID uh it's like SQL and duration is some 4 days per suppose in such cases what is the entries for this student course table 1 one right so that means student ID refers to the student record and course ID refers to the course record So generally in the case of many to many relationship what I am saying is what is the strategy we are following is we are going to create one junction table what we can call it as what is the table junction table which is mainly for holding the foreign keys. We are not going to keep the foreign key just like one to many relationship in previous way. We are just going to create a separate table which we can call it as junction table. >> And with that we have come to the end of this course. If you have any doubts or questions ask them in the comment section below. Our team of experts will reply to you as soon as possible. Thank you and keep learning with simple learn.
Original Description
🔥Data Analyst Masters Program (Discount - YTBE15) - https://www.simplilearn.com/data-analyst-masters-certification-training-course?utm_campaign=nHVY5hUF3mA&utm_medium=Lives&utm_source=Youtube
🔥Partnership is with E&ICT of IIT Kanpur - Professional Certificate Course in Data Analytics and Generative AI (India Only) - https://www.simplilearn.com/iitk-professional-certificate-course-data-analytics?utm_campaign=nHVY5hUF3mA&utm_medium=Lives&utm_source=Youtube
🔥IIT Kanpur - Professional Certificate Course in Data Analytics and Generative AI - https://www.simplilearn.com/iitg-generative-ai-data-analytics-program?utm_campaign=nHVY5hUF3mA&utm_medium=Lives&utm_source=Youtube
This SQL with Generative Al Full Course 2026 by Simplilearn helps you learn SQL from the basics to advanced concepts while also showing how Al tools can make your work faster and easier. The course begins with database fundamentals, tables, queries, and joins, then moves into data filtering, aggregation, and real-world data analysis techniques. You will understand how Generative Al can help write SQL queries, automate tasks, and improve productivity. Practical examples and hands-on demonstrations are included to show how SQL is used in business and analytics roles. The course also covers projects and interview preparation to build confidence for job opportunities. It is ideal for beginners, students, and professionals who want to combine SQL skills with modern Al capabilities.
Related Videos:
✅ 1. https://youtu.be/husZ6Noq7e0
✅ 2. https://youtu.be/crZIWsWy4fs
✅ 3. https://youtu.be/I-Dw4G3XAAQ
✅ 4. https://youtu.be/bVtB9JEKGu0
✅ 5. https://youtu.be/dn6jnFS3tvg
✅ Subscribe to our Channel to learn more about the top Technologies: https://bit.ly/2VT4WtH
⏩ Check out More Data Analytics Videos By Simplilearn: https://www.youtube.com/playlist?list=PLEiEAq2VkUUKnB4Yzmn-B6O_hhcP-DanA
#sqlwithgenai #sqlwithai #sqlwithaifullcourse #sqlwithaicourse #sqlwithaitutorial #sqlwithaifordataanalysis #sqlwithaitools
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Simplilearn · Simplilearn · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Ethical Hacking Full Course 2026 | Ethical Hacking Course for Beginners | Simplilearn
Simplilearn
AWS Full Course 2026 | AWS Cloud Computing Tutorial for Beginners | AWS Training | Simplilearn
Simplilearn
Data Structures And Algorithms Full Course | Data Structures and Algorithms Tutorial | Simplilearn
Simplilearn
SQL Full Course 2026 | SQL Tutorial for Beginners | SQL Beginner to Advanced Training | Simplilearn
Simplilearn
Microsoft Azure Full Course 2026 | Azure Tutorial for Beginners | Azure Training | Simplilearn
Simplilearn
Shopify Tutorial For Beginners 2026 | Shopify Course | shopify dropshipping | Simplilearn
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
🔥Feeling Stuck? How Upskilling Can Boost Your Career! #shorts #simplilearn
Simplilearn
Growth Hacking In Marketing | Learn Growth Hacking Marketing Strategies | Simplilearn
Simplilearn
🔥Cracked 3 Job Offers with One AIML Course! | 20–30% Salary Hike #shorts #simplilearn
Simplilearn
Top 10 Must-Have Figma Plugins for UI/UX Designers in 2026 | Figma Plugins | Simplilearn
Simplilearn
Business Analytics Full Course 2026 | Business Analytics Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Getting future-ready with course in Artificial Intelligence | Roopam’s story
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
Full Stack Developer Course 2026 | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | How David Went From Seasoned Engineer to AI Innovator #GetCertifiedGetAhead
Simplilearn
Complete Social Media Marketing Strategy for 2026 | Social Media Marketing Strategy | Simplilearn
Simplilearn
🔥Top 4 Cybersecurity Certifications You Need! #simplilearn #shorts
Simplilearn
🔥Cloud Engineer Salary in India 2026 | City-Wise Breakdown #shorts #simplilearn
Simplilearn
Digital Marketing Full Course 2026 | Digital Marketing Tutorial For Beginners | Simplilearn
Simplilearn
Full Stack Java Developer Course | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Social Media Marketing Full Course | Social Media Marketing Tutorial For Beginners | Simplilearn
Simplilearn
How To Create LLM Chatbot Demo 2026 | Build a LLM Chatbot From Scratch | Simplilearn
Simplilearn
Digital Supply Chain Management Certification | Supply Chain Management Course | Simplilearn
Simplilearn
AI Agents Full Course 2026 | AI Agents Tutorial for Beginners | How to Build AI Agents | Simplilearn
Simplilearn
ITIL Full Course 2026 | ITIL 4 Foundation Course | ITIL Tutorial For Beginners | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
ITIL Full Course 2026 | ITIL 4 Foundation Course | ITIL Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Integrating AI & Music | Diego's Story
Simplilearn
Digital Marketing Full Course 2026 | Digital Marketing Tutorial For Beginners | Simplilearn
Simplilearn
SEO Full Course 2026 | SEO Tutorial for Beginners | SEO Training | SEO Explained | Simplilearn
Simplilearn
PMP Vs CAPM: Which Certification Should You Choose? | PMP Vs CAPM | Simplilearn
Simplilearn
Complete Data Analyst Roadmap 2026 | How To Become A Data Analayst In 2026 | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
🔥5 Jobs That Are Most Likely Safe from Layoffs in Today’s Market #shorts #simplilearn
Simplilearn
🔥Git vs GitHub – What's the Difference?
Simplilearn
What Goes Behind Building the Likes of Uber and Netflix? | Product Management Tutorial | Simplilearn
Simplilearn
AI Agents Full Course 2026 | AI Agents Tutorial for Beginners | How to Build AI Agents | Simplilearn
Simplilearn
Full Stack Developer Course 2026 | Full Stack Java Developer Tutorial for Beginners | Simplilearn
Simplilearn
Product Life Cycle 2025 | Stages Of Product Life Cycle | Product Life Cycle Tutorial | Simplilearn
Simplilearn
Project Management Full Course 2026 | Project Management Tutorial | PMP Course | Simplilearn
Simplilearn
PCB Design Course 2025 | PCB Designing Explained | How To Make PCBs | Simplilearn
Simplilearn
Python Full Course 2026 | Python Data Analytics Tutorial For Beginners | Simplilearn
Simplilearn
🔥Top Product Management Skills You Need to Succeed in 2026 #shorts #simplilearn
Simplilearn
SQL For Data Analytics 2026 | Essential SQL Commands | SQL Tutorial For Beginners | Simplilearn
Simplilearn
Simplilearn Reviews | Paving Way To Success With AI & ML Course | Soumik’s Upskilling Journey
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
Learn Snowflake In 45 Mins | Snowflake Tutorial | What Is Snowflake | Snowflake Explained
Simplilearn
🔥ML Career Tip – How to Start Learning Machine Learning in 60 Seconds! #shorts#simplilearn
Simplilearn
🔥Agile vs Waterfall in 60 Seconds #shorts #simplilearn
Simplilearn
Excel Full Course 2026 | Excel Tutorial For Beginners | Microsoft Excel Course | Simplilearn
Simplilearn
What Are AI Agents? | Types Of AI Agents | AI Agents Explained | AI Agents Tutorial | Simplilearn
Simplilearn
How To Create a Product Roadmap In 2026 | Product Roadmap | What Is Product Roadmap | Simplilearn
Simplilearn
SQL Full Course 2026 | SQL Tutorial for Beginners | SQL Beginner to Advanced Training | Simplilearn
Simplilearn
🔥What Is Phishing? #shorts #simplilearn
Simplilearn
Cloud Computing Full Course 2026 | Cloud Computing Tutorial | Cloud Computing Course | Simplilearn
Simplilearn
Simplilearn Reviews | Overcoming Rejection & career plateau to finding a New Job : Bhaskar Banerji
Simplilearn
Six Sigma Full Course 2026 | Six Sigma Green Belt Training | Six Sigma Training | Simplilearn
Simplilearn
Generative AI Full Course 2026 | Gen AI Tutorial for Beginners | Gen AI Explained | Simplilearn
Simplilearn
VLSI Design Course 2026 | VLSI Tutorial For Beginners | VLSI Physical Design | Simplilearn
Simplilearn
Related Reads
📰
📰
📰
📰
Understanding Data Mining: The Complete Beginner’s Guide for Data Science, Data Analytics, and…
Medium · Data Science
The Data Science Career Isn’t Dying — It’s Being Redefined
Medium · AI
Presentation: Accelerating Netflix Data: A Cross-Team Journey from Offline to Online
InfoQ AI/ML
yreport v0.1.4: your data health checkup just got a lot more honest
Medium · Machine Learning
🎓
Tutor Explanation
DeepCamp AI