1 Database Management Systems:Introduction
1.0 INTRODUCTION
In this series of lectures, we will be looking at the subject database management systems. And for today I will be highlight the basic concept relating to database management systems. To start with let us generally go with the hierarchy of database. Initially all the records are stored as facts. From the facts we start deriving on data. Which we say it as processed facts are nothing but data and all the processed facts are then converted into information. And this information after a small process provides knowledge and a very good knowledge gives you a complete wisdom. So we look at the hierarchy something like this, but let me put it as with a small example, facts raw facts are nothing but I provide different numbers here. 0,1,2,3 numerical numbers as raw facts. But when I present all these raw facts this becomes a data and if suppose I am to process on this data I just segregate all this data and I say that this becomes information. So the information hidden within this particular data is 044 represents the STD code of a particular country 2235 refers to the area code of a particular place and 8570 is your unique id. So after processing this data this is been transformed into information. This information is then converted into a good set of knowledge having mentioned the area code, the STD code and the unique identification number, to a set of users it gives a complete wisdom. So now that we start explaining about the concept of database. In 2008, Wikipedia has come out with this small definition of a database which is nothing but a structured collection of records per a data. Which explains something about this a database is a organized, machine readable collection of symbols we say organized machine readable collection of symbols to be interpreted as a true account of some enterprise. So what sort of enterprise require all these all organized set of data. Today we are exposed to multiple applications starting from rail ticket reservation, banking applications and so.
2.0 LEARNING OUTCOME
The learner will be familiar with the introduction to database management systems. The development of relational database by E.F.Codd is also discussed in this module.
3.0 RELATIONAL DATABASE – E.F.CODD
So now that we are continuing with the database E.F Codd who has basically derived on the principle behind why a database is needed. So E.F Codd first published the concept of a relational – in 1980s. So it was between 1970s and 1980s E.F.Codd has come out with a concept of a relational database , we will say what relation actually mean so somewhere in the late 1970s and the early 1980s E.F Codd derived on the necessity of all this relational concepts towards these database systems and – satisfy a wide range of users as I have talked about administrators programmers users and within the users we have different users who are to be given at most concentration and their requirements might also vary so for them we have to give them a complete satisfactory application which has a database can provide. Now we will talk more about the variable I have mentioned in the first definition towards database as we have pointed out database is an organized machine readable collection of variable now that we will what are those collection of symbols. Now that I am creating a table with three different values three different columns one is called the student ID , the second one is name and the third one is course ID.
As you might know this is for a particular student who has to enroll for a particular course either in a center or at a university or at a college, so this quite well known application and it is a very simple table to be constructed with. Say initially what a student knows is only this particular name database where there’re are different students named starting from Kannan and there are different courses available within that particular centre or college or university and this student has to be provide with a identification number student ID, that is also been given. Now that this is the basic relational theory that we are trying to provide, the fundamentals of mathematics talks about relations and every student is to be provide with an unique identification number so Kannan has got an unique identification number likewise for Geetha there is an unique identification number for every name corresponding unique identification number is mapped and it is needless to say one student need not register to one course Id it can be mapped to more than one course ID. So since this application is quite common I am taking this as an example. And how do we is the main thing we are about to look at. A student S1 named Kannan is enrolled towards CP9050. So now that I am trying to read it row wise S1 is named Kannan and is registered for the course ID CP9050 as of this case is concerned this table is concerned I am trying to provide every rows uniquely with a course ID. So S1 is registered to course ID CP9050 S2 with CP9158 likewise every student is about to register for one particular course which is unique in this table. But hem as I have talked about where sis the concept of enrollment ere. I have not defined a word enrollment anywhere e in the previous table, if you look at the previous table I have not introduced the word of enrollment here. IT is all about student ID, name and course ID. But then since it is to a particular course, course requires enrolment. For this reason I a saying this course is to be enrolled So we haven’t used the word enrolled in the column, then how are these things to be interpreted. So now that I create variable which is called enrollment , so enrolment is being a table name for this particular table so I call the table name forth this particular table as enrollment and within enrolment student 1 is getting enrolled to a subject called to CP9050 student 2 Geetha is enrolling to subject CP9158, so from this particular table with the collection of variable I am defining every student as student S1 with where S1 is your Student ID named Kannan which is also been defined in a column is enrolled on a course ID CP9050. Likewise student S2 named Geetha this is to be interpreted and read like this.
This said a database typically involved all this table structure rows and columns. But then there has been no relations – as part of this table structure .,So relational database is one whose symbols are organized into a collection of relations. So wherever we are trying to combine with relations we call them as relational database. So relation is a formal term used in mathematics as I have already told you. Now that we are getting deeper into databases where it is not just as database it is going to be maintained, it is to be maintained as a management system where we organize and store all the information store and retrieval is about management systems, So it is not just about organization and leave the application as such. But then we have to organize all the items store and as when we require we may have to retrieve from the database. So we are about to define what a dbms would mean a piece of software for managing databases and provides access to them. A dbms responds to commands given by application program custom written or general purpose program executing on behalf of the users so as the user might find it interesting whatever application programs that he wants to use say you go into google.com and you generally whatever keywords you wanted. It has already been stored in some of the servers that It has been available that keyword is getting retrieved from the corresponding database and it is updated to your screen. So that is how it is happening so that entire system is called a database management system which corresponds to the commands given by an application program custom written or general purpose executing on the behalf of the users. And these database management systems are generally written by using database language we prefer to use sql as one of the languages to this database management system.
4.0 AN EXAMPLE SCENARIO
For every day’s transaction In case of a banking application this banking application gives us day wise debit and credit statements and it is in an organized format. So we call this type of system as a database system which is machine interpretable, machine readable, collection of symbols. To continue with it, this can even be updated. It is not readable it can be updated. So it is also a component of a database where say a database is machine updateable too which means in a previous definition I have given a statement called machine readable where I read the credit and deb statement now that we wish to transfer some amount to different accounts then it should be updatable also. And is a collection of variables we will look what are those variable in detail. A database is a typically available to different community of users, so there are different groups of users who will be using this database few are called as database administrators and few are called as database application programmers and few are the generalized users, with possibly varying requirements. So for database administrators there will be a definite set of requirements for programmers there may be different set of requirements and the users they might want to use typically what has been developed as a software. So we concentrate on the different components of the users, some of the major application areas pertaining to database include supermarket application where ewe purchase a lot of items for today we have online supermarket where a list of items have been given along with its quantity and price. So all these values are entered into database a particular customer a particular logs in after having given a login and a password then that particular customer’s account is completely maintained and this transaction is taken care. Likewise e purchasing using your credit card is also an example of database application likewise for travel agency we can book holidays the entire travel as a package can be handles as a dataset. Something with — where all the books pertaining to a library is being maintained insurance renting a video internet studying at an university where all the content materials like what we are doing right now can all be stored as a table.
5.0 SQL – AN INTRODUCTION
SQL stands for structured query language. This SQL we will talk about sQL also in detail the responses of the SQL include completion code, messages and results of the queries. So as I have already told you management system is all about storing managing and retrieving values is we talk about database management system or we define dbms are a set of software tools that control access organize store manage retrieve and maintain data in the database. I repeat software tools that control access manage store manage retrieve and maintenance data in the database. So any management system that you consider it talks about these concepts where we store mange retrieve and maintain and top of it we control access organize towards – and database management system typically depends on a query language so we will go in depth of what query language will mean now lets – a query is an expression when evaluated yields some results derived from the database. So if you look at a common search engine like google where we query whatever we type on the textbox is general a query we say what is the definition of a database although the definition is what we are expecting these are returned as keywords and this is been assumed as a query within the database so that is what we have talking about it is generally as expression that when evaluated yields some results, so the results that we are expecting out of this system is sa definition of a databases from different servers which have been stored tad to retrieve the result. So when evaluated yields some result derived from the database, dbms supports some kind of command to evaluate a given query the command format generally for a SQL statement generally will be select * from so this is general statement that we flow with the SQl language but then this is not the only language that is available there are multiple languages we talk more about SQL in this particular program. So dbms – to evaluate a given query and make the result available for access also using dbms command for application programs. So what has this dbms do. So dbms can create and destroy. So create is something like creating a new ones, and destroy is like deleting what is already been available.
6.0 QUERYING THE DATABASE – AN EXAMPLE
So this database management system can create a new query or o create a new variable can create a new row column something like that . And destroy delete all these variables as and when needed. So point number 2, it takes note of integrity rules integrity rules are something like constraints that are mapped towards the application. There are certain limits that ware posed to a query when is to be executes say if suppose a student can be enrolled only after joining for a particular program assay for B.Tech computer science and engineer, after joining for a program of B.Tech computer science and engineering, a student is to enroll for different course. It such is case constraint that is given is after enrollment after joining the program a constraint here is after joining the program the system checks for whether the students has joined for the program, then only it initiates – o a new course. And point number 3 t – and authorization we already know it makes you understand who are the different groups of users who can be given access with. And what type of access can be given to this particular group of users. Say not all the person can be able to delete whatever they have been doing with only certain people can – and certain other people can create certain utilize likewise it authorization can be given at the creation of database monument system. Not only about creation and deletion it also update. So the variable can be inserted can be created can be updated can be delet3d these are the four different management or manipulation systems that can be done within in the database management systems . and it provides the results of queries which is basically what all users might need. So when we talk about dbms , dbms can insert create delete update and it has to come within the limits of integrity constraints and integrity rules and people are clearly distinguished of what sort of authorization given for what kind of users, and it generally provides the results of all the queries. So whenever we talk about the database we start with file based system which cis not a – file based system are nothing but a collection of application programs what perform services for the send users. All the application program or the services that are gotten are generally stored as reports. So now each program defines and manages its own data. So we will go with this particular example a file based processing where we have got an application called sales we have got an application called contract and we need to store all these files in to a database this is the symbol that we use for a dataset generally it will be looking like a cylinder and these sales might have to interpret with data entry and create a report. So whatever the user feeds in as part of the sale those are stored ass a report or with a specific file format and their files are handle as a separate routine and creates a file definition
7.0 ISSUES IN REAL TIME IMPLEMENTATION:
This is for a particular application called sales application program and there is another concept relating to the same application which is called contract management where naming the data entry happens and are being created – field definition is being handled which takes it through a contract file now when we look at the how many files got created here we have hot two different files created field 1 is about a sales file and database 2 is about contract files when we look at sales file I create a table name for property for rent where it has a list of attribute and I create another table which is called private owner which has a list of attribute and I create third table called client . these files as are required to store all the database of a particular client who is not a private owner who is a private owner and he is letting his property for rent so sales file require only those component of people who are private owner and who is about his property likewise a contract field here the same client – but he is for another purpose which is called ;lease this is for a particular duration so he will take up a separate file three tables are being created of r a different purpose is there are two different purpose under which these databases works with which lead us to the creation of unnecessary problems like this. When we work on the file based system it creates a separate a file handling system and the data are being unnecessarily been isolated which actually leads us to each program maintains its own set of data users of one program may be unaware of the potentially useful data held by other programs there might be some users ending their property but then when given an option of leasing the same owner might be interested to go with the lease also these reports were to be handled separately they may be not be aware of the sales department the contract department. So – because of this isolation a particular owner is unaware there is another file what is to be leased and he is award to the is being rented so other possibility be duplication of data the same data that is held with – application what I have shown property for rent and client is being repeating redundant between these two application and only lease and properly for rent is maintained separately.
8.0 SUMMARY
This session defined database management system. Further this discussed about relational database and its characteristics. Then, we dealt with the introduction to structured query language. Also we discussed the concepts with a few examples from real life.
Web Links |
http://en.wikipedia.org/wiki/Database |
http://www.techopedia.com/definition/19782/hierarchical-database |
http://en.wikipedia.org/wiki/Flat_file_database |
https://mhaadi.wordpress.com/2010/10/18/the-evolution-of-database/ |