0% found this document useful (0 votes)
19 views11 pages

Database Assignment

The document provides an overview of database systems, explaining the definition of a database, its components, and the differences between database management systems (DBMS) and file processing systems. It covers the roles of a DBMS, data independence, and the distinction between logical and physical data models. Additionally, it includes real-world examples of database systems in use, such as hospital management, online shopping platforms, and university management systems.

Uploaded by

tayyabxardar007
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)
19 views11 pages

Database Assignment

The document provides an overview of database systems, explaining the definition of a database, its components, and the differences between database management systems (DBMS) and file processing systems. It covers the roles of a DBMS, data independence, and the distinction between logical and physical data models. Additionally, it includes real-world examples of database systems in use, such as hospital management, online shopping platforms, and university management systems.

Uploaded by

tayyabxardar007
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

COMSATS UNIVERSITY ISLAMABAD, DHAMTOUR

CAMPUS

Course: Database Systems


Section: 5B
Instructor: Ayesha Bibi
Submission Deadline: 21 April 2025
Submitted By: Tayyab Shahid
Reg#: SP23-BCS-052

SECTION-A
QUESTION# 01:
Define a database and explain how it differs from a file processing system.

➢ Database:
A database is an organized collection of data that is stored and accessed
electronically. Think of it like a digital filing system where information is kept in a
structured way so it can be easily retrieved, managed, updated, and analyzed.

• Key Points:
Data can be anything: names, numbers, files, etc.
Organized typically in tables (rows and columns) when using relational databases.
Managed using a Database Management System (DBMS) like MySQL,
PostgreSQL, Oracle, or MongoDB.
➢ File Processing System:
A file processing system is an older way of storing and managing data using files on
a computer, without a dedicated database management system (DBMS).
➢ Difference Between Database and File Processing System:

→ Data Storage

• File System: Data is stored in individual, separate files (e.g., .txt, .csv).
• DBMS: Data is stored in structured tables within a centralized database.

→ Data Redundancy

• File System: High redundancy – the same data may be repeated in multiple files.
• DBMS: Low redundancy – data is normalized and stored once.

→ Data Integrity

• File System: Difficult to enforce rules for valid data.


• DBMS: Integrity rules (like primary keys, foreign keys) maintain valid and consistent
data.

→ Data Consistency

• File System: Changes in one file may not reflect in others, causing inconsistencies.
• DBMS: Automatically maintains consistency across related tables.
→ Security

• File System: Limited or no access control; anyone can access files.


• DBMS: Provides user authentication and access control for better security.

→ Data Sharing

• File System: Data sharing is limited; concurrent access may cause errors.
• DBMS: Supports multiple users accessing data at the same time safely.

→ Querying

• File System: Manual coding required to search or filter data.


• DBMS: Easy querying using SQL (Structured Query Language).

→ Backup and Recovery

• File System: Backups must be done manually.


• DBMS: Automatic backup and recovery features are available.

→ Data Relationships

• File System: Relationships between data must be manually handled.


• DBMS: Handles relationships automatically through relational models.

→ Scalability and Efficiency

• File System: Not suitable for handling large or complex data.


• DBMS: Designed for performance, scalability, and large-scale data management.

QUESTION# 02:
What are the major components of the database environment?

➢ Hardware
• The physical devices used in the system.
• Includes servers, storage devices, and network infrastructure.
• Supports data storage and processing.

➢ Software
• The actual Database Management System (DBMS) software like MySQL, Oracle,
PostgreSQL, etc.
• Also includes any related software such as the operating system, utilities, and application
programs.

➢ Data
• The core component of the environment.
• Refers to all the stored information — tables, records, metadata (data about data),
indexes, etc.

➢ Users
• People who interact with the database. They can be:
Database Administrators (DBAs): Manage the database, handle security,
backups, and tuning.
Developers: Write code to interact with the database.
End Users: Use applications to access data (e.g., customers, employees).
System Analysts: Design the database structure based on business needs.

➢ Procedures

• Rules and instructions for using and managing the database.


• Includes guidelines for backups, recovery, access control, data entry, and maintenance.

➢ Database Access Language


• The language used to interact with the database.
• Example: SQL (Structured Query Language) for querying, updating, and managing
data.

➢ Data Models
• Logical structures that define how data is organized and related.
• Types include hierarchical, network, relational, and object-oriented models.

QUESTION# 03:
Describe the role of a DBMS in a database system.
➢ Role of DBMS in a Database System:
A Database Management System (DBMS) is software that manages data in a structured
way. It acts as a bridge between users and the database.

