Docsity

DATABASE MANAGEMENT SYSTEMS, Study notes of Database Management Systems (DBMS)

Toggle sidebar
bg1
DATABASE MANAGEMENT SYSTEMS
(DBMS)
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
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35

Partial preview of the text

Download DATABASE MANAGEMENT SYSTEMS and more Study notes Database Management Systems (DBMS) in PDF only on Docsity!

DATABASE MANAGEMENT SYSTEMS

(DBMS)

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:

  • Computer: 85
  • Mathematics: 92
  • English: 76 and the system calculates that the student has obtained an average of 84.33%, the result is meaningful information. Therefore: Data + Processing = Information

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:

  • MySQL
  • Oracle Database
  • Microsoft SQL Server
  • PostgreSQL
  • SQLite
  • MariaDB A DBMS can be represented conceptually as: USERS / APPLICATIONS | | v +------------------+

| DBMS |

| 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:

  • User authentication
  • Passwords
  • Authorization
  • Roles
  • Privileges
  • Encryption
  • Access control 6.4 Data Integrity Data integrity means maintaining the accuracy and correctness of data. A DBMS provides constraints and rules that prevent invalid data from being entered. For example, a student ID may be required to be unique. A student's age should not normally be entered as a negative number. Integrity rules help maintain reliable databases. 6.5 Reduced Data Redundancy

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:

  • Hardware failure
  • Software failure
  • Power failure
  • Network failure
  • Human error
  • System crash Backup and recovery mechanisms help restore the database to a consistent state. 6.10 Multiple Views of Data Different users may require different portions of the same database. For example, a student may see only personal academic information, while an administrator may access complete student records. A DBMS can provide different views according to user requirements and permissions. 7. Need for DBMS The need for DBMS arose because traditional file-processing systems had many limitations. In a file-processing environment, every application may maintain its own files. For example, a college may have

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:

  1. Deducting money from Account A.
  2. Adding money to Account B. Both operations must be handled correctly. If one succeeds and the other fails, the database could become incorrect. The DBMS uses transaction-management techniques to maintain correctness.