Wednesday, April 30, 2008

ORACLE Aptitude Paper

ORACLE Aptitude Paper

21) One sells 30 kg rice with cost Rs.22.87/kg at 20% profit and 50kg rice
with cost price Rs 20.92/kg at 30% profit .What is the total percentage
profit ?

1. 26.25% 2. 24.72% 3. 26.5% 4. 28%

22) Ravi buys 100 5% shares of face value Rs.100 at Rs.15000 .If he sells
them off after a year at Rs 155 a share ,what is his yield ?

1. 8.33% 2. 6.67% 3. 5% 4. 3.33%

23) Amit and Meghna went to New York for a 63 day holiday .Each day ,Amit
spent as many as hundred dollar bills as the remaining number of days in the
trip (excluding the current day ) ,and Meghna spent as many as hundred
dollar bills as the number of days already spent (including current day).
How much per day would they have spent together during the holiday ?

1. $12,600 2. $10000 3. $6300 4. $5000

24) Bacteria reproduce in such a manner that every hour their number
doubles In a controlled experiment that started with a certain number of
bacteria in a jar at 12noon on Tuesday ,30 million were found at 12noon on
Wednesday .At what time were there 15 million bacteria ?

1. Midnight ,Tuesday
2. 6a.m on Wednesday
3. 10 a.m Wednesday
4. None of these

25) Take a number 'x' and follow these steps :
1. Find the sum of its digit
2. If the sum has only one digit , STOP
3. Else , go back to step 1 with the new number.
If x = 1684 ,what is the end result ?

1. 19 2. 10 3. 1
4. None of these

26) A number consisting of five digits 5,6,7,8 and 9 each coming once but
not necessarily in that order is taken ,and an algorithm specified in the
previous question is run on it .How many different end results are possible
?

1. One 2.Three 3.Five
4. Nine

Directions for questions 27 and 28 :Each question is followed by two
statements A and B. Mark
1. If statement A alone is sufficient to answer the question
2. If statement B alone is sufficient to answer the question
3. If both statements A and B are required to answer the question
4. If neither A or B are sufficient to answer the question

27) What is the height of the tower ?
A. A man standing at a distance of 1km from the bottom of the tower
makes an angle
300 degrees with the top of the tower .
B. An insect starts from the bottom of the tower and reaches the top in
25sec.

28) Distance between A and B is
A. A and B two points on the circumference of the circle with center O and
radius 5.2 cm
B. Angle AOB = 450

Additional instructions for questions 29 and 30:

For any activity , X, year Ao dominates year Bo if organized retail business
in activity X in year Ao is greater than organized retails business in
activity X is year Bo .For any two activities in the organized retail
business ,A and B ,year Xo dominates year Yo if
a. The organized retail business in activity A ,in the year Xo is greater
than equal to the organized retail business activity A in the year Yo: and
b. The organized retail business in activity B ,in the year Yo is less than
or equal to the organized retail business in activity B in the year Xo.

29) For the organized retail business activity in children's clothing ,which
one of the following is true ?

1. 1994-95 dominates 1995-96
2. 1995-96 dominates 1994-95
3. 1997-98 dominates 1996-97
4. 1998-99 dominates 1997-98

30) For the organized retail business activity in children 's clothing and
footwear ,which of the following is true ?

1. 1995-96 dominates 1994-95
2. 1994-95 dominates 1995-96
3. 1996-97 dominates 1995-96
4. None of these



QUESTION : 1

EVALUATE THESE TWO SQL COMMANDS:

1. SELECT DISTINCT OBJECT_TYPE FROM USER_OBJECTS;

2. SELECT OBJECT_TYPE FROM ALL_OBJECTS;

HOW WILL THE RESULTS DIFFER?

A. STATEMENT 1 WILL DISPLAY THE DISTINCT OBJECT TYPES IN THE DATABASE, STATEMENT 2 WILL DISPLAY ALL THE OBJECT TYPES IN THE DATABASE.

B. STATEMENT 1 WILL DISPLAY THE DISTINCT OBJECT TYPES OWNED BY THE USER, STATEMENT 2 WILL DISPLAY ALL THE OBJECT TYPES IN THE DATABASE.

yC. STATEMENT 1 WILL DISPLAY THE DISTINCT OBJECT TYPES OWNED BY THE USER, STATEMENT 2 WILL DISPLAY ALL THE OBJECT TYPES THE USER CAN ACCESS.

D. STATEMENT 1 WILL DISPLAY ALL THE OBJECT TYPES THE USER CAN ACESS, STATEMENT 2 WILL DISPLAY ALL OBJECT TYPE THAT THE USER OWNS.


QUESTION : 2

The EMPLOYEE table contains these columns:

LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) SALARY NUMBER(7,2)

You need to display the names of employees that earn more than the average salary of all employees.

Evaluate this SQL statement:

SELECT last_name,first_name FROM employee WHERE salary > AVG(salary);

Which change should you make to achieve the desired results?

A. Change the function in the WHERE clause. B. Move the function to the SELECT clause and add a GROUP BY clause. yC. Use a subquery in the WHERE clause to compare the average salary value. D. Move the function to the SELECT clause and add a GROUP BY clause and a HAVING clause.


QUESTION : 3


You need to remove all the data from the employee table while leaving the table definition intact. You don't care about being able to undo this operation. How would you accomplish this task?

