You are on page 1of 7

sub : dwh || total time : 3:00 hrs || total marks : 100

note : 15 min break after completing section a and b.

==================================================================================
==========================================

section a || time limit : 30 mins || 0.5 mark each

1.)which of the following statements contains an error?

select * from emp where empid = 493945;


select empid from emp where empid= 493945;
select empid from emp;
select empid where empid = 56949 and lastname = �smith�;

2.)which of the following correctly describes how to specify a column alias?

place the alias at the beginning of the statement to describe the table.
place the alias after each column, separated by white space, to describe the
column.
place the alias after each column, separated by a comma, to describe the column.
place the alias at the end of the statement to describe the table.

3.)the nvl function

assists in the distribution of output across multiple columns.


allows the user to specify alternate output for non-null column values.
allows the user to specify alternate output for null column values.
nullifies the value of the column output.

4.)output from a table called plays with two columns, play_name and author, is
shown below. which of the following sql statements produced it?

play_table
������������-
�midsummer night�s dream", shakespeare
�waiting for godot", beckett
�the glass menagerie", williams

select play_name || author from plays;


select play_name, author from plays;
select play_name||�, � || author from plays;
select play_name||�, � || author play_table from plays;

5.)issuing the define_editor="emacs� will produce which outcome?

the emacs editor will become the sql*plus default text editor.
the emacs editor will start running immediately.
the emacs editor will no longer be used by sql*plus as the default text editor.
the emacs editor will be deleted from the system.

6.)the user issues the following statement. what will be displayed if the empid
selected is 60494?

select decode(empid,38475, �terminated",60494, �loa", �active")


from emp;
60494
loa
terminated
active

7.)select (to_char(nvl(sqrt(59483), �invalid")) from dual is a valid sql


statement.

true
false

8.)the appropriate table to use when performing arithmetic calculations on values


defined within the select statement (not pulled from a table column) is

emp
the table containing the column values
dual
an oracle-defined table

9.)which of the following is not a group function?

avg( )
sqrt( )
sum( )
max( )

10.)once defined, how long will a variable remain so in sql*plus?

until the database is shut down


until the instance is shut down
until the statement completes
until the session completes

11.)the default character for specifying runtime variables in select statements is

ampersand
ellipses
quotation marks
asterisk

12.)a user is setting up a join operation between tables emp and dept. there are
some employees in the emp table that the user wants returned by the query, but the
employees are not assigned to departments yet. which select statement is most
appropriate for this user?

select e.empid, d.head from emp e, dept d;


select e.empid, d.head from emp e, dept d where e.dept# = d.dept#;
select e.empid, d.head from emp e, dept d where e.dept# = d.dept# (+);
select e.empid, d.head from emp e, dept d where e.dept# (+) = d.dept#;

13.)developer anju executes the following statement: create table animals as


select * from master.animals; what is the effect of this statement?

a table named animals will be created in the master schema with the same data as
the animals table owned by anju.
a table named anju will be created in the animals schema with the same data as the
animals table owned by master.
a table named animals will be created in the anju schema with the same data as the
animals table owned by master.
a table named master will be created in the animals schema with the same data as
the anju table owned by animals.

14.)user janko would like to insert a row into the employee table, which has three
columns: empid, lastname, and salary. the user would like to enter data for empid
59694, lastname harris, but no salary. which statement would work best?
insert into employee values (59694,�harris�, null);
insert into employee values (59694,�harris�);
insert into employee (empid, lastname, salary) values (59694,�harris�);
insert into employee (select 59694 from �harris�);

15.)which three of the following are valid database datatypes in oracle? (choose
three.)

char
varchar2
boolean
number

16.)omitting the where clause from a delete statement has which of the following
effects?

the delete statement will fail because there are no records to delete.
the delete statement will prompt the user to enter criteria for the deletion
the delete statement will fail because of syntax error.
the delete statement will remove all records from the table.

17.)creating a foreign-key constraint between columns of two tables defined with


two different datatypes will produce an error.

true
false

18.)dropping a table has which of the following effects on a nonunique index


created for the table?

no effect.
the index will be dropped.
the index will be rendered invalid.
the index will contain null values.

19.)to increase the number of nullable columns for a table,

use the alter table statement.


ensure that all column values are null for all rows.
first increase the size of adjacent column datatypes, then add the column.
add the column, populate the column, then add the not null constraint.

20.)which line of the following statement will produce an error?

create table goods


(good_no number,
good_name varchar2 check(good_name in (select name from avail_goods)),
constraint pk_goods_01
primary key (goodno));
there are no errors in this statement.

21.)maxvalue is a valid parameter for sequence creation.

true
false

22.)which of the following lines in the select statement below contain an error?

select decode(empid, 58385, �inactive", �active") empid


from emp
where substr(lastname,1,1) > to_number(�s')
and empid > 02000
order by empid desc, lastname asc;
there are no errors in this statement.

23.)which function below can best be categorized as similar in function to an if-


