okay so today we are going to discuss the introduction to database management system so first of all we need to understand what is a database management system and what was the need of having a database management system in the early computing job only computing start there was a need to store the information so that it can be used at a later stage so at the very early stage they used to have this file system file system just like a simple text file sarah there was no organization organization means which did not have any format in which data was saved so they used to just store the data the way it used to come no integrity, consistency, organization, structuring, any such format was used obviously the data available was also very less so they could manage it but later on things started getting complicated When data is saved without any structure or organization, it becomes very difficult to search it. So they found it very difficult. Then, entry became difficult because there was only one person who could make the entry in the system.
That too in the text file which is open now. So the entry making also became very slow. And... suddenly things became unmanageable. Then the researchers came up with a concept called Database Management System.
When the database management system was created, its early approach obviously that has changed with the time. When database management system was first introduced, its main objective was to create a very good structure for data. data entry, deletion, updation should be very fast. But as the database gets larger, we have to do searching and analysis to make it faster. And nowadays what you see is big data as well.
Big data means something that grows exponential. If I say that I have something like 200 entries, tomorrow I will have 50, the next day I will have 50, that is not exponential. Exponential means something that is growing at a very fast rate.
So all these are the challenges of the database management system. So first of all, we will start to try and understand what are the different terms that we use in database management. So the most important term available here is what is a database?
So here we see that a database is a collection of related data and data is a collection of facts and figures that can be processed to produce information. So what is a database? A database is a collection of related data We will see an example of this in a while And when we say that a database is a collection of related data So we need to understand what data is So that will also be available with you shortly What we have to do is We have to produce some kind of information Information is something which is meaningful in nature. For example, if I say that I have 105, 108, they do not make any sense to me. Even if someone's phone number comes, that also does not make any sense to me.
That is just the raw data that we have. When we structure it properly, organize it, then it becomes meaningful in nature. So, what we require is we require a database of interrelated data which in itself is a collection of facts and figures to produce information and what is database management system? Database management system that stores the data in such a way, what are our objectives and objectives of database management system? It is easy to retrieve, retrieve means easy to find, search, easy to manipulate means easy to edit and produce information.
That is final output and input to the user. So what we have is a database, database management system to manage the database. Now how do we store the database?
A database is stored in a very normal database management system in the form of a table Now what is a table? A table is known as an entity whereas a database which we call as a collection of related data that is called an entity set So we have two things, one is entity and one is called the entity set Entity is known as a table whereas a number of tables together will be called as a database. Now what can be a table?
Table can be related to the personal information of a student. When a student takes admission, he does a registration. You all must have done online registration.
When you do an online registration, there are many fields in it that you fill. So that collection of that and entries of each student together is called as a table. so table represent is represented in the form of a matrix that is rows and columns means some will be rows and some will be columns columns represent attributes or property of that entity entity is student so column represent its attributes or properties for example Like you have registered as a student, so its attributes or properties can be its name, father name, address, contact number, email id, the course that you are interested in, your score in the qualifying exam and all these things are called attributes. So that is represented by a column.
Then what is a row? row represents a record or a tuple for example first student wants to register his name is aman so aman writes his name his father's name his address the course that he is interested in his marks and e contact information and everything so that one record will be known as a tuple or a record similarly we can have records of number of students and there is no limit of n, how many students can be there. Now let us start with an example you want to create a database of a college so let the name of the database be college. Now a database is a collection of tables or entities. So these are the tables that we can create.
one is student information fees information attendance scholarships library so her table k aga attributes ong jais student table attributes and name father name role number class address and contact number and how to place this in a logical manner in a table table form this is what you see here this is not the physical representation physical representation means the memory of a computer system is linear in nature it is never in tabular form okay but this is shown in tabular form because this is just a logical representation now here we have to understand that if this is a table what were the terms that we were talking about So here you can see very clearly in this table we have a large number of attributes at the moment. And sixth this roll number class. address, contact number, father name and name. These all are called attributes. So what are these called?
These are called the attributes or the properties of kiski entity. And what is the name of the entity? The entity's name is student.
So, there are six attributes of the student entity, more than this can be. Now, there is this one entry in this table belonging to Ajit. Now, this one entry is known as a tuple or a record. So we have a number of attributes for our table and then we have a record. And then there is an intersection point.
Intersection point something like this. What is an intersection point? Where a row and a column intersect.
This represents an atomic value. What is an atomic value? A single value.
I repeat a cell means some kind of an atomic value that means a single specific value. Yeh 167 hai kya? This is where Dhruv that is the name and contact number intersect.
That means this is the contact number of Dhruv. Thik hai? Now there can be multiple contact numbers of Dhruv as well but we try our best that within one cell we should not have more than one entries.
Entries should be atomic in nature or if we believe that there is a possibility that there can be more than one contact numbers then within our table we can do something like this one attribute can be contact one and one attribute can be contact two. But we should try that we should have a single atomic values inside the table. So I hope with sincerity that at least this much is clear that what do we mean by a table? What is an attribute? What is a tuple?
What is a cell value which is atomic in nature? So let us go further. So what do we call a database? this is just a simple table so what we call a database so have a look at this example now we have two tables that is t1 table 1 and table 2. so within the table 1 we have three attributes name one name row number and class they can be named as attribute one attribute two and at this is a kind of personal information of a student personal info of a student and in the table 2 you can see a certain information related to the library that is the books issued by the student Is there any interrelationship between the two? The answer is yes.
What is the interrelation? The attribute 2 and attribute 4. That means attribute 2 and attribute 4 are same. So these two tables are related to each other through the attribute roll number.
so now we know that whatever is the name of the student class and roll number has issued the following books but in this table I only know the roll number but now I have to find out that this student has not returned the books for a long time so I will match the name of this student and his class by taking the roll number from here then I will get its name and class so this is collection of two tables there can be a collection of large number of tables and if they are interrelated to each other means the objective is same they may not have or they may not always have a common you can say attribute they all belong to a single database you can even have more than one database within organization you can have five six database like accounts can have one database library can have one database academics can have one database examination can have one database so you can have more than one database as well so i hope the concept now of what is a table and what is our database is clear now why uh do we need a database management system how many data banalia database we need a software or a tool that is able to manage the database so how do we do that following are some of the responsibilities that are performed by the database management system providing support for operations such as insertion deletion and update The responsibility of the database is that the user does not have to manually go and enter, update or delete. You facilitate it. For example, if a user wants to delete the record of a student with roll number 19093, then it is not that he will manually go inside the table and search it.
When you click on the deletion on the database management system, it will ask you who you want to delete. You will enter the role number, you will see the details of that role number, it will ask you, are you sure you want to delete? Yes, and it will be deleted and updated from the back.
Insert means not that you will open that file, you will do minimum entries in the database management system As soon as you press on insert, it will appear. and it will automatically insert fast insertion update if you want to update someone's address similar to deleting you put its search parameter that record will open you can update any entry you want so the basic objective of creating a database management system is to improve these three operations should take less time and should be accurate the second is providing security against unauthorized access to data. I am not authorized. If I am authorized, then only I should be able to make changes in the database.
Otherwise, I should not be allowed the access to the database. So, there are many mechanisms for this. We apply security policies, privacy policies, and authentication.
Authentication can be in the form of username and password But you are afraid that username and password can be guessed Or that person can pass on someone So you want to put a biometric instead of username and password So you put a thumb, device You put a thumb then only the system will get activated This also ensures the physical presence of the person. Thumb is being used in the banking system these days. So, providing security.
Like if you talk about the college system, then there is an examination system and an account system. They both are authorized. They both are the employees of the institute. But still, privacy access control will have to be applied.
Accounts examination database cannot be opened or the examination accounts cannot be opened then for that also you have to apply access control that even though you are authentic but what privacy policy says that you can access to whom and who cannot access to whom and if you can access then what operations you can perform on it for example you all are If you are part of the university system then you have been assigned IDs. You can check your results. But there is access control on that.
It is not like you can go inside the database and make changes. You can say that this grade is very low, I will change it. You cannot do that. because even though you are authorized but you have a limited access control that you can only see it and how much you can see it, there is a restriction on that too third is maintaining the data integrity and consistency what is data integrity?
what is data consistency? to understand this, let us take an example for example if we have account in which 1500 rupees are there, there are a total of 3000 rupees now there is a need of a transaction, what does the transaction says? transaction says transfer 500 from A to B.
This is the transaction. So transaction starts by removing 500 from A but something goes wrong and we are not able to transfer the amount to B. We are not able to transfer to B because something went wrong, the system stopped, the software did not work and what happened now?
Just check the total of the two. The total of the two is 2500 which is not right. It should have been 3000. and now because this entry could not be completed now it is the responsibility of database management system to ensure that either it completes the remaining transaction or it rolls back the remaining transaction so that we reach a consistent state so consistency means the correctness of the data if your database is not correct manually up job which come to the head or naturally go to the host's the head like in database management system and sure cut the IC co e galateen the he who need change next is integrity integrity is a complicated term or just go home logo so much make a little example really sick there for example it student database In which all the details of the students are given where some of the students have their codes There is a library system in which it is told that L1 has issued two books L3 and L4 have issued two books and L5 has issued one This is the current standing Now let us say a request comes for a transaction that student L1 wants to leave L1 wants to leave so what to do?
should we delete L1 from student record? should we delete him? if we delete him then what will happen with the library system?
two books are issued in the library but when he will check the details of L1 so l1 existing that means there is a lack of integrity in the database so there are different mechanisms of maintaining the integrity l1 then only we will be able to remove the l1 so that means the student first of all has to go to the library and ensure that these two entries are cancelled similarly it will have to go into the accounts or just the pending entries house can arm k against it will have to ensure that those are removed similarly to every department once there are no entries to l1 they can be done or people sorry For example, codes are used, student codes or examination codes. Suppose, code 001 is used in one place. Similarly, a table is made somewhere within the database or in some other database, its code is L001 or S001 or S1 is used. Now just see that there are different tables.
Entries are representing the same tuple but the values given are different. This is also called a lack of integrity. When we make a database management system, it ensures that you cannot use your own code. Everyone will have to use a different type of code so that there is no confusion in the system.
So who manages all these things? These things are basically managed by the database management system. Next is backup.
What is backup? When we create a database management system or manage the data, if we save it in one place, then there is a danger that if anything happens to the system, then all of the data will be lost. So what does backup do?
It makes multiple copies of it, sometimes it makes it on multiple locations. And the changes you make in the original database in a day, that time is backup is taken and the duplicate copies that you have saved are updated there. Backup can be done daily or 4-5 times a day, but our data remains consistent by doing backup. In some cases, live backup is also available.
Live backup means that all the entries are being sent in 3-4 locations. simultaneously saved. This increases the reliability of our database.
If something happens, we can recover our data. Next is catalog and directories of the database objects. In object-oriented, if you maintain catalogs, directories, logs, everything, so that we have proper information about our data. It is more readable, someone came, someone left.
we should not face any problem in the company the last is providing support for the user interface packages such as SQL interface there are many languages of the database which have some standards so your database management system should support that language if you are not supporting that language then your database management system is outdated One of the interface languages that we will learn in the lab is SQL. SQL is basically a simple set of statements that are used to manipulate or edit the data. So the last topic that we are going to discuss today, not in too much of detail, is called the components of database.
Hardware. Hardware is the key component of database. to run a database system, naturally you need hardware to run any computer system hardware can be computer systems you can install many workstations you can install servers to save data and the third type of hardware component can be network networking is required, if you are operating it from the internet you need networking devices that enable your database management system to interact with the interface.
Next is software. Very clearly we have said that the software is the actual database management system that will provide all the functionality which we have discussed above. The third thing is data.
Obviously why are we making it? That is to manage the data. So data is an important component of the database management system. Data can come from a variety of sources. Data can be copied from the data entry operator of the daily transactions.
Our old system is copying data from there. We copy data from daily net and put it in our transactions. Like in the share market, we get a link, there is an excel file, what are the opening or closing values of the shares today, we copy it from there and put it in our system.
So data can be copied from there. come from any source but is an important one the last one is procedure procedure refers to the rules and regulations which we follow while designing a database okay procedures are not standard they are rules and regulations which we sit and decide they can be different same kind of problem can be made by two people but it is important important that we follow the procedures. So with this we come to the end of the first lecture today.
So in the next lecture we will discuss some advanced concepts about the database management.