Database Assignment
Database Assignment
13
SARA IMRAN
F2023105143
Database systems (Y3)
Assignment#01
Submitted to:
SIR HAMID RAZA MALIK.
1
2 2 of
13
Abstract
File Management Systems (FMS) are foundational components of early data storage and
retrieval technologies. Before the widespread adoption of Database Management Systems
(DBMS), organizations relied on file-based systems to manage and manipulate data. An
FMS enables basic operations such as data storage, retrieval, updating, and deletion by
interacting directly with files on storage media. This paper explores the structure,
functionality, and ongoing relevance of File Management Systems in database
environments. It discusses the core role of FMS in supporting essential data operations
and highlights its key limitations, including data redundancy, lack of integrity constraints,
limited querying capabilities, and security concerns.
2
3 3 of
13
Components of a File Management System
The file system interface allows users and applications to interact with the file system. It
includes commands for creating, deleting, and modifying files, as well as organizing
them into directories and subdirectories. The interface ensures a user-friendly experience
when dealing with complex file systems.
These tools aid in searching, indexing, and managing files. Some tools also provide file
version control, enabling users to track file changes over time. File management tools are
critical for businesses dealing with large amounts of data and require quick retrieval and
high accuracy.
File organization is about how files are structured within the system. It involves
organizing files into directories or folders to streamline access. Metadata plays a crucial
role by storing information about each file, such as its size, creation date, modification
history, and access permissions, ensuring that files are easily identifiable and accessible.
In the early days of computing, before the advent of modern database management
systems (DBMS), organizations relied on file-based systems to manage their data. These
systems used file formats such as text files, CSV, or proprietary binary formats to store
data. File Management Systems played a pivotal role by enabling users and programs to
access and manipulate data directly from these files.
An FMS provides various functionalities that support database operations. These include:
The FMS is responsible for managing the physical storage of the data. In a
DBMS, when data is stored in tables or indexes, the FMS determines how and
where to store these data elements on disk.
Efficient retrieval: The FMS ensures that data is stored in such a way that it can
be quickly retrieved when requested, optimizing performance and minimizing
access time.
3
4 4 of
13
2. File Organization and Structure
The FMS supports file organization methods such as sequential, indexed, and
hashed files. The structure of these files is critical in how quickly data can be
retrieved, updated, or deleted.
For example, an indexed file may use an index to speed up data retrieval, whereas
a sequential file organizes records in a linear order, suitable for batch processing
tasks.
File integrity: The FMS ensures the integrity of the files by preventing data
corruption due to disk failures or system crashes. It provides mechanisms to
maintain the consistency of the data stored in files, which is critical for
transactional systems within DBMS.
Atomic operations: The FMS works with the DBMS to ensure that data
modifications (inserts, updates, deletes) are performed atomically, meaning either
the entire transaction is committed, or none of the changes are applied (rollback
in case of failures).
The FMS plays a vital role in data backup and recovery mechanisms within
DBMS. It provides tools to periodically back up data files and restore them in the
event of a system crash or hardware failure.
Transaction logs: The FMS may work alongside transaction logs that track
changes made to the database, ensuring that if a failure occurs, the system can be
rolled back to a consistent state.
The FMS is responsible for managing file access control. It ensures that only
authorized users or processes can read, write, or modify certain files. This is
especially important for DBMS security, where sensitive data needs to be
protected.
Access permissions: The FMS enforces read/write permissions on data files,
limiting unauthorized access or modification, which is vital for maintaining the
confidentiality of the data.
4
5 5 of
13
6. Concurrency Control
When multiple users or applications are accessing the DBMS concurrently, the
FMS plays a role in managing file-level concurrency control. It ensures that data
modifications are handled in such a way that one transaction does not interfere
with another, preventing issues like data inconsistency.
The FMS coordinates with the DBMS’s locking mechanisms to ensure that only
one process can modify a file at a time while allowing concurrent read
operations.
Compression: To optimize storage and reduce disk usage, the FMS may use
techniques like file compression, where data files are compressed to save
space without sacrificing retrieval speed.
Space management: The FMS ensures that disk space is allocated efficiently by
maintaining a free space manager that tracks available storage. This is
important for managing large databases and ensuring that there is enough space
for future data growth.
Although FMS lacks the sophisticated features of DBMSs, such as complex
querying or transaction management, it is still widely used where simplicity and
performance are prioritized.
Index files: The FMS works in tandem with the DBMS to manage
indexes on database tables. Indexes improve the speed of data
retrieval by providing a faster way to locate records in a large
dataset.
The FMS also manages search optimization by maintaining
index files that allow the DBMS to quickly locate records
without having to scan entire tables.
6
7 7 of
13
10. Storage Management
Despite their advantages, File Management Systems come with several limitations and
challenges:
8
9 9 of
13
These limitations have led many organizations to adopt more advanced DBMS solutions.
However, understanding these issues is crucial for effectively working with or
transitioning from FMS-based systems.
The application, developed in Python, used the csv module to interact with these files. It
allowed the store manager to:
This simple file-based system met the business requirements without incurring the overhead
of a full-scale DBMS. While not suitable for larger businesses, it exemplifies how FMS
can still be effectively used in niche applications.
Conclusion
By examining real-world applications such as small retail inventory systems, we can appreciate
the continued utility of File Management Systems. As technology evolves,
9
1 10 of
0 13
FMS will likely retain its place in specific domains, serving as a reliable and
straightforward method for managing data.
References
1. Silberschatz, A., Korth, H. F., & Sudarshan, S. (2020). Database System Concepts
(7th ed.). McGraw-Hill Education.
URL: https://www.db-book.com
This is a widely used textbook that explains fundamental concepts of database systems,
including file organization and file-based systems.
Offers in-depth discussion on database models and contrasts between file-based systems
and DBMS.
Highlights the key differences between traditional file systems and modern DBMS.
Helpful for the practical case study part involving inventory systems using file-based
storage.
1
0
1 11 of
1 13
A File-based Data Management System is a system for managing data through files
stored on a computer system. These systems are considered as the predecessors of
modern database systems. They are mainly used to manage simple data structures,
especially for home users and small businesses.
1. Data Redundancy:
a. Multiple copies of the same data may exist in different files.
b. Redundant data leads to inconsistencies when data is updated in one file
and not in others.
2. Data Isolation:
a. Data is stored in various files, making it difficult to access and integrate.
3. Data Integrity Issues:
a. Ensuring accuracy and consistency becomes a challenge in a file-
based system.
4. Security Constraints:
a. There is no robust security mechanism for access control.
5. Concurrency Access Problems:
a. File systems usually don’t support simultaneous data access by
multiple users.
1
1
12 12 of
13
Good for Small Applications: Works well for single-user or small-
scale applications.
Conclusion:
File-based systems work best for simple applications but have critical limitations in
handling large-scale, multi-user data management requirements. As a result, they have
mostly been replaced by more sophisticated database systems in modern applications.
File System:
A file system is software that manages and organizes files on a storage device. It provides basic
functionalities such as storing, retrieving, naming, and organizing data files.
Commonly used file systems include NTFS, FAT32, and ext4.
12
13 13 of
13
DBMS:
Key Differences:
13