• Key Roles:

1. Stores data efficiently on disk.


2. Retrieves data using queries (like SQL).
3. Manages data updates (insert, delete, modify).
4. Secures data with user access control.
5. Ensures data accuracy and consistency.
6. Handles multiple users accessing data at once.
7. Backs up data and supports recovery after failures.
8. Maintains transactions safely (using ACID rules).

QUESTION# 04:
What is data independence and why is it important?

➢ Data Independence:
Data independence means the ability to change the structure of a database without
affecting the applications or programs that use the data.

➢ Why is Data Independence Important?

• Flexibility – You can improve or update the database structure without breaking
programs.
• Reduced Maintenance – Less work to update apps when the database changes.
• Improved Performance – Physical changes can optimize performance without user
impact.
• Data Abstraction – Supports separation of data layers (logical, physical, user view).

QUESTION# 05:
Explain the difference between logical data model and physical data model.
➢ Logical Data Model
A logical data model represents the structure of data, including entities, attributes,
and relationships, without worrying about how the data will be stored [Link] is used to
design the business view of the database and is independent of any DBMS.

➢ Physical Data Model


A physical data model shows how data is actually stored in the database [Link]
includes details like data types, indexes, constraints, and file [Link] is dependent on the
specific DBMS (like MySQL, Oracle, etc.).

➢ Difference Between Logical and Physical Data Model


Feature Logical Data Model Physical Data Model
Abstract structure of data and Technical implementation of the
Definition
relationships database
What data is stored and how it's How data is stored, accessed, and
Focus
related managed
Data types, indexes, constraints,
Includes Tables, attributes, relationships, keys
storage
DBMS
No Yes
Dependent
Low-level (technical)
Level High-level (conceptual)

SECTION-B

QUESTION# 01:
List and explain three real-world examples where database systems are used. For each example,
describe:
o The type of data stored
o The stakeholders/users involved
o Why a DBMS is preferred over a manual system
➢ Hospital Management System

→ Type of Data Stored:

• Patient details (name, age, contact)


• Medical history and diagnoses
• Appointments and doctor schedules
• Billing and insurance records

→ Stakeholders/Users:

• Doctors and nurses


• Receptionists and admin staff
• Patients
• Hospital management

→ Why DBMS is Preferred:


• Quick access to patient records and history
• Reduced human errors in reports and billing
• Secure and confidential data management
• Easy tracking of appointments and inventory

➢ Online Shopping Platform (e.g., Amazon)

→ Type of Data Stored:

• Product details (name, price, stock, images)


• Customer profiles and orders
• Payment and shipping info
• Reviews and ratings

→ Stakeholders/Users:

• Customers
• Sellers/vendors
• Warehouse staff
• Admin and support team
→ Why DBMS is Preferred:

• Manages millions of records efficiently


• Enables fast search and filtering
• Supports online transactions securely
• Automatically updates inventory and order status

➢ University/College Management System

→ Type of Data Stored:

• Student records (name, ID, marks, attendance)


• Courses, subjects, and faculty info
• Exam schedules and results
• Fees and payments

→ Stakeholders/Users:

• Students
• Teachers and faculty
• Administrative staff
• University management

→ Why DBMS is Preferred:

• Centralized data management for all departments


• Easy grade entry and report generation
• Reduces paperwork and manual errors
• Ensures data security and controlled access

SECTION-C
QUESTION# 01:
Design Task:
Draw a labeled diagram showing the Database System Environment including:
• Users
• DBMS
• Database
• Application Programs
• Hardware
• Software
Also describe the role of each component in 1–2 lines

➢ DIAGRAM:
➢ Users
People who interact with the database system.

• DBA (Database Administrator): Manages and maintains the database.


• Developers: Create applications to interact with the database.
• End Users: Use applications to access and manipulate data.

➢ Application Programs
Software that allows users to perform specific tasks using the database.

• Acts as a bridge between users and the DBMS.


• Example: Student registration system, e-commerce website.

➢ DBMS (Database Management System)


Software that controls access to the database and manages all database operations.

• Handles data storage, retrieval, security, and integrity.

➢ Database
The organized collection of data stored in a structured way.

• Stores data in tables, records, and fields.


• Can be relational, NoSQL, etc.

➢ Hardware
The physical devices used to run the database system.

• Includes servers, storage devices, and network hardware.

➢ Software
All programs and operating systems required to run the DBMS and applications.

• Includes the DBMS software, application software, and OS.

You might also like