0% found this document useful (0 votes)
10 views9 pages

ADVBS Answers With Scheme

The document outlines the marking scheme for an Advanced Database Systems exam consisting of four questions. It details the roles and responsibilities of Data Administrators (DA) and Database Administrators (DBA), characteristics of data in data warehouses, and various database transaction concepts such as locking mechanisms and triggers. Each question specifies maximum marks and criteria for awarding marks based on the quality of responses.

Uploaded by

kandelsuman98
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)
10 views9 pages

ADVBS Answers With Scheme

The document outlines the marking scheme for an Advanced Database Systems exam consisting of four questions. It details the roles and responsibilities of Data Administrators (DA) and Database Administrators (DBA), characteristics of data in data warehouses, and various database transaction concepts such as locking mechanisms and triggers. Each question specifies maximum marks and criteria for awarding marks based on the quality of responses.

Uploaded by

kandelsuman98
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/ 9

CT004-3-2-ADVBS Advanced Database Systems Marking Scheme Page 1 of 9

This paper contains FOUR (4) questions


Answer ALL questions.

QUESTION 1
a)

Dist: marks for diagram with minor errors with entities, attributes, and relationship (disjoint /
overlapping, total / partial completeness)

Credit: marks for diagram with few errors with entities, attributes, and relationship (disjoint /
overlapping, total / partial completeness)

Fail: marks for diagram with many errors with entities, attributes, and relationship (disjoint /
overlapping, total / partial completeness)
Maximum: 20 marks.

QUESTION 1
b)

 Data administrator (DA) is responsible for the overall management of data resources in
an organization, including maintaining corporate-wide definitions and standards. While

Level 3 Asia Pacific University of Technology & Innovation 202310


CT004-3-2-ADVBS Advanced Database Systems Marking Scheme Page 2 of 9

database administrator (DBA) is responsible for dealing with technical issues such as
security enforcement, database performance, and backup and recovery.

 Data administrator is at a higher level and has strong managerial orientation with
company wide scope, and involve in setings data administration goals, data policies,
procedures, standards. While database administrator is at low level and more technically
oriented than Data administrator, and involve in physical design of database systems
which has narrower DBMS specific scope.

Data Administrator (DA)


Role:
 The DA is responsible for data governance, policy-making, and the conceptual design of
data systems.
 They focus on what data is needed, how it is organized, and who can access it.

Responsibilities:
 Define data standards, naming conventions, and metadata management.
 Ensure data quality, accuracy, integrity, and security from a policy standpoint.
 Develop policies for data access, usage, and ownership.
 Coordinate with various departments to understand data requirements.
 Support strategic planning through data modeling and documentation.

Database Administrator (DBA)


Role:
 The DBA is a technical specialist responsible for the physical implementation,
maintenance, and performance of database systems.

Responsibilities:
 Install, configure, and upgrade database software (e.g., Oracle, MySQL).
 Ensure database performance tuning, backup and recovery, and disaster management.
 Implement and manage user access controls and security permissions.
 Monitor database storage, performance metrics, and error logs.
 Optimize queries and manage indexes, schemas, and data partitions.

Award a maximum marks for explaining roles and responsibility for DA and DBA
Award a maximum marks for differentiating between DA and DBA
Maximum: 10 marks.

QUESTION 2

a)
Suggested answer:
The Key Characteristics of data stored in Data Warehouse

Level 3 Asia Pacific University of Technology & Innovation 202310


CT004-3-2-ADVBS Advanced Database Systems Marking Scheme Page 3 of 9

 Some data is denormalized for simplification and to improve performance, while the data
in the transactional database are normalized.
 Large amounts of historical data are used, while transactional database consists of current
up-to-date data
 Queries often retrieve large amounts of data, while transaction database usually involve
smaller amount of data

Any any 2 of the above answers


Accept other logical answers.

1. Denormalized Structure for Simplification and Performance


 Your data warehouse may have simplified product sales tables that combine information
like customer, item, region, and sale amount in one record.
 This structure makes it easier and faster to run reports like:
 “Top-selling mobile brands by month”
 “Average sales value per customer segment”

Why:
 Unlike the transactional database (which keeps customer, order, and product details in
separate normalized tables), the data warehouse's structure makes analysis faster and
more insightful for business decisions.

2. Historical Data Availability


 The data warehouse contains several years' worth of sales and inventory data.
 This allows the store to:
 Track seasonal trends (e.g., laptop sales before back-to-school season)
 Forecast stock requirements for holidays or festivals
 Analyze return patterns over time

