 technology working at Pristhagandra Henrico State Open University and today in this video I'm going to talk about file structure. So in this video I'm going to talk about data, information, record, files and the DBMS. So first of all let us know what is data and information. So for that let me explain by using an example. So for example let me take the temperatures for a particular place say Bwahati for the last 100 years. So now when we observe the temperatures for Bwahati in the last 100 years, simply these are just certain data. But when I put it in the context whether the temperatures are rising over the last 100 years or if they are decreasing over the last 100 years, then we get a particular information that whether global warming has taken place. So that kind of information from the data. So when we analyze it we get the information. So if we look at the definition now, then data refers to a set of facts or just statements like the temperature. Whereas when the data is processed, organized, structured or presented in a given context then it becomes information. So organized or structured data which is useful in some way becomes information. So there is a big difference between data and information. Data is the raw material from which information is produced. Now let us look at what is a record. So the record can be said to be a collection of fields of information. It can be numeric type, character type or alpha-numeric type. So for example if you look at the slide here, so I have taken an example of a record when we have the student name which is one field of information, then I am taking the student role number which is another field of information, then the course name and the percentage. So here in this record we can see that the student name and the course name is will be of the character type. Whereas the student role number it can be under numeric type or alpha-numeric type. Similarly the percentage that the student has got it will be of the type numeric. So our record can have a different or similar data types of information or fields of information. So this together they make a record. Now next we have files. It is collection of related records of information. So the information is stored as records and then the collection of these related records they can be stored as files. So now for example if you look at the slide so we have a collection of four records here. Where we have the student name, role number, course name and percentage that they have obtained. So here what is the percentage that a particular student have gotten then how do I do it? I can find out using the student name but if you look at this example I have used two similar names that is Rahul Sharma is in the first record and again there is another Rahul Sharma in the third record. Now I want to uniquely identify what that one particular Rahul Sharma has got. So for that we use a certain unique identifier for a record which is known as a key. So here in this in this file the student role number can be the unique key because the role number of each of the students are different and it can distinguish each record uniquely. So that is the job of a key. So in this example the student role number will be the key. Let us discuss on the different operations that can be done on a file. So first of all the first operation that comes to our mind will be the creation. So before doing any other operation we need to create a file. So we do that using the creation operation. So now in the creation operation we create a file and then the file has been allowed some space in the computer's memory. Then we have to open operation. So now in the open operation we already have a file that has been created and now we need to open it and for opening it we can open it either in a read mode or in a write mode that is we can open the file for simply reading some information from it or we can open it to write some information to it. So this is the second operation that can be done on files. Now if you look at the third operation that is read. So in the read operation we simply open the file and then we can simply read whatever information is placed in the file. So by default in the read operation the pointer it always points to the first location of the file. Similarly we have the write operation. So in the write operation if you want to write something in a file then we use this operation. Here also by default the pointer will be pointing to the beginning of the file. Now next we have to repositioning within a file. So now repositioning within a file operation it gives us a file pointer say for example fc. So it will use this function to take the pointer to any place where we want to write or from where we want to start reading. So it will just move the file pointer from one point of location to another within the file. Then we have the delete operation. Now the delete operation is used to delete the file completely. So using the delete operation not only the file will be deleted, contents of the file will be deleted but the file itself will also be deleted. So this means that the memory that the file was occupied that memory will also be cleared. Now next we have the truncate operation. So there is a difference between the delete and the truncate operation. Now in the truncate operation what we want is we have a written file and then we want to delete the contents of the file but not the file itself. So suppose for example I have a file where I had the names of the students that passed out in the 2018 bench. Now I want the same file to hold up contents of the students those is passed out at 2019. So whatever details of 2018 students I will truncate it so those details will be deleted and now I can insert new details here for the students of 2019 bench. So to truncate and delete the major differences then truncate the whole file will not be deleted only the contents will be deleted and this saves us time to the seven operations that can be done using on file. So now we are learners let us look at the database approach. So database is a collection of related data and the databases are organized by fields, records and files. Now here field is a single unit of information and a record is a set of fields and a file will be a collection of records. So now the database can be saved to be a collection of related files about anything. So it can be a student information database it can be a library information database so these are some of the examples of databases. Now if we look at the term DBMS which means database management system these are some computer software applications that help the users to store and analyze data. Now it can be saved to be a collection of data software hardware and applications that help to create and manage our database. So some of the common examples of databases are MySQL, Microsoft SQL Server and Oracle. In the slide you can see we have an example of a database. Now this database consists of four files. So the first one is student information then we have the course information then we have the grading information and lastly the four files that library information. So this can be a database for a particular university. So for example it is containing the student information that is the student role number and the student needs in the file for student information then all the course information that has been provided by the university can be stored in the course information file. Then the grading information that is whatever is to what the grade the student has got in a particular semester can be stored in the grade information. Then lastly we have the library information where we have the list of books and we have a list where we know which student has taken which book from the library. So all this together we are a set of files which together is a database example. Let us look at the characteristics of the DBMS. So the first characteristic is concurrent use. So this means that several users will be able to access a database concurrently. Now here the database is able to retrieve the information for different queries for different users using the same data. So the data will be sent to the control and there won't be any redundancy of the data. And now concurrently we can have different users say user one, user two, user three and all of this can use the database simultaneously. So this is our concurrent use. The next is structured and desperate data. So the essential information about database is that it is not only stores and maintains the data but it also maintains the entire description and definition of the data. So for example in the earlier example we had a student information. So database not only contains the student information that is the student name and the student role number but it also contains the definition or description of this information. That is how many letters can be there in a student name say 40. So what kind of description will be for a student role number whether it will be numeric type, whether it will be alphanumeric type. So all this description will also be contained in the database. So the description and details about the structure, the type, the format of all this data and the relationship between this data are also included in the DBMS. Next characteristics if we see is data integrity. Now here data integrity it refers to the reliability and the quality of data in a database system. So it also includes the protection part of the data from unauthorized users. So if we have a database table in the earlier example for tables and if only the university officials are allowed to access those files. So now a student will not be allowed to access those files. So that is the protection of data that only a particular authorized users will be able to access the database. Next we have transaction. So our transaction is a set of actions that are performed within a database to take from one consistent state to another. So here the transaction can be seen as an atomic statement that is it cannot be divided further along and then this whole statement will be either it has to be completed in full or none. Transaction here. Next we have data persistence. So now data persistence means that in a database all the data is maintained as long as it is not deleted explicitly. So until an authorized user deletes that data that I want this to be deleted that data will remain in the database system. Next we have data views. So a database has many users and each of these users depending on their access rights and queries for one day they can have their own individual views. So for example as a student my database access can be limited only to the student table or only to the library table. I may not have an access to the course information table but as an administrator he will have the access to all of the tables. So in that way a query depending on the whoever has asked that query so we will have different views of the database. So these will be the characteristics of the database. Next let us look at the objectives of the database. It is to provide efficient storage management and retrieval of data that is a database should be able to provide efficient storage we should be able to keep all the data and we should be able to manage it and whenever a user has asked for some data we should be able to retrieve that data. Next there should be a reduce of data redundancy. So since the data is centrally located so definitely the data redundancy part will be less. Also the next is providing data independence and then sharing of data. The third next point is providing data security from unauthorized access and use. So only the authorized persons will be able to use the particular Next handling different user views of the same stored data and being adaptable and scalable according to the user requirements. So these will sum up the objectives of a database. Next let us look at the advantages of database. So some of them are it helps in controlling redundancy then the concurrent access is allowed in a database. We also have data integrity which can be imposed then a sharing of data is also possible between different users. We also there is also protection from unauthorized access and users of data. Now in the database data recovery and backup is also possible. Also the time and cost needed will be less in a database. Also there are many different tools that are available for easy access of a particular database and inconsistency that was there in the file systems can be easily avoided in a database since it is centrally located. Now let us look at the disadvantage of database. So now if we have if our system that we have is not very complex in nature then it would be advantages for us to use simply use a file system rather than a database. So that is one of the disadvantage of database that it is more complex than the file systems. Next the performance time that is needed for the simple applications may be more in a database. Also the cost may be high depending on the function and that is provided in the database as compared to the file systems. So with this I come to the end of this video. Thank you for watching this video.