then-else statement?

sqrt
decode
new_time
rowidtochar

24.)which two of the following orders are used in order by clauses? (choose two)

abs
asc
desc
disc

25.)you query the database with this command

select name
from employee
where name like �_a%�;

which names are displayed?

names starting with �a�


names starting with �ar or �a�
names containing �a" as second character
names containing �a" as any letter except the first
none of the above

26.) exists is used to perform filter operation on group of rows


true
false

27.) display the records between two range


select rownum, empno, ename from emp where rowid in
(select rowid from emp where rownum <=&upto
minus
select rowid from emp where rownum<&start);

will the above query work ?


yes
no

28.)find out nth highest salary from emp table


select distinct (a.sal) from emp a where &n = (select count (distinct (b.sal))
from emp b where b.sal>=a.sal);

enter value for n: 2


how many rows come into the output ?
1
2
3
n

29.) display the number value in words


sql> select sal, (to_char(to_date(sal,'j'), 'jsp'))
from emp;
the output like,

sal (to_char(to_date(sal,'j'),'jsp'))
--------- -----------------------------------------------------
800 eight hundred
1600 one thousand six hundred
1250 one thousand two hundred fifty
will this query work ?

yes
no

30.) display odd/ even number of records


odd number of records:
select * from emp where (rowid,1) in (select rowid, mod(rownum,2) from emp);
1
3
5
even number of records:
select * from emp where (rowid,0) in (select rowid, mod(rownum,2) from emp)
2
4
6

other way to replace query result null value with a text


sql> set null �n/a�
to reset sql> set null ��

what are the more common pseudo-columns?


sysdate, user , uid, curval, nextval, rowid, rownum

what is the output of sign function?


1 for positive value,
0 for zero,
-1 for negative value.

what is the maximum number of triggers, can apply to a single table?


12 triggers.

do you understand information provided in ques 30 ?


yes
no

==================================================================================
====================================

section b || time : 45 mins || 1 mark each

1.)what are the different types of joins?


2.)explain normalization and denormalization with examples.
3.)what cursor type do you use to retrieve multiple recordsets and what is ref
cursor?
4.)diffrence between a "where" clause and a "having" clause
5.)what is the difference between "anonymous block","procedure" and "function"?
5.)how will you copy the structure of a table without copying the data?
6.)how to find out the database name from sql*plus command prompt?
7.)talk about "exception handling" in pl/sql?
8.)what is the diference between "null in c" and "null in oracle?"
9.)give some examples of analytical functions.
10.)what is the difference between "substr" and "instr"?
11.)what is dynamic sql method ?
12.)how to remove duplicate records from a table?
13.)what is the use of analyzing the tables?
14.)hat is the difference among "dropping a table", "truncating a table" and
"deleting all records" from a table.
15.)what is a "transaction"? why are they necessary?
16.)when do you get constraint violtaion? what are the types of constraints?
17.)how to convert raw datatype into text?
18.)difference - primary key and aggregate key and foreign key?
19.)how functional dependency is related to database table design?
20.)what is a "trigger"? what are all types of triggers are available. what are
the advantages of using triggers?
21.)why can a "group by" or "order by" clause be expensive to process?
22.)what is a view? how to get script for a view?
23.)what are the large object types suported by oracle?
24.)difference between char,"varchar" and "varchar2" datatypes.
25.)what is package and what are the advantages of using it.
26.)what is a mutating table error and how can you get around it
27.)describe the use of %rowtype and %type in pl/sql
28.)when is a declare statement needed (in which oracle objects and why)?
29.)how can you find within a pl/sql block, if a cursor is open?
30.)what is redo log file. what is its's use and how many redo log file and groups
are posiible in oracle 9i.
==================================================================================
====================================

section c || time : 90 mins || ques 1-19 -->2.5 marks each, ques 20 -->7.5 marks

1. explain dwh properties ?


2. what is staging area?
3. what is surrogate key?
4. explain dwh architecture?
5. how can you define a transformation? what are different types of
transformations in informatica?
6. what is source qualifier? write all properties (only names) of source
qualifier?
7. what is the difference between filter,router and source qualifier in terms of
filtering the rows?
8. what is the significance of sorted input option in aggregator transformation?
(write detailed working of aggregator)
9. what is difference between a connected look up and unconnected look up?
10.what is up date strategy transformation and what are the options we need to use
in session properties with update strategy?
11.write cache working of lookup,rank,joiner ?
12.how can we improve the performance of joiner transformation.
13.explain stored procedure transformation.
14.what is the use of group by port in rank transformation.
15.what is persistent cache,insert else update, update else insert,recache from
database in lookup transformation.
16.what is the use of normalizer transformation ?
17.what is $source and $target ?
18.define mapping,session,workflow?
19.name type of stored procedure,type of join possible in joiner and explain what
is sql override?
20.draw scd1 using router transformation?

You might also like