ADVBS Answers With Scheme
ADVBS Answers With Scheme
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
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.
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.
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
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
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.
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.
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.
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.
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.
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;
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
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.
Marking scheme:
Award:
4 marks for explaining each lock and their difference
Maximum: 4 marks.
QUESTION 4
a)
Suggested answer:
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:
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
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.
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.