Вы находитесь на странице: 1из 7

SP18- BSE – 007 MUHAMMAD UMAIR

DATABASE MANAGEMENT
SYSTEM
ASSIGNMENT#01

9/22/2019
DATABASE MANAGEMENT SYSTEM ASSIGNMENT-01

QUESTION#01

Why would you choose a database system instead of simply


storing data in operating system files? When would it make
sense not to use a database system?

ANSWER:
A database is a collection of data. It is basically a software
which is used to maintain database whereas file system is
software which is used for organizing data.
Following are some advantages for data base management
system:
 Data independence.
 Data access
 Data integrity and security
 Concurrency control
 Crash recovery

Sometimes a system requires a simple storage system and


doesn’t need that above advantages of DBMS in their system.
Moreover the systems maintaining DBMS contains huge
increase in cost which is too difficult to handled. Also
Page | 2
DATABASE MANAGEMENT SYSTEM ASSIGNMENT-01

applications with strictly real time performances constraints


which are not handled by DBMS.

QUESTION#02

What are the responsibilities of a DBA? If we assume that


the DBA is never interested in running his or her own
queries, does the DBA still need to understand query
optimization? Why

ANSWER:

Following are the responsibilities for a database administrator:

 A DBA is responsible for functioning and maintaining a


database
 Responsible for designing physical, logical and external
schemas of database.
 Must provide security to the data which is stored in
database
 Must provide crash recovery mechanisms by maintaining a
log

Page | 3
DATABASE MANAGEMENT SYSTEM ASSIGNMENT-01

A DBA is responsible for performance of database and does


database tuning to improve the performance of the system. To
achieve this, DBA must understand every optimization in
order to optimize the queries by users and to provide quick
response time.

QUESTION#03

ANSWER:
Scrooge Mcnugget wants a database to store information
using a standalone application on his PC. Basic requirements
are:
SECURITY FACILITY: His database requires security
facilities to avoid intruders to access his PC and to avoid the
miscue of the data.

CRASH RECOVERY: His database requires crash recovery


mechanism, as accidents do happen and when his PC crashes
the data in the database is not lost. Therefore this mechanism
recovers the data to its stable state.

Page | 4
DATABASE MANAGEMENT SYSTEM ASSIGNMENT-01

A VIEW MECHANISM: This mechanism is required as it


helps him in viewing the customized data without repeatedly
writing the same query to access it.

A QUERY LANGUAGE: For analyzing data, to build


views, to identify patterns this mechanism is required.

As he is the only user for his database and no concurrent


access to the data occurs. Therefore concurrency control
mechanism is not required.

QUESTION#04

PART A:
Transactions of different users are interleaved to
improve the performance of the system, when a particular
user transaction is waiting for a task to be completed, instead
of wasting the CPU or system time another user transaction is
executed meanwhile.
Due to interleaved transactions CPU of the system is never
idle, resulting in better throughput, lower waiting time for
user programs and better performance of DBMS.

Page | 5
DATABASE MANAGEMENT SYSTEM ASSIGNMENT-01

PART B:
Users must ensure that their transactions do not
interfere with other transactions. That is user transactions do
not change the values of variables used in other user
transactions leading to inconsistency. User transaction should
not corrupt data stored in database.
DBSM transactions must provide Atomicity that is either a
transaction is completely executed or rolled back. When a
transaction is executed the end result should lead the system
to a consistent state. When a transaction is incomplete the task
must be aborted. Incomplete transactions lead to
inconsistencies.

Page | 6
DATABASE MANAGEMENT SYSTEM ASSIGNMENT-01

QUESTION#05

ER DIAGRAM:

Page | 7

Вам также может понравиться