Class XIlth Computer Science INTRODUCTION TO DBMS Shruti Mehra
HISTORY: FILE PROCESSING SYSTEMS In the early days, data were used to store on file processing systems. Drawbacks of using file systems to store data: *Data redundancy and inconsistency-Multiple file formats, duplication of information in different files * Difficulty in accessing data: Need to write a new program to carry out each new task Data isolation-multiple files and formats Integrity problems: V Integrity constraints (e.g. account balance > 0) become part of program code v Hard to add new constraints or change existing ones
*Atomicity of updates V Failures may leave database in an inconsistent state with partial updates carried out E.g. transfer of funds from one account to another should either complete or not happen at all. Concurrent access by multipleusers E.g. two people reading a balance and updating it at the same time. Security problems- Not secure. Database systems offer solutions to all the above problems
WHY DO WE NEED DATABASE'? Storage: According to the principles of database systems, the data is stored in such a way that it acquires lot less space as the redundant data (duplicate data) has been removed before storage. In a banking system, suppose a customer is having two accounts, saving account and salary account. Let's say bank stores saving account data at one place and salary account data at another place, in that case if the customer information such as customer name, address etc. are stored at both places then this is just a wastage of storage, to organize the data in a better way the information should be stored at one place and both the accounts should be linked to that information somehow. The same thing we achieve in DBMS. Fast Retrieval of data: It is also important that we retrieve the data quickly when needed. Database systems ensure that the data is retrieved as quickly as possible.
INTRODUCTION DBMS stands for Database Management System. DBMS Database + Management System. Database is a collection of data and Management System is a set of programs to store and retrieve those data. DBMS is a collection of inter-related data and set of programs to store & access those data in an easy and effective manner.
ADVANTAGES OF DBMS 1. Minimize Data Redundancy In File Processing System, duplicate data is created in many places because all the programs have their own files. This creates data redundancy which in turns wastes labor and space. In Database Management System, the whole data is stored only once at a single place so there is no chance of duplicate data. For example: A student record in library or examination can contain duplicate values, but when they are converted into a single database, all the duplicate values are removed. 2. Data Consistency: Data items appears only once and the updated value is available to users. 3. Sharing of Data :In DBMS, Data can be shared in between authorized user of databases.
4. Backup and Recovery: DBMS solves this problem of taking backup again and again because it allows automatic backup and recovery of database. For examples, if a system fails in the middle of any process then DBMS stores the values of that state in which database were before query execution. 5. Security: Data security means protecting your precious data from unauthorized access. Data in database should be kept secure and safe to unauthorized modifications. Only authorized users should have the grant to access the database. 6. Integrity Constraints: Data stored in database should always be correct and accurate. DBMS provides the capability to enforce these constraints on databasee For example, the maximum marks obtained by the students can never be more than 100.
7. Atomicity: Any complete transaction in database is called atomic unit. It is the duty of DBMS to store a complete transaction in database. If any transaction is partially completed then it roll backs them. For example, in railway reservation system, if user has completed the process of ticket reservation then his record will be stored and amount of money will be deducted from his account otherwise no amount will be deducted and if deducted it will be given back. 8. Concurrency Control: If two users are accessing data simultaneously and they both wantto update values of same record then it may create concurrency. DBMS has the power to control concurrency so that no transactions are lost.
APPLICATIONS OF DBMS Telecom: To keeps track of the information regarding calls made, network usage, customer details etc. Without the database systems. . Banking System: For storing customer info, tracking day to day credit and debit transactions, generating bank statements etc. Education sector: To store and retrieve the data regardingstudent details, staff details, course details, exam details, payroll data, attendance details, fees details etc. Online shopping: Websites such as Amazon, Flipkart etc. These sites store the product information, your addresses and preferences, credit details and provide you the relevant list of products based on your query.
Pursuing B.Tech (CS) | Qualified JEE Mains| Class XII :(City Topper) 96%| Class X: 10 cgpa| Loves to Code and Teach | PotterHead | 2 years'