













































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














































Complete Detailed Notes
1. Introduction to Database Management Systems In the modern world, almost every organization depends on data for its daily activities. Banks maintain information about customers, accounts, transactions, and loans. Schools and colleges maintain information about students, teachers, courses, examinations, attendance, and fees. Hospitals maintain information about patients, doctors, medicines, laboratory reports, and appointments. E-commerce companies store information about customers, products, orders, payments, and deliveries. Government organizations also maintain huge amounts of information about citizens, documents, taxation, welfare schemes, and various administrative activities. As the amount of data increases, it becomes difficult to store, organize, update, retrieve, and protect that data using ordinary methods. This requirement led to the development of Database Management Systems , commonly known as DBMS. A Database Management System is specialized software that provides an organized and systematic way of storing and managing data. It acts as an intermediary between users or
application programs and the database. Instead of allowing users to directly manipulate large collections of data, the DBMS provides controlled methods for creating databases, inserting information, modifying existing information, retrieving required information, and deleting unnecessary information. The basic purpose of a DBMS is not simply to store data. A good DBMS must also ensure that the stored data remains accurate, consistent, secure, and available whenever required. It should allow multiple users to access the database while preventing conflicts and unauthorized modifications. It should also provide mechanisms for recovering data when failures occur. In simple words, a DBMS can be understood as a software system that helps an organization store data properly, manage it efficiently, retrieve it quickly, and protect it from unauthorized access or accidental loss. For example, consider a college database. Without a DBMS, student information may be stored in separate files maintained by different departments. The admission department may have one file, the examination department another, the accounts department another, and the library another. This may result in duplicate information, inconsistent records, difficulty in updating data, and
These individual values are examples of data. They may represent a student's name, age, marks, course, and year, but without proper organization and interpretation, their meaning may not be immediately clear. Data can exist in many forms. It may be numerical, textual, graphical, audio, video, or multimedia. In a database system, data is generally organized in a structured manner so that it can be easily processed. Information Information is processed, organized, and meaningful data. When raw data is analyzed and presented in a useful form, it becomes information. For example, if the marks of a student are:
Information helps users understand situations and make decisions. Organizations depend heavily on accurate information for planning, controlling, forecasting, and decision-making.
3. Database A database is an organized collection of related data that can be easily accessed, managed, updated, and retrieved. The important word in this definition is organized. A database is not simply a random collection of files. Data is structured according to relationships and requirements so that useful information can be obtained efficiently. For example, a college database may contain information about: - Students - Teachers - Courses - Departments - Subjects - Examinations - Fees
A Database Management System (DBMS) is software that allows users to create, store, organize, retrieve, update, and manage data in a database. A DBMS provides an interface through which users and applications can communicate with the database. It also provides facilities for security, integrity, concurrency, backup, recovery, and transaction management. Examples of database management systems include:
| Query Processing | | Security | | Transaction Mgmt | | Recovery | +------------------+ | | v +-----------+ | DATABASE | +-----------+ The user does not normally need to know how data is physically stored on storage devices. The DBMS handles these technical details.
5. Definition of DBMS A DBMS can be defined as:
tables or structures and relationships can be established among them. This organization makes it easier to retrieve information and maintain the database. 6.2 Data Sharing A major characteristic of DBMS is that data can be shared among multiple authorized users. For example, in a university database, the administration department, examination department, accounts department, and library may access different portions of the same database. Data sharing reduces unnecessary duplication and allows departments to work with consistent information. 6.3 Data Security A DBMS provides mechanisms to protect data from unauthorized access. Different users can be assigned different privileges. For example, a student may be allowed to view marks but not modify them, while an administrator may have permission to update records.
Security mechanisms may include:
For example, if the physical method of storing a database changes, the user application should ideally continue to work without modification. Data independence is discussed in detail under database architecture. 6.8 Concurrent Access Modern databases are usually accessed by many users simultaneously. For example, thousands of customers may use a banking application at the same time. A DBMS uses concurrency-control mechanisms to ensure that simultaneous operations do not produce incorrect results. 6.9 Backup and Recovery A DBMS provides mechanisms for recovering data after failures. Failures can occur because of:
7. Backup and Recovery Data can be recovered after system failures. 8. Transaction Management DBMS ensures that important operations are completed correctly. 9. Concurrent Access Multiple users can work with the database simultaneously. 10. Data Independence Applications can be separated from physical storage details. 8. Objectives of DBMS The primary objective of DBMS is to provide an efficient and reliable environment for storing and managing data. Major objectives include: Controlled Data Redundancy The DBMS attempts to reduce unnecessary duplication of information. Data Integrity The system should maintain accurate and valid information. Data Security
Sensitive data must be protected from unauthorized users. Data Availability Authorized users should be able to obtain required information when needed. Efficient Data Access The system should provide fast and efficient methods for retrieving information. Concurrent Data Access Multiple users should be able to use the database without causing inconsistencies. Backup and Recovery The system should protect data against failures and provide recovery mechanisms. Data Independence Applications should not be excessively dependent on the physical storage structure.
9. Functions of DBMS A DBMS performs many functions to manage a database effectively. 9.1 Data Definition
WHERE Student_ID = 101; Deleting data: DELETE FROM Student WHERE Student_ID = 101; 9.3 Data Retrieval DBMS allows users to retrieve information using queries. For example: SELECT * FROM Student; This retrieves all records from the Student table. A more specific query can be: SELECT Name, Course FROM Student WHERE Age > 18; 9.4 Security Management DBMS controls who can access which data. For example, an administrator may have complete access while an ordinary employee may have limited access.
9.5 Integrity Management DBMS ensures that data follows defined rules and constraints. For example: Student_ID INT PRIMARY KEY ensures that the student ID is unique and cannot contain a NULL value. 9.6 Transaction Management A transaction is a logical unit of database operations. For example, transferring money from one bank account to another involves: