0% found this document useful (0 votes)
7 views5 pages

DB Ass 1

The document is an assignment discussing database systems, focusing on user interviews about DBMS features, advantages, and disadvantages. It covers the importance of declarative query languages like SQL, concurrency control in course registrations, file structure evaluations, and data independence in database design. Key insights include the need for normalization to reduce redundancy and ensure data integrity while maintaining user access amidst structural changes.

Uploaded by

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

DB Ass 1

The document is an assignment discussing database systems, focusing on user interviews about DBMS features, advantages, and disadvantages. It covers the importance of declarative query languages like SQL, concurrency control in course registrations, file structure evaluations, and data independence in database design. Key insights include the need for normalization to reduce redundancy and ensure data integrity while maintaining user access amidst structural changes.

Uploaded by

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

Assignment # 01

Database Systems

Submitted By: Haider Ali


Submitted To: Ms. Maria Gul
Registration No: B23F0001AI054
Instructor Name: Ms. Maria Gul Department: AI- Blue
Student Name: Ibadullah Qureshi Assignment: 01
Registration No: B23F0001AI072

Q1: Interview some users of database systems. Which DBMS features do they find most
useful and why? Which DBMS facilities do they find least useful and why? What do these
users perceive to be the advantages and disadvantages of the DBMS?

Most Valued DBMS Features:


- Data Integrity and Security: Ensures accurate, consistent data storage and prevents corruption.

- Efficient Data Retrieval: SQL-based querying enables rapid and precise data extraction.

- Reduction of Data Redundancy: Normalization techniques optimize storage and improve efficiency.

Challenges with DBMS:


- High Complexity: Requires specialized knowledge for effective management.

- Cost Constraints: Licensing and operational costs limit adoption for smaller enterprises.

Key Advantages of DBMS:


- Centralized control enhances data consistency and security.

- Streamlined backup and recovery mechanisms safeguard data.

- Facilitates concurrent access and data sharing among multiple users.

Key Disadvantages of DBMS:


- Necessitates skilled administration for maintenance and optimization.

- Demands significant computational resources compared to simpler storage solutions.

Q2:

A). List at least two reasons why database systems support data manipulation using a
declarative query language such as SQL, instead of just providing a library of C or C++
functions to carry out data manipulation.

B). Assume that two students are trying to register for a course in which there is only
one open seat. What component of a database system prevents both students from being
given that last seat?

(a) Why Use a Declarative Query Language (SQL)?


- Enhanced Abstraction: SQL allows users to focus on data requirements rather than execution specifics.

Page |2
Instructor Name: Ms. Maria Gul Department: AI- Blue
Student Name: Ibadullah Qureshi Assignment: 01
Registration No: B23F0001AI072
- Performance Optimization: The DBMS query engine optimizes execution plans for efficiency.

(b) Managing Concurrent Course Registrations


DBMS ensures data consistency through Concurrency Control Mechanisms such as Transaction Management
and Locking Protocols, preventing multiple students from registering for a single remaining seat simultaneously.

Q3: File Structure Evaluation


(a) Number of Records and Fields:
The file comprises 7 records, each containing 5 fields.

(b) Issues with Sorting by City:


The problem is that the city information is embedded within the MANAGER_ADDRESS field, making it
difficult to sort by city. Since the address is stored as a single string, extracting the city requires text parsing,
which is inefficient and error-prone.

Solution:

To solve this, we should normalize the file structure by separating the MANAGER_ADDRESS field into
distinct fields:

-Street Address

-City

-State

-ZIP Code

This would allow easy sorting and filtering by city

(c) Enabling Sorting by Multiple Attributes:


To support sorting and listing by last name, area code, city, state, or ZIP code, we need to split the
following fields:
1. PROJECT_MANAGER → Separate into First Name and Last Name
o Example: “Holly B. Parker” → First Name: Holly B., Last Name: Parker
2. MANAGER_PHONE → Separate into Area Code and Phone Number
o Example: “904-338-3416” → Area Code: 904, Phone Number: 338-3416
3. MANAGER_ADDRESS → Split into Street Address, City, State, ZIP Code
o Example: “3334 Lee Rd., Gainesville, FL 37123”
 Street Address: 3334 Lee Rd.
 City: Gainesville
 State: FL
 ZIP Code: 37123
.

Page |3
Instructor Name: Ms. Maria Gul Department: AI- Blue
Student Name: Ibadullah Qureshi Assignment: 01
Registration No: B23F0001AI072
(d) Identifying and Reducing Data Redundancy:
Some redundancies in the data include:
1. Repeated Manager Information:
o "Holly B. Parker" appears multiple times with the same phone number and address.
o "George F. Dorts" appears multiple times with the same phone number and address.
2. Repeated Addresses:
o "3334 Lee Rd., Gainesville, FL 37123" appears multiple times.
o "124 River Dr., Franklin, TN 29185" appears multiple times.
Solution
To eliminate redundancies, we can create separate tables:
 Manager Table (Unique managers with their contact details)
 Project Table (Links projects to managers using a Manager ID instead of duplicating details)

Q4 A financial institution is expanding its database to accommodate additional data


types, such as transaction logs and customer interaction history. The IT team must
ensure that existing reporting systems continue to work without modification, even as
the database scheme evolves to include these new data types. How does data
independence ensure that the reporting systems are unaffected by changes in the
database structure?
Logical Data Independence
 Logical data independence means that changes in the conceptual schema (such as adding new
tables for transaction logs and customer interaction history) do not require changes in the
application or reporting systems.
 The existing reports rely on predefined queries that interact with a stable view of the data.
Even if new attributes or tables are added, the existing views remain unchanged.
 The abstraction layer (such as views, stored procedures, or APIs) shields the reporting system
from modifications.
2. Physical Data Independence
 Physical data independence ensures that changes in the storage structure, indexing methods,
or data organization do not affect the database's conceptual schema.
 Even if the IT team optimizes storage by partitioning or indexing transaction logs differently,
the reporting system does not require any modifications because queries retrieve data through
logical constructs, not physical locations.
How It Helps the Financial Institution
 The existing reports continue functioning without modification.
 The IT team can expand the database schema to accommodate new data types without
impacting reporting.
 The system remains scalable and adaptable to future data needs.
.

Page |4
Instructor Name: Ms. Maria Gul Department: AI- Blue
Student Name: Ibadullah Qureshi Assignment: 01
Registration No: B23F0001AI072
Q5 A university uses a database to store course enrollment data. The structure of the
database is subject to frequent changes, such as the addition of new fields or changes to
the format of existing data (e.g., changing the course code format from numerical to
alphanumeric). However, the university needs to ensure that students and faculty can
continue to access their enrollment records without any issues. How can the database
design incorporate data independence to allow these changes to occur without affecting
the users or application functionalities?
Logical Data Independence
 Use Views and Abstraction Layers:
o Define views that provide a stable interface for applications and users, even if the
underlying schema changes.
o Example: If the course code format changes from numerical to alphanumeric, a view
can transform and present the data in a consistent way.
 Schema Modifications Without Affecting Applications:
o If new fields are added (e.g., course prerequisites), existing queries and reports still
function because they don’t rely on newly added columns unless explicitly modified.
 Application Programming Interfaces (APIs) or Stored Procedures:
o Encapsulate database access using APIs or stored procedures, so applications interact
with the data through these predefined interfaces rather than directly with tables.
2. Physical Data Independence
 Storage Optimization Without Affecting Access:
o If the university changes indexing methods or migrates data to a different storage
system, users continue to access data without modification.
 Efficient Query Performance:
o Changes in data storage techniques (e.g., indexing, partitioning, compression) do
not impact how queries retrieve course enrollment records.

Page |5

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy