Paper CS409 1
Paper CS409 1
Fall 2022
CS409 – Introduction to Database Administration
MUBEEN MUSTAFA
Whatsapp +92 3411677117
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
A. Real
B. Virtual
C. Both A and B
D. None of the above
A. View
B. Virtue
C. Variable
D. None
Which of the following date function can be used to get the timestamp from database?
A. SYSTEMTIMESTAMP
B. SYSTIMESTAMP
C. SYSTEMDATE
D. SYSDATE
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
A. Fetch
B. Select
C. Use
D. Get
A. View
B. Trigger
C. Procedure
D. Function
A. 4
B. 5
C. 6
D. 7
Question No: 10 (Marks: 01) - Please choose the correct option
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
A. Memory processes
B. Oracle background processes
C. Data processes
D. All of the above
A. Segment
B. Data Block
C. Extent
D. Data File
A. 1
B. 2(Standalone and procedure)
C. 3
D. 4
A. IN
B. OUT
C. IN OUT
D. All of the above
Question No: 15 (Marks: 01) - Please choose the correct option
A. IN
B. OUT
C. IN OUT
D. None
A. IS
B. BEGIN
C. END
D. None(A,B,C are present)
A. BEGIN
B. END
C. Both A and B
D. None of the above
B. 3
C. 4
D. 5
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
A. System-defined
B. User-defined
C. Both A. and B.
D. None of the above
A. RISE
B. ROSE
C. RAISE
D. RINSE
A. Content Areas
B. Context Areas
C. Context Ids
D. Content Ids
A. Function
B. Table
C. Pointer
D. None of the above
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
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
A. Customer_12
B. Loop
C. customer@orgA
D. 12customer
If you cannot specify a mode for a parameter, what is the default mode?
A. OUT
B. IN
C. COPY
D. DEFAULT
A. Data Files
B. Control Files
C. Init.ora and config.ora files
D. Log files
A. Hot
B. Physical
C. Cold
D. Logical
A. Database
B. Conspiracy
C. Concurrency
D. Relational
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
A. RENAME
B. REVOKE
C. GRANT
D. UPDATE
The granting and revoking of roles by the user may cause some confusions when that
user role is revoked. To overcome the above situation
Which of the following data base objects can generate serial numbers?
A. Synonyms
B. Views
C. Tables
D. Sequences
A. Direction graph
B. Precedence graph
C. Scheduling scheme
D. Serializability order
Answer
Answer
Answer
Write the names of any three scaler data types used in PL/SQL programs.
Answer
Write PL/SQL statement to remove the privilege from the user Amir.
Answer
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
DECLARE
x NUMBER;
y NUMBER;
BEGIN
-- Read the values of X and Y
x := &enter_value_for_x;
y := &enter_value_for_y;
Write sample query for creating schema named “Product” for sample user “AE” using
following attributes?
Answer
Define deadlock in context of oracle and also describe to resolve this deadlock issue.
Answer
To view Alert Log using data dictionary, execute the following SQL Plus
statement:
SELECT VALUE FROM V$DIAG_INFO WHERE NAME = 'Diag Trace';
Navigate to the path obtained from the above query, and then open the
Alert_<SID>.log file to view the Alert Log.
To trace files for your current session, execute the following SQL Plus
statement:
ALTER SESSION SET SQL_TRACE = TRUE;
This statement enables tracing for the current session. To disable tracing,
use the following statement:
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