Why:
 The transactional system only shows what happened today, but the data warehouse can
show what’s been happening for years — essential for strategic planning and marketing.

3. Large Query Support

 When management wants a report comparing 3 years of mobile sales across regions, or
analyzing customer preferences, these queries would involve millions of records.
 Such analysis would slow down or even crash the live transaction system if not
separated into a warehouse.

Level 3 Asia Pacific University of Technology & Innovation 202310


CT004-3-2-ADVBS Advanced Database Systems Marking Scheme Page 4 of 9

Why:
 Running large analytical queries on transactional systems disrupts day-to-day
operations, but the data warehouse is built for exactly this type of workload.
By understanding and utilizing the data warehouse properly, the gadget store can gain insights
into customer behavior, optimize inventory, and launch targeted promotions — all without
affecting the real-time operations handled by the transactional system.

Marking scheme:
Award 2 marks for each haracteristic
Award 6 marks for explaining how they are different from transaction database
Maximum: 10 marks.

b)
Suggested answer:
Any 2 of the following:
• Finding associations among sales demographic characteristics to target specific product
to potential customers
• Identifying existing customers who are likely to return to the store to purchase more
• Predicting products which are in high demand during certain period of time to enhance
marketing strategy
Accept other logical answers.

1. Finding Associations Among Sales and Demographic Characteristics


Application in the Gadget Store:
 By analyzing customer purchase histories along with demographic data (age, location,
income, etc.), the store can discover patterns such as:
 “Young professionals in urban areas often buy wireless earbuds with their smartphone
purchases.”
 “Students buying laptops tend to also purchase external hard drives.”

Business Benefit:
 These insights help the store target specific products to the right customer groups
through personalized marketing, bundling offers, or location-based promotions —
increasing sales and customer satisfaction.

2. Predicting High-Demand Products During Specific Periods


Application in the Gadget Store:

Level 3 Asia Pacific University of Technology & Innovation 202310


CT004-3-2-ADVBS Advanced Database Systems Marking Scheme Page 5 of 9

 By using data mining techniques on historical sales data, the store can identify seasonal
trends and predict:
 “Gaming laptops peak in demand during winter holidays.”
 “Mobile phone accessories sell more during the back-to-school season.”

Business Benefit:
 This allows the store to prepare inventory, launch timely marketing campaigns, and
offer targeted discounts — leading to better stock management and increased revenue
during peak times.

Marking scheme:
Award 2 marks for each application
Award 6 marks for explaining each application
Maximum: 10 marks.

QUESTION 3

a)
Suggested answer:

User Liza:
GRANT SELECT, UPDATE
ON Product
To Helen;

User Steven:
GRANT SELECT, UPDATE, DELETE
ON Product
To Tony
WITH GRANT OPTION;

User William:
GRANT SELECT, UPDATE, INSERT, DELETE
ON Product
To Peter
WITH GRANT OPTION;

Level 3 Asia Pacific University of Technology & Innovation 202310


CT004-3-2-ADVBS Advanced Database Systems Marking Scheme Page 6 of 9

Marking scheme:
Award 1 mark for each correct line of answer (1 x 11 = 11 marks)

b)
Suggested answer:

 The schedule suffers from the uncommitted dependency problem. This problem occurs
when two transactions access the same database item and when one of those transactions
can see the intermediate results of another transaction before it has committed.
 In this case, T2 updates A to 200 but it aborts, so A should be restored back to its original
value of 100.
 Meanwhile, T1 has already read the new (intermediate) value of A (200) and uses this
value as a basis for adding 20 to it, giving a new balance of 220, instead of 120.
 Two Phase Locking protocol could be used to prevent such problem. Transaction uses
locks to deny access to other transactions and so prevent incorrect updates. T2 acquires a
write lock to prevent T1 from accessing the item, T1 must wait until T2 finished in-order
to begin its transaction.
 Use Strict Two-Phase Locking (Strict 2PL)
 In Strict 2PL, a transaction holds all write locks until it commits or rolls back.
 Other transactions cannot read or write data that is locked by another transaction.
 Transaction 1 would be forced to wait until Transaction 2 commits, preventing it from
reading the uncommitted value of X.

Marking scheme:

Award DIST marks if uncommitted dependency problem is correctly explained and problem
with schedules also correctly explained.
Award CREDIT marks if the uncommitted dependency problem correctly explained but
problems with schedule not satisfactorily explained.
Award FAIL marks for weak explanation of the uncommitted dependency problem and no
explanation related to the problem with schedule.
Maximum: 10 marks.

c)
Suggested answer:

Shared locks are acquired when only read operation is to be performed. Shared locks can be
shared between multiple transactions as there is no data being altered. Exclusive locks are used

Level 3 Asia Pacific University of Technology & Innovation 202310


CT004-3-2-ADVBS Advanced Database Systems Marking Scheme Page 7 of 9

when write operation is performed. Only the transaction holding the exclusive lock is allowed to
make changes to the data value.

In database systems, locks are essential to ensure data consistency and isolation when multiple
transactions access the same data concurrently. Two primary types of locks used are Shared
Locks and Exclusive Locks.

A Shared Lock (S-lock) is acquired by a transaction when it wants to read a data item but does
not intend to modify it. This type of lock allows multiple transactions to access the same data
item simultaneously for reading, since no data alteration occurs. Because shared locks don't
change the data, they can be shared safely without causing conflicts.

An Exclusive Lock (X-lock), on the other hand, is used when a transaction wants to write to or
modify a data item. When an exclusive lock is held on a data item, no other transaction can
access that item—not even for reading—until the exclusive lock is released. This ensures that
only one transaction can modify the data at a time, preserving consistency and preventing issues
like lost updates or dirty reads.

Locks are a critical part of concurrency control techniques, ensuring that even when multiple
users interact with the database at the same time, the data remains accurate and reliable.

Feature Shared Lock (S-lock) Exclusive Lock (X-lock)


Used when a write/update/delete
Purpose Used when a read operation is performed
operation is performed
Yes – multiple transactions can hold
Concurrency No – only one transaction can hold
shared locks on the same data
Allowed an exclusive lock; others must wait
simultaneously
Data Not allowed – ensures the data is not Allowed – permits the transaction
Modification changed while being read to modify the data
Conflict with Conflicts with both shared and
Compatible with other shared locks
Others exclusive locks
Accept other logical answers.

Marking scheme:

Award:
4 marks for explaining each lock and their difference
Maximum: 4 marks.

QUESTION 4
a)

Suggested answer:

Level 3 Asia Pacific University of Technology & Innovation 202310


CT004-3-2-ADVBS Advanced Database Systems Marking Scheme Page 8 of 9

CREATE PROC CountActive


@ClubName varchar (50)
AS
Select Count(*) From Player where status = ‘Active’ and ClubID in
(Select ClubId from Club where ClubName = @ClubName);

Execute CountActive ‘Real Madrid’

Marking scheme:
Award DIST marks for answer with minor or no error.
Award CREDIT marks for answer with some errors.
Award FAIL marks for answer with many errors

b)
Suggested answer:

CREATE trigger PlayerDelete


ON Player
INSTEAD OF DELETE
As
BEGIN
UPDATE Player
SET status = 'Inactive'
FROM Player AS p INNER JOIN deleted AS d
ON p.PlayerID = d.PlayerID
END

Marking scheme:
Award DIST marks for answer with minor or no error.
Award CREDIT marks for answer with some errors.
Award FAIL marks for answer with many errors

c)
Suggested answer:

Triggers are special procedures that are automatically executed in response to certain events on a
table—such as INSERT, UPDATE, or DELETE. They are powerful tools in database systems
because they allow developers to define and enforce complex business logic at the database
level, independent of the application layer.

One major advantage of triggers is that they automate actions within the database. For example,
if an item is added to an invoice, a trigger can automatically update the total balance in the

Level 3 Asia Pacific University of Technology & Innovation 202310


CT004-3-2-ADVBS Advanced Database Systems Marking Scheme Page 9 of 9

billing table. This reduces manual effort, minimizes human error, and ensures consistency
between related tables.

Triggers are also effective for enforcing data integrity constraints that go beyond standard
database constraints (like NOT NULL or FOREIGN KEY). For instance, a trigger can prevent an
employee's salary from being decreased without approval or ensure that stock quantities never
fall below zero after a sale.

Moreover, because triggers execute directly in the database engine, they apply uniformly across
all interfaces—whether data is modified via a web app, desktop system, or direct SQL query.
This makes triggers ideal for enforcing centralized business rules that must be applied reliably
and consistently.

Accept other logical answers.

Marking scheme:
Award 4 - 5 marks for answer with good discussion and/or examples given.
Award 1 – 3 marks for answer with some discussion or examples given.

Level 3 Asia Pacific University of Technology & Innovation 202310

You might also like