Professional Documents
Culture Documents
Section A
1) Choose the correct answer :
1. a) An oracle database consist of
1) Physical Structure ii) Logical Structure
iii) Both iv) None of these
(b) SQL statements can contain
i) Data Definition Language (DDL)
ii) Data Manipulation Language (DML)
iv) Transaction Control Language (TCL)
v) All of these
vi) None of the above
(c) A relational data model organizes the data into tables known as
i) Relations ii) Functions iii) File iv) None of these
(d) Which is the process of building the database structure to store data?
i) Concurrency management ii) Compilation
iii) Normalization iv) None of the above
(e) A join is a query that combines rows from
i) first & last table ii) two or more table
iii) same table iv) none of these
(f) The function that removes some characteristics of the given string is
i) LTRIM ii) RTRIM iii) INSTR iv) None of these
(g) Which of the following is not a DML statement
i) COMMIT ii) UPDATE iii) DELETE iv) INSERT v) None of these
(h) The operators are used to connect search conditions in the WHERE
clause are
i) Logical Operators ii) Relational Operators iii) Arithmetic Operators
iv) None of these
(i) From the results of two or more queries, the INTERSECT operator
returns
i) One row ii) common rows iii) All rows iv) None of these
(j) DUAL table is generally used for
i) Insert Clause ii) Update Clause iii) Select Clause iv) None of these
2) Fill in the blanks
a) AVG() is group function.
b) The MINUS is a set operator.
c) IN operator compares a value to every value of a list returned by a
sub query.
d) _____________ function finds out the number of months used
between given two dates.
e) A view is created or defined using the ___________ statement.
f) _________ function converts n string to lower case.
SECTION –B
4). Differentiate any two of the following:
a) for loop and while loop
b) DML & DCL
c) sub queries & nested sub queries
5).STUDENT_TBL
STUDENTS_MARKS_TBL
6). Write the output of any six of the following SQL queries.
a. select LENGTH(“Rakesh Kumar”) from dual;
b. select MOD(35,6) from dual;
c. select POWER(6,4) from dual;
d. select ROUND(15,193,1) from dual;
e. select SQRT(625) from dual;
f. select INITCAP("good day”) from dual;
g. select UPPER(“Large”) from dual;
h. select TRUNC(15,79,1) from dual;
SECTION – A
1) Select the fittest answer from among the given set of possible answers:-
i) who develop the Normalization process ?
a) C.B. Dale b) Collin White
c) E.F. Codd d) Donald Chamserlin
ii) Which is the process of building database structure to store data?
a) Concurrency Management b) Compilation
c) Normalization d) None of the above
iii) Which of the following is an integrity constraint?
a) Domain constraint b) Entity Integrity
c) Referential Integrity d) All of the above
iv) Which of the following is not a DML statement?
a) COMMIT b) UPDATE
c) DELETE d) INSERT
v) What is the process that is done to SQL before exception, to check the proper
syntax and to optimize the request called?
a) Syntax checking b) Performance Training
c) passing d) Optimizing
vi) SQL % FOUND is TRUE if
a) at least one row was processed b) entire row was processed
c) no row was processed d) none of above
vii) if the variable is prefixed with a double ampersand (&&) SQL *Plus will
a) only prompt the value once b) prompt the value twice
c) not prompt the value d) none of the above
viii) DUAL table is generally used for
a) insert clause b) update clause
c) Alter clause d) select clause
ix) Which of the following database object does not physically exist
a) Base Table b) Index
c)View d)select clause
x) Avg() is
a) single row function b) group function
c) string function d) none of the above
2). Fill in the blanks with suitable words.
i) UNION, INSERT and MINUS are set operators.
ii) Grant is DCL command.
iii) To set a line ___________ command is used.
iv) A table can have only one primary key.
v) There are two types of operators logical and Relational (unary, binary).
vi) A view is created or defined using the create view statement.
SECTION - B
i) Write PL/SQL code to accept your name in uppercase and convert in lower
case.
ii) Write PL/SQL code to insert row in emp_table.
iii) Write PL/SQL code 16 update emp table where name is SHYAM. Exception
should be raised if error is found.
SECTION – C
7. Explain the following:
SECTION - A
1. Tick the most correct choice:
i) DDL commands are
a) Allowed in PL/SQL
b) Not allowed in PL/SQL
c) None of the above
ii) Select correct one from the following:
a) SQL statements are case sensitive.
b) Keywords can be splitted across lines.
c) SQL statements can be entered on one or many lines.
d) Keywords must be in uppercase.
iii) Round(44,926,2), produce the result.
a) 44.92
b) 44.93
c) 15
d) None of the above
iv) DUAL table is generally used for
a) Insert clause
b) Update clause
c) Alter clause
d) Select clause
v) Identify the single row function
a) AVG
b) MIN
c) LOWER
d) VARIENCE
vi) How to change the name of a table from “dept” to department?
a) RENAME dept to departments
b) ALTER dept to departments
c) MODIFY dept to departments
d) SET dept to departments
SECTION – B
3. Create a report in SQL*PLUS that displays the job title, name and salary for all
employees where salary is less than 53000. Add a centered, two-line header that
reads Employee Report and a centered footer that reads Confidential. Rename the
salary column to read salary and format it as:
Format is
Employee
Report
Confidential
SECTION – C
1. Answer any four questions.
a) Describe the use of Exceptions in oracle? Explain different types of
exceptions with examples.
b) Explain form level triggers. Describe different types of it.
c) What are the basic steps to be followed while using Explicit cursors?
d) Compare SQL statements versus SQL*Plus commands.
e) What is a join? Explain different types of join.