Sample Paper
FINALTERM EXAMINATION
Fall 2022
CS409 – Introduction to Database Administration
Time: 90 min
Marks: 60
Question No: 1 (Marks: 01) - Please choose the correct option
Which SQL statement from the following is used to create a new tablespace?
A. CREATE TABLESPACE
B. CREATE TEMPORARY TABLESPACE
C. CREATE UNDO TABLESPACE
D. Both A & B
Question No: 2 (Marks: 01) - Please choose the correct option
Views are ____ tables that don't exist physically in Oracle.
A. Real
B. Virtual
C. Both A and B
D. None of the above
Question No: 3 (Marks: 01) - Please choose the correct option
One or more tables are joined to create a ____.
A. View
B. Virtue
C. Variable
D. None
Question No: 4 (Marks: 01) - Please choose the correct option
Which of the following date function can be used to get the timestamp from database?
A. SYSTEMTIMESTAMP
B. SYSTIMESTAMP
C. SYSTEMDATE
D. SYSDATE
Question No: 5 (Marks: 01) - Please choose the correct option
________ are PL/SQL programs that are set up to execute in response to a particular
event on a table in the database.
A. Package
B. Functions
C. Triggers
D. Procedure
Question No: 6 (Marks: 01) - Please choose the correct option
A program that resides inside an oracle database that manipulates data in the database
before the data is used outside the database is known as __________.
A. Triggers
B. Function
C. Stored procedure
D. Package
Question No: 7 (Marks: 01) - Please choose the correct option
Which command is used to fetch records from database?
A. Fetch
B. Select
C. Use
D. Get
Question No: 8 (Marks: 01) - Please choose the correct option
A ________ is a group of PL/SQL statements that can be called by name.
A. View
B. Trigger
C. Procedure
D. Function
Question No: 9 (Marks: 01) - Please choose the correct option
How many CREATE TRIGGER statements are there?
A. 4
B. 5
C. 6
D. 7
Question No: 10 (Marks: 01) - Please choose the correct option
TRUNCATE TABLE statement is used to remove the table.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
Question No: 11 (Marks: 01) - Please choose the correct option
Which processes is an instance made of Oracle?
A. Memory processes
B. Oracle background processes
C. Data processes
D. All of the above
Question No: 12 (Marks: 01) - Please choose the correct option
Which is the smallest unit of storage in an Oracle database?
A. Segment
B. Data Block
C. Extent
D. Data File
Question No: 13 (Marks: 01) - Please choose the correct option
How many types of procedure are there?
A. 1
B. 2
C. 3
D. 4
Question No: 14 (Marks: 01) - Please choose the correct option
Which of the following is/are the type of procedure?
A. IN
B. OUT
C. IN OUT
D. All of the above
Question No: 15 (Marks: 01) - Please choose the correct option
The value of ____ is passed to the subprogram as a default parameter.
A. IN
B. OUT
C. IN OUT
D. None
Question No: 16 (Marks: 01) - Please choose the correct option
What is the syntax to Drop Procedure?
A. DELETE PROCEDURE procedure_name;
B. DROP PROCEDURE procedure_name;
C. RETRIEVE PROCEDURE procedure_name;
D. END PROCEDURE procedure_name;
Question No: 17 (Marks: 01) - Please choose the correct option
Which of the following is not present in the syntax of Create Procedure?
A. IS
B. BEGIN
C. END
D. None
Question No: 18 (Marks: 01) - Please choose the correct option
Which of the following is present in Call Procedure?
A. BEGIN
B. END
C. Both A and B
D. None of the above
Question No: 19 (Marks: 01) - Please choose the correct option
How many types of exceptions are there?
A. 2
B. 3
C. 4
D. 5
Question No: 20 (Marks: 01) - Please choose the correct option
Errors that are encountered during the execution of the program are referred to as ____ in
PL/SQL.
A. FUNCTION
B. CURSOR
C. EXCEPTION
D. PROCEDURE
Question No: 21 (Marks: 01) - Please choose the correct option
Which of the following is/are an/the type(s) of exceptions?
A. System-defined
B. User-defined
C. Both A. and B.
D. None of the above
Question No: 22 (Marks: 01) - Please choose the correct option
Which command is used in order to raise an exception explicitly?
A. RISE
B. ROSE
C. RAISE
D. RINSE
Question No: 23 (Marks: 01) - Please choose the correct option
Oracle creates ____ when SQL statements are processed.
A. Content Areas
B. Context Areas
C. Context Ids
D. Content Ids
Question No: 24 (Marks: 01) - Please choose the correct option
In the contexts created by Oracle, a cursor represents a ____.
A. Function
B. Table
C. Pointer
D. None of the above
Question No: 25 (Marks: 01) - Please choose the correct option
An SQL ____ refers to a program that retrieves and processes one row at a time, based
on the results of the SQL statement.
A. Cursor
B. Function
C. Procedure
D. View
Question No: 26 (Marks: 01) - Please choose the correct option
Which of the following would cause an infinite loop to occur in a simple loop
A. LOOP
B. END LOOP
C. IF – THEN
D. EXIT
Question No: 27 (Marks: 01) - Please choose the correct option
Which identifier is valid?
A. Customer_12
B. Loop
C. customer@orgA
D. 12customer
Question No: 28 (Marks: 01) - Please choose the correct option
Select the best answer below. What are the components of a package?
A. Box, wrapping and binding
B. Specification and content
C. Header and body
D. None of the given
Question No: 29 (Marks: 01) - Please choose the correct option
If you cannot specify a mode for a parameter, what is the default mode?
A. OUT
B. IN
C. COPY
D. DEFAULT
Question No: 30 (Marks: 01) - Please choose the correct option
Which of the given files are not copied in cold/offline backup.
A. Data Files
B. Control Files
C. [Link] and [Link] files
D. Log files
Question No: 31 (Marks: 01) - Please choose the correct option
____________ is online backup.
A. Hot
B. Physical
C. Cold
D. Logical
Question No: 32 (Marks: 01) - Please choose the correct option
A management procedure called ___ control is required to control the process of
concurrently performing operations on a database.
A. Database
B. Conspiracy
C. Concurrency
D. Relational
Question No: 33 (Marks: 01) - Please choose the correct option
It is called a schedule when it consists of a series of operations from one ___ to another.
A. Transition
B. Transaction
C. Transportation
D. Transcription
Question No: 34 (Marks: 01) - Please choose the correct option
In SQL, which of the following is not a data definition language command?
A. RENAME
B. REVOKE
C. GRANT
D. UPDATE
Question No: 35 (Marks: 01) - Please choose the correct option
The granting and revoking of roles by the user may cause some confusions when that
user role is revoked. To overcome the above situation
A. The privilege must be granted only by roles
B. The privilege is granted by roles and users
C. The user role cannot be removed once given
D. By restricting the user access to the roles
Question No: 36 (Marks: 01) - Please choose the correct option
Which of the following data base objects can generate serial numbers?
A. Synonyms
B. Views
C. Tables
D. Sequences
Question No: 37 (Marks: 01) - Please choose the correct option
Which of the given is part of logical database?
A. Control Files
B. Redo Log Files
C. Data Files
D. Segments
Question No: 38 (Marks: 01) - Please choose the correct option
The size of the database block is decided at the time of _____________.
A. Database creation
B. Table creation
C. Workspace creation
D. Tablespace creation
Question No: 39 (Marks: 01) - Please choose the correct option
Which of the given synonym is used for Char Datatype in PL/SQL?
A. Character
B. Varchar
C. Varchar2
D. Ch
Question No: 40 (Marks: 01) - Please choose the correct option
A ___________of the transactions can be obtained by finding a linear order consistent
with the partial order of the precedence graph.
A. Direction graph
B. Precedence graph
C. Scheduling scheme
D. Serializability order
Question No: 41 (Marks: 03)
Write the syntax to create view in PL/SQL.
Answer
Question No: 42 (Marks: 03)
Write the PL/SQL code to create a sequence to generate the primary key of the Employee
table incremented by 2.
Answer
Question No: 43 (Marks: 03)
Write the difference between PL/SQL Procedure and PL/SQL Functions.
Answer
Question No: 44 (Marks: 03)
Write the names of any three scaler data types used in PL/SQL programs.
Answer
Question No: 45 (Marks: 03)
Write PL/SQL statement to remove the privilege from the user Amir.
Answer
Question No: 46 (Marks: 03)
Write a transaction which reads two elements X and Y and perform the following
operations and write the results.
X:= X+500
Y:= Y+1000
Answer
Question No: 47 (Marks: 05)
Write sample query for creating schema named “Product” for sample user “AE” using
following attributes?
1. Table name is “new_product”
2. View is “new_product_view”
3. Grants is “SELECT” object privilege on view to the sample user “HR”
Answer
Question No: 48 (Marks: 05)
Define deadlock in context of oracle and also describe to resolve this deadlock issue.
Answer
Question No: 49 (Marks: 05)
Write the SQL Plus statements for following.
1. Recreating control files.
2. Viewing Alert Log using data dictionary
3. To trace files for your current session.
Answer
Question No: 50 (Marks: 05)
Given are the entities of School management system, you have to create ERD for this.
Mention the primary key and cardinalities among all entities.
1. Teacher
2. Class
3. Student
Answer