You are on page 1of 3

COMP-1638 Mock Exam

The most important part of the database administrator’s (DBA) skill set is the ability
to solve various database problems in a time pressured environment. During this
practical exam you will be presented with a few very common problems that might
occur in the database. You will need to investigate and describe the potential cause of
each problem and provide a solution including SQL commands and your explanation.

Please answer the following two questions.


Each question is worth 50 marks.
Time: 2 hours and 15 minutes reading time

1.
Learning outcomes:
Critically evaluate the concepts and tools of the database management system.
Demonstrate systematic knowledge of the database architecture.
Design database backup and recovery strategy.
Develop critical awareness of issues relating to database management and practical
skills to solve common database administration problems.

(a) Creating and managing user accounts are the most common
responsibilities of the DBA. Using SQL commands create a user
account with the following requirements. Provide an explanation for
every step.

1. Username = > fox, password => firstPassword


2. Default tablespace => users
3. Temporary tablespace => temp.
4. Set up quotas on default tablespace to unlimited.
5. Make sure the user can log on to the database.

[15 marks]

(b) One of your database users mgr101 can login to the database
successfully, but when they try to execute SQL command SELECT *
FROM products; they get an error ORA-00942: table or
view does not exist.

(i) Discuss all possible reasons for this problem.


[8 marks]

(ii) Describe how you would solve this problem including


necessary SQL commands.
[13 marks]
(c) Investigate the following statements. Identify each statement as correct
or not and provide an explanation to support your decision:

1. SELECT TABLE is a system privilege.

2. DBMS_OUTPUT.PUT_LINE(’Hello’); is a procedure in PL/SQL


code, which displays word Hello on the screen.

3. System privilege enables users to access and manipulate a content of


a specific object.

4. Flashback technology can be used when a logical corruption occurs


in a database.

5. Shutdown normal is the fastest and safe shutdown mode.

6. Undo data will always be kept until the transaction that generates it
completes with a COMMIT or a ROLLBACK.

7. ROLLBACK statement lets a user undo some or all unwanted


changes in a database that she/he made during the current transaction.

[14 marks]

2.
Learning outcomes:
Critically evaluate the concepts and tools of the database management system.
Demonstrate systematic knowledge of the database architecture.
Design database backup and recovery strategy.
Develop critical awareness of issues relating to database management and practical
skills to solve common database administration problems.

(a)
(i) Describe the concept of a database view.
[6 marks]

(ii) Discuss the purposes that database views may serve in a DB


application.
[7 marks]

(ii) Illustrate your answer with suitable examples and SQL


commands.
[7 marks]
(b)
(i) What is a database transaction? Explain it.
[3 marks]

(ii) Discuss the meaning of database transaction principles (ACID).

[3 marks]

(iii) You need to create a table REGIONS that will belong to the
user OE and will be stored in the tablespace STOCK. That table should
have two columns: ID – to store numeric data and NAME – to store a
variable-size character data. Provide SQL statement to implement
these requirements and explain it.
[4 marks]

(c) One of your users is complaining that he cannot login to the database
using his username (abc77) and password (abc_pass) because he
receives an error ORA-28000: the account is locked.

(i) Discuss possible reasons for this problem.


[8 marks]

(ii) Describe how you would solve this problem including


the necessary SQL commands.
[12 marks]

You might also like