0% found this document useful (0 votes)
14 views

DB Assignment-01 SE-2

Uploaded by

salmankhanpubg5
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)
14 views

DB Assignment-01 SE-2

Uploaded by

salmankhanpubg5
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/ 5

UNIVERSITY OF WAH

WAH ENGINEERING COLLEGE


Software Engineering Program
Assignment # 01
Course Title: Database Systems
Semester: 2nd (Spring-2024) Course Teacher: Dr. Zahra Waheed
Total Points: 10 Submission deadline: (22-03-2024)
Course Code: CS-141
Student Name_____________________Reg No._______________________

Assignment Title: Basics of Database Systems, Data Independence, Database


Architecture & Data Models

Program
Course Learning
Learning Learning Domain
Outcome
Outcome

CLO-1 PLO-1 Cognitive 2

PLO-1: Academic Education: To prepare graduates as computing professionals.

CLO-1: Explain fundamental database concepts.

Question 1 (10 Points) (CLO-1, PLO-1)


Scrooge McNugget wants to store information including (names, addresses, descriptions of
embarrassing moments, etc.) about the many ducks on his payroll. Due to large volume of data,
he needs to buy a database system to keep track of all this information. He wants to buy a basic
version (with fewest features) to save money and use it only on his computer. He doesn't want
anyone else to see his list. Predict the special feature(s) should (or shouldn’t) he pays for in
this system, and why? Provide appropriate justification of your answer.
1. A security facility.
2. Concurrency control.
3. Crash recovery.
4. A view mechanism.
5. A query language.

Page 1 of 5
The special features predicted for the Scrooge McNugget according to the scenario
are as under.

1. A security Facility.
Database security is the processes, tools, and controls that secure and protect databases
against accidental and intentional threats. The objective of database security is to secure
sensitive data and maintain the confidentiality, availability, and integrity of the database. In
addition to protecting the data within the database, database security protects the database
management system and associated applications, systems, physical and virtual servers, and
network infrastructure.

To answer the question "what is database security," it's important to acknowledge that there
are several types of security risks. Database security must guard against human error,
excessive employee database privileges, hacker and insider attacks, malware, backup
storage media exposure, physical damage to database servers, and vulnerable databases
such as unpatched databases or those with too much data in buffers.

2. Concurrency Control
Concurrency control is the process of managing simultaneous execution of
transactions (such as queries, updates, inserts, deletes and so on) in a
multiprocessing database system without having them interfere with one another. This
property of DBMS allows many transactions to access the same database at the same
time without interfering with each other. The primary goal of concurrency is to ensure
the atomicity (or serializability ) of the execution of transactions in a multi-user
database environment. Concurrency controls mechanisms attempt to interleave
(parallel) READ and WRITE operations of multiple transactions so that the interleaved
execution yields results that are identical to the results of a serial schedule ...

3. Crash Recovery
Transactions (or units of work) against a database can be interrupted
unexpectedly. If a failure occurs before all of the changes that are part of the unit of
work are completed, committed, and written to disk, the database is left in an
inconsistent and unusable state. Crash recovery is the process by which the
database is moved back to a consistent and usable state. This is done by rolling
back incomplete transactions and completing committed transactions that were still
in memory when the crash occurred (Figure 1).

Page 2 of 5
Figure 1. Rolling back units of work (crash
recovery)
If the database or the database manager fails, the database can be left in an inconsistent
state. The contents of the database might include changes made by transactions that were
incomplete at the time of failure. The database might also be missing changes that were made
by transactions that completed before the failure but which were not yet flushed to disk. A
crash recovery operation must be performed in order to roll back the partially completed
transactions and to write to disk the changes of completed transactions that were previously
made only in memory.

Conditions that can necessitate a crash recovery include:

• A power failure on the machine, causing the database manager and the
database partitions on it to go down.
• A hardware failure such as memory, disk, CPU, or network failure.
• A serious operating system error that causes the Db2 instance to end
abnormally.

If you want crash recovery to be performed automatically by the database manager, enable
the automatic restart (autorestart) database configuration parameter by setting it to ON. (This
is the default value.) If you do not want automatic restart behavior, set
the autorestart database configuration parameter to OFF. As a result, you must issue
the RESTART DATABASE command when a database failure occurs. If the database I/O was
suspended before the crash occurred, you must specify the WRITE RESUME option of
the RESTART DATABASE command in order for the crash recovery to continue.

4. A View Mechanism.

Here I am going to explain the view mechanism based on database.

What is a Database View?

A Database View is a virtual table that provides a user-friendly representation of data from
one or more underlying tables. It simplifies data access, query optimization, and data security.

Page 3 of 5
How do Database Views improve data security?

Database Views can restrict access to sensitive data by hiding specific columns or rows from
unauthorized users, thereby enhancing data security.

What are the main challenges of using Database Views?

The main challenges of using Database Views include potential performance impact due to
inefficient design and limited data update capabilities.

Can Database Views be integrated with a data lakehouse environment?

Yes, Database Views can be integrated with data lakehouse environments to enhance data
processing and analytics capabilities at scale.

How do Database Views affect performance?

Performance can be impacted by factors such as the complexity of the underlying queries, the
size of the data set, and available system resources. Optimizing view design and indexing
strategies can help improve performance.

5. A Query Language.

A query language is a specialized programming language for searching and changing the
contents of a database. Since Scrooge McNugget wants to store and manage information
about the ducks on his payroll, he'll need a way to input, retrieve, and update that information.
Therefore, a query language is a computer programing language that is used for the purpose
of retrieving information or data from a database. Even though the term originally refers to a
sublanguage for only searching (querying) the contents of a database, modern query
languages such as SQL are general languages for interacting with the DBMS, including
statements for defining and changing the database schema, populating the contents of the
database, searching the contents of the database, updating the contents of the database,
defining integrity constraints over the database, defining stored procedures, defining
authorization rules, defining triggers, etc.

Page 4 of 5
In summary, Scrooge McNugget should definitely pay for the security facility and the query
language features. Crash recovery could provide additional data protection, but it may not be
as critical for his immediate needs. Concurrency control and the view mechanism are not
essential features for a single-user system like his, although they could be beneficial
depending on his future requirements and budget constraints.

Page 5 of 5

You might also like