UNIT-1: Introduction to Database Management System
❖ Data:
• Data refers to raw facts or information stored in a structured format within a database.
• It can include numbers, text, images, or other measurable entities that are processed
and organized to provide meaningful insights.
• Example: Data of a customer like name, telephone number, address, and product
purchased.
❖ Database:
• A database is a collection of related data items stored and managed in a
structured manner within a computer system.
• The data items within a database are logically interconnected, allowing for
meaningful relationships among them.
• Example: A college database stores information about students, teachers, classes,
and subjects (all related data).
❖ Database Management System:
A DBMS is software that helps to store, manage, and retrieve data in a
well-structured way.
Examples: Oracle, MySQL, Microsoft SQL Server.
❖ File System:
• A file system is a way to store and organize data in files on storage
devices like hard drives.
• It allows users to create, read, write, and manage files.
o Advantages of file system:
1. Simplicity:
Easier to implement and understand compared to a database system
,2. Low Cost:
File systems do not require expensive software or complex setups.
3. Performance for Small Data:
Works well for small-scale applications with limited data
4. Custom Storage Format:
Developers can design files in formats specific to their needs.
o Disadvantages of file system:
1. Data Redundancy:
➢ It is possible that some information may be duplicated in different files, leading to
data redundancy.
➢ This results in memory wastage as the data gets duplicated, increasing storage and
access costs.
➢ Example: A student's Name and Roll No are stored in both the Attendance Register
and the Library record.In this case, the Name and Roll No are stored in two places,
causing redundancy.
2. Data Inconsistency:
➢ Data inconsistency occurs when data is not updated in all the files
simultaneously.
➢ Example: The university maintains both academic and financial records. If a student's
name is John, but they update their name to Joe in the academic record, the financial
record may still contain the old name.
3. Limited Data Sharing:
➢ In traditional file systems, each application has its own private file.
➢ It is difficult to share data between applications, as users have little control over sharing
data outside their own application.
4. Difficulty in Accessing Data:
➢ Different types of data are needed at different times and situations.
➢ For example, if you want to retrieve the data of employees who did not take any
leave during a particular quarter, it can be challenging to do so in a file system.
5. Data Dependency:
, ➢ Data in files is stored in a specific format (e.g., using tags, semicolons, or commas).
➢ If the format of the file changes, you need to update all programs that process that
file.
➢ Sometimes, there are multiple programs related to the same file. Missing updates in
one program can cause the entire application to fail.
❖ Advantages of DBMS over File Processing Systems
1. Data Redundancy Control:
➢ In traditional file systems, data can be duplicated in multiple places,
leading to data redundancy. DBMS helps minimize this
duplication by storing data in a centralized, structured manner.
➢ Example: In a university system, student information (name, roll number, address) stored
in both the admission file and the library file could result in redundancy. In a DBMS, this
data would be stored in one table, reducing duplication.
2. Data Integrity:
➢ Description: DBMS enforces data integrity rules, ensuring that the data remains accurate
and consistent across the system. This prevents errors, such as entering incorrect or
outdated data.
➢ Example: A DBMS ensures that the age of a student is a positive number and falls within
a valid range, such as 18-100 years, preventing data inconsistency.
3. Data Security:
➢ Description: DBMS provides robust security mechanisms, ensuring that only authorized
users can access or modify the data. It offers user authentication and access control
features.
➢ Example: A banking system using DBMS can restrict access to customer account details,
allowing only certain employees to view or update sensitive information like account
balances.
4. Efficient Data Sharing:
➢ Description: DBMS allows multiple users or applications to share data simultaneously,
❖ Data:
• Data refers to raw facts or information stored in a structured format within a database.
• It can include numbers, text, images, or other measurable entities that are processed
and organized to provide meaningful insights.
• Example: Data of a customer like name, telephone number, address, and product
purchased.
❖ Database:
• A database is a collection of related data items stored and managed in a
structured manner within a computer system.
• The data items within a database are logically interconnected, allowing for
meaningful relationships among them.
• Example: A college database stores information about students, teachers, classes,
and subjects (all related data).
❖ Database Management System:
A DBMS is software that helps to store, manage, and retrieve data in a
well-structured way.
Examples: Oracle, MySQL, Microsoft SQL Server.
❖ File System:
• A file system is a way to store and organize data in files on storage
devices like hard drives.
• It allows users to create, read, write, and manage files.
o Advantages of file system:
1. Simplicity:
Easier to implement and understand compared to a database system
,2. Low Cost:
File systems do not require expensive software or complex setups.
3. Performance for Small Data:
Works well for small-scale applications with limited data
4. Custom Storage Format:
Developers can design files in formats specific to their needs.
o Disadvantages of file system:
1. Data Redundancy:
➢ It is possible that some information may be duplicated in different files, leading to
data redundancy.
➢ This results in memory wastage as the data gets duplicated, increasing storage and
access costs.
➢ Example: A student's Name and Roll No are stored in both the Attendance Register
and the Library record.In this case, the Name and Roll No are stored in two places,
causing redundancy.
2. Data Inconsistency:
➢ Data inconsistency occurs when data is not updated in all the files
simultaneously.
➢ Example: The university maintains both academic and financial records. If a student's
name is John, but they update their name to Joe in the academic record, the financial
record may still contain the old name.
3. Limited Data Sharing:
➢ In traditional file systems, each application has its own private file.
➢ It is difficult to share data between applications, as users have little control over sharing
data outside their own application.
4. Difficulty in Accessing Data:
➢ Different types of data are needed at different times and situations.
➢ For example, if you want to retrieve the data of employees who did not take any
leave during a particular quarter, it can be challenging to do so in a file system.
5. Data Dependency:
, ➢ Data in files is stored in a specific format (e.g., using tags, semicolons, or commas).
➢ If the format of the file changes, you need to update all programs that process that
file.
➢ Sometimes, there are multiple programs related to the same file. Missing updates in
one program can cause the entire application to fail.
❖ Advantages of DBMS over File Processing Systems
1. Data Redundancy Control:
➢ In traditional file systems, data can be duplicated in multiple places,
leading to data redundancy. DBMS helps minimize this
duplication by storing data in a centralized, structured manner.
➢ Example: In a university system, student information (name, roll number, address) stored
in both the admission file and the library file could result in redundancy. In a DBMS, this
data would be stored in one table, reducing duplication.
2. Data Integrity:
➢ Description: DBMS enforces data integrity rules, ensuring that the data remains accurate
and consistent across the system. This prevents errors, such as entering incorrect or
outdated data.
➢ Example: A DBMS ensures that the age of a student is a positive number and falls within
a valid range, such as 18-100 years, preventing data inconsistency.
3. Data Security:
➢ Description: DBMS provides robust security mechanisms, ensuring that only authorized
users can access or modify the data. It offers user authentication and access control
features.
➢ Example: A banking system using DBMS can restrict access to customer account details,
allowing only certain employees to view or update sensitive information like account
balances.
4. Efficient Data Sharing:
➢ Description: DBMS allows multiple users or applications to share data simultaneously,