yA. Use the DELETE command. B. Truncate the table. C. Drop the table and recreate it. D. This task cannot be accomplished.


QUESTION : 4

Click on the EXHIBIT button and examine the table instance chart for the sales table.

You attempt to change the database with this command:

SALES ****** _______________________________________________________________ | Column Name | PURCHASE_NO | CUSTOMER_ID | CAR_ID | MODEL | |_______________|_______________|_____________|________|________| | Key Type | PK | FK | FK | FK | |_______________|_______________|_____________|________|________| | Nulls/Unique | NN, U | NN | NN | NN | |_______________|_______________|_____________|________|________| | FK Table | | PURCHASE | S_ORD | S_ITEM | |_______________|_______________|_____________|________|________| | FK Column | | CUST_ID | C_ID |MODEL_ID| |_______________|_______________|_____________|________|________| | Datatype | NUM | NUM | NUM | NUM | |_______________|_______________|_____________|________|________| | Lenght | 6 | 6 | 6 | 6 | |_______________|_______________|_____________|________|________|

INSERT INTO sales(purchase_no, customer_id, car_id) VALUES (1234 , 345 , 6);

If this statement fails , which condition would explain the failure?

A. The statement has invalid datatypes. B. The sales table has too many foreign keys. yC. A mondatory column value is missing. D. This statement does not fail at all.


QUESTION : 5

Which ALTER command would you use a disabled primary key constraint ?

A. ALTER TABLE cars ENABLED PRIMARY (id) ; B. ALTER TABLE cars ADD CONSTRAINT cars_id_pk PRIMARY KEY (id) ;

yC. ALTER TABLE cars ENABLE CONSTRAINT cars_id_pk;

D. ALTER TABLE cars ENABLE PRIMARY KEY (id) CASCADE;


QUESTION : 6


You need to create the patient_id_seq sequence to be used with the patient table's primary key column. The sequence should begin at 1000, have a maximum value of 999999999, increment by 1 , and cache 10 number which statement would you use to complete this task ?

yA. CREATE SEQUENCE patient_id_seq START WITH 1000 MAXVALUE 999999999 CACHE 10 NOCYCLE;

B. CREATE SEQUENCE patient_id_seq ON patient (patient_id) MINVALUE 1000 MAXVALUE 999999999 INCREMENT BY 1 CACHE 10 NOCYCLE;

C. CREATE SEQUENCE patient_id_seq START WITH 1000 MAXVALUE 999999999 INCREMENT BY 1 CYCLE 10;

D. This task cannot be accomplished.


QUESTION : 7

Evaluate this SQL statement:

CREATE INDEX emp_dept_id_idx ON employee (dept_id);

Which result will the statement provide ?

A. Store an index in the EMPLOYEE table. B. Increase the chance of full table scans. yC. May reduce the amount of disk I/O for SELECT statements. D. May reduce the amount of disk I/O for INSERT statements. E. Override the unique index created when the FK relationship was defined.


QUESTION : 8


Evaluate this SQL script:

CREATE ROLE manager; CREATE ROLE clerk; CREATE ROLE inventory; CREATE USER scott IDENTIFIED BY tiger; GRANT inventory TO clerk; GRANT clerk TO manager; GRANT inventory TO scott;

How many roles will user SCOTT have access to ?

A. 0 yB. 1 C. 2 D. 3


QUESTION : 9

Within a PL/SQL loop, you need to test if the current fetch was successful. Which SQL Cursor attribute would you use to accomplish this task ?

A. SQL%ROWCOUNT B. A SQL cursor attribute cannot be used within a Pl/sql loop. yC. SQL%FOUND D. SQL%ISOPEN E. This task cannot be accomplished with a SQL cursor attribute.


QUESTION : 10

The EMPLOYEE table contains these columns:

BONUS NUMBER(7,2) DEPT_ID NUMBER(9)

These are 10 departments and each department has at least 1 employee. Bonus values are greater than 5 not all employees receive a bonus.

Evaluate this PL/SQL block:

DECLARE v_bonus employee.bonus%TYPE :=300; BEGIN UPDATE employee SET bonus = bonus + v_bonus WHERE dept_id IN(10 , 20 , 30); COMMIT; END:

What will be the result ?

A. All employees will be given a 300 bonus. B. A subset of employees will be given a 300 bonus. C. All employees will be given a 300 increase in bonus. yD. A subset of employees will be given a 300 increase in bonus.

QUESTION : 11

In which situation should you use an outer join query ?

A. The employee and region tables have no corresponding columns. yB. The employee and region tables have corresponding columns. C. The employee table column corresponding to the region table column constains null Values for rows need to be displayed. D. The employee table has two columns that correspond.


QUESTION : 12

You query the database with this command:

SELECT lot_no "LOT NUMBER" ,COUNT (* ) "NUMBER OF CARS AVAILABLE" FROM cars WHERE model = 'Fire' GROUP BY lot_no HAVING COUNT (*) > 10 ORDER BY COUNT( * );

Which clause restricts which groups are displayed ?

A. SELECT lot_no "LOT NUMBER" ,COUNT (* ) "NUMBER OF CARS AVAILABLE" B. WHERE model = 'Fire' C. GROUP BY lot_no yD. HAVING COUNT ( * ) > 10 E. ORDER BY COUNT ( * )

0 comments: