0% found this document useful (0 votes)
4 views7 pages

DataBase Lec 01 Notes

The document discusses file-based systems, highlighting their processing methods and limitations such as data redundancy, difficulty in accessing data, and security issues. It contrasts this with the database approach, which centralizes data management in a Database Management System (DBMS), offering benefits like reduced redundancy, improved data integrity, and multi-user access. However, the database approach also presents challenges, including complexity, high costs, and potential security risks.

Uploaded by

daniyalnaqvi360
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views7 pages

DataBase Lec 01 Notes

The document discusses file-based systems, highlighting their processing methods and limitations such as data redundancy, difficulty in accessing data, and security issues. It contrasts this with the database approach, which centralizes data management in a Database Management System (DBMS), offering benefits like reduced redundancy, improved data integrity, and multi-user access. However, the database approach also presents challenges, including complexity, high costs, and potential security risks.

Uploaded by

daniyalnaqvi360
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

File-Based System: Processing and Limitations

(Extracted from Chapter 1 of Database Systems: A Practical Approach to Design,


Implementation, and Management by Connolly & Begg)

1. File-Based System
A file-based system is an early approach to data management where data is stored in
separate files and managed by different application programs. It was used before the
development of Database Management Systems (DBMS).

1.1 How File-Based Systems Work (Processing)

1.​ Each application program is designed to handle specific files.


2.​ Files are stored separately and managed by the operating system.
3.​ Programs access files directly using low-level commands.
4.​ Data is often duplicated across multiple files.
5.​ Modifications require changes to multiple programs.

Example:​
A university maintaining student records may store student details in one file and
course enrollments in another. A separate application is required to process each file.

2. Limitations of the File-Based System


Although file-based systems were widely used, they had several disadvantages, which led
to the development of DBMS.

2.1 Data Redundancy and Inconsistency

●​ Duplicate data is stored in multiple files.


●​ Updates must be made in all files separately.
●​ Leads to data inconsistency when different copies of data are not updated
correctly.
2.2 Difficulty in Accessing Data

●​ No standardized query language (like SQL in DBMS).


●​ Complex programming is required to retrieve data.
●​ Reports require custom programs to be written for each request.

2.3 Data Isolation

●​ Each file is stored separately and not linked to others.


●​ Cross-referencing data between files is difficult.
●​ Searching across multiple files is slow.

2.4 Integrity Problems

●​ No central control over data validation rules.


●​ Risk of inconsistent and incorrect data entry.
●​ Example: If a student's grade entry is invalid, there is no built-in mechanism to
enforce constraints.

2.5 Security and Access Control Issues

●​ File-based systems have limited security features.


●​ No way to control user access to specific data.
●​ Users with file access can modify all data, leading to security risks.

2.6 Concurrent Access Problems

●​ Multiple users cannot modify files simultaneously.


●​ High chance of data corruption if two users access a file at the same time.
●​ Example: If two users update a student's record simultaneously, one update may
overwrite the other.

2.7 Lack of Scalability

●​ File-based systems are not efficient for large datasets.


●​ As data grows, retrieval becomes slow.
●​ Hard to adapt to new business requirements.
3. Conclusion
Due to these limitations, organizations moved towards Database Management Systems
(DBMS), which provide:​
✅ Centralized data management​
✅ Reduced redundancy​
✅ Faster queries​
✅ Data integrity and security​
✅ Multi-user access

Database Approach

(Based on Chapter 1 & 2 of Database Systems: A Practical Approach to Design, Implementation,


and Management by Connolly & Begg)

1. What is the Database Approach?


The database approach is a method of managing data that overcomes the limitations of the
traditional file-based system. Instead of storing data in separate files controlled by individual
programs, data is stored centrally in a structured format within a Database Management
System (DBMS).

This approach provides efficient data management, reduces redundancy, ensures


consistency, and supports multi-user access.

Key Concept

✅ A database is a shared collection of logically related data, along with its description
(metadata), designed to meet the information needs of an organization.

2. Why Did the Database Approach Emerge?


The file-based system had several problems, including:​
❌ Data redundancy – Same data stored in multiple files​
❌ Data inconsistency – Different copies of data had conflicting values​
❌ Data isolation – Data was scattered across files, making it difficult to access​
❌ Program-data dependence – Any structural changes required modifications in multiple
programs​
❌ Security issues – No centralized access control
To solve these issues, the database approach was developed, where data is stored in a
centralized system and managed through a DBMS.

3. Components of the Database Approach

3.1 Database

●​ A centralized collection of data that multiple users and applications can access.
●​ Data is logically related and stored in a structured format.
●​ Example: A university database stores student records, courses, and faculty details in
one system instead of separate files.

3.2 Database Management System (DBMS)

●​ A software system that allows users to define, create, maintain, and control access
to the database.
●​ It acts as an interface between users and the database.
●​ Examples: MySQL, Oracle, SQL Server, PostgreSQL.

3.3 Metadata (System Catalog)

●​ Metadata is data about data (describes structure, relationships, constraints).


●​ Helps achieve data independence, meaning applications do not need to worry about
how data is stored.

3.4 Users & Roles in the Database Approach

●​ Database Administrator (DBA) – Manages the database, ensures security and backups.
●​ Database Designers – Design the structure and schema of the database.
●​ Application Developers – Build applications that interact with the database.
●​ End-Users – People who access the database through applications.

4. Features of the Database Approach

4.1 Data Independence

●​ Logical Data Independence – Changes in the logical schema do not affect


applications.
●​ Physical Data Independence – Changes in the storage structure do not affect
applications.

4.2 Controlled Access

●​ Security system – Restricts unauthorized access.


●​ Concurrency control – Multiple users can access data without conflicts.
●​ Backup & recovery system – Prevents data loss.

4.3 Data Integrity & Consistency

●​ Enforces rules & constraints to ensure data accuracy.


●​ Example: A student’s ID must be unique in the university database.

4.4 Views

●​ Different users can see customized versions of the database using views, while actual
data remains unchanged.

5. Advantages of the Database Approach


✅ Minimized data redundancy – Single storage eliminates duplicate data.​
✅ Improved data integrity & consistency – Constraints enforce accuracy.​
✅ Better data security – Controlled access to sensitive information.​
✅ Efficient data retrieval – Query languages (SQL) allow quick data access.​
✅ Multi-user access – Many users can access the database simultaneously.​
✅ Scalability – Easily expands as data grows.
6. Disadvantages of the Database Approach
While the database approach offers numerous benefits, it also has certain drawbacks.

6.1 Complexity

●​ DBMS software is complex and requires proper setup and management.


●​ Designing a well-structured database requires skilled personnel (DB administrators,
designers).
●​ Application development using a DBMS can be more challenging than using a simple
file-based system.

🚨 Example: A small company using simple Excel spreadsheets may struggle to migrate to a
full-fledged database system like Oracle.

6.2 High Cost of DBMS Software

●​ DBMS software can be expensive, especially for commercial solutions (e.g., Oracle,
SQL Server).
●​ Even open-source DBMS (e.g., MySQL, PostgreSQL) require setup, maintenance, and
skilled staff, which adds to costs.

🚨 Example: A startup may find it costly to purchase hardware, software, and hire database
experts for managing a DBMS.

6.3 Additional Hardware Costs

●​ A DBMS requires powerful hardware (servers, storage, network infrastructure).


●​ High-end DBMS systems demand large memory and fast processors to handle
transactions efficiently.

🚨 Example: An e-commerce website with millions of users requires a high-performance


database server to process transactions smoothly.

6.4 Increased Risk of Data Breach

●​ Since a single database stores all organizational data, it becomes a prime target for
hackers.
●​ If security is not properly managed, data leaks or unauthorized access can occur.
●​ Strict access control policies, encryption, and backups are required.
🚨 Example: If an online banking database is hacked, customer data and financial records can
be exposed.

6.5 Performance Overhead

●​ A DBMS handles multiple users, transactions, queries, and data consistency


rules—all of which add processing overhead.
●​ Indexes, views, and security checks slow down performance.
●​ Complex queries take longer to execute compared to direct file access.

6.6 Organizational Resistance to Change

●​ Shifting from file-based systems to a database approach requires training employees.


●​ Users accustomed to old systems may resist adopting DBMS-based solutions.
●​ Retraining staff and modifying workflows require time and effort.

7. Conclusion
The database approach revolutionized data management by centralizing data storage,
ensuring consistency, enhancing security, and enabling efficient data access. However, it
also introduces challenges such as high costs, complexity, security risks, and performance
overhead. Organizations must carefully plan their database infrastructure, security, and
maintenance to maximize benefits while minimizing risks.

You might also like