Rdbms Question Bank

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

INFOSYS Campus Connect Program

RDBMS Multiple Choice Questions


1. With SQL, how can you return the number of records in the "Persons" table?
(a) SELECT COLUMNS(*) FROM Persons
(b) SELECT COUNT() FROM Persons
(c) SELECT COUNT(*) FROM Persons
(d)SELECT COLUMNS() FROM Persons
2. Which SQL statement is used to return only different values?
(a) SELECT DIFFERENT
(b) SELECT DISTINCT
(c) SELECT UNIQUE
3.

With SQL, how do you retrieve the records from partition p1 of sales table
(a) SELECT [all] FROM sales
(b) SELECT p1 from sales
(c) SELECT *.sales
(d) SELECT * FROM sales partition(p1)

4. What does SQL stand for?


(a) Structured Query Language
(b) Strong Question Language
(c) Structured Question Language
5. Which particular operator that Matches the specified pattern of the database ?
(a) SAVE
(b) MODIFY
(c) LIKE
(d) SAVE AS

6. Which one of the following is NOT a characteristic of meta-data?


(a) Data about data
(b) Self describing
(c) describe data dictionary
(d) create its own structure
7.

Which SQL statement is used to insert new data in a database?


(a ) ADD RECORD
(b) ADD NEW
(C) INSERT INTO
(d) INSERT NEW

8.

With SQL, how do you select all the columns from a table named "Persons"?
(a) SELECT [all] FROM Persons
(b) SELECT Persons
(c) SELECT *.Persons
(d) SELECT * FROM Persons

9. How can you change "Hansen" into "Nilsen" in the "LastName" column in the Persons
table?
(a) UPDATE Persons SET LastName='Nilsen' WHERE LastName='Hansen'
(b) MODIFY Persons SET LastName='Hansen' INTO LastName='Nilsen
(c) UPDATE Persons SET LastName='Hansen' INTO LastName='Nilsen'
(d) MODIFY Persons SET LastName='Nilsen' WHERE LastName='Hansen'
10. Which SQL keyword is used to sort the result-set?
(a) ORDER
(b) SORT
(c) SORT BY
(d) ORDER BY

11. With which type of SQL Server recovery model are all database changes logged
except those that cause large log entries?
(a) Differential Recovery
(b) Full Recovery
(c) Simple Recovery
(d) Bulk-Logged Recovery
12. Which is not the characteristic of a view?
(a) Consumes Disk space for data
(b) Multiple tables
(c) Multiple rows
13. Modern RDBMS s perform the following the following function except _______.
(a) Force column values in one table to match any of the values in a column of
another table
(b) Automatically replicate data on another server
(c) Automatically create new indexes based on query history
(d) Prevent unauthorized users from accessing data at the first level
14. The RAISE_APPLICATION_ERROR ( ) procedure defines errors returned in
which of the following numeric ranges?
(a) -00000 and -99999
(b) -01200 and -01299
(c) -00030 and -00039
(d) -20000 and -20999
15. In which areas of a PL/SQL block must the developer place code for user-defined
exceptions?
(a) Command line PL/SQL block call
(b) Variable declaration section
(c) Executable section
(d) Exception handler

16. UPDATE OR DELETE ON SOCCER_FAN_SNACKS; Which two of the following


keywords may be useful in your trigger source code to distinguish what should run, and
when?
(a) Inserting
(b) Updating
(c) Deleting
(d) Truncating
17. Rollback and Commit affect
(a) Only DML statements
(b) Only DDL statements
(c) . Both (a) and (b)
(d). All statements executed in SQL*PLUS
18. The NOWAIT option works for
(a). Implicit cursors only
(b) Explicit cursors only
(c) Both (a) and (b)
(d) Neither (a) or (b)
19. The default parameter type in stored procedures is
(a) IN
(b) OUT
(c) INOUT
(d) There is no default type
20. INITCAP (oracle) returns
(a) oracle
(b) ORACLE
(c). ORACLe
(d). None of the above
21. The name of the implicit cursor used by Oracle is
(a) DEFAULT
(b) IMPLICIT
(c) SQL
(d) CURSOR

22. The size of DATE data type in Oracle is


(a). 7 bytes
(b). 8 bytes
(c). 4 bytes
(d). 10 bytes
23. Overall logical structure of a database can be expressed graphically by

______________
(a). ER diagram
(b). Records
(c). Relations
(d). Hierarchy
24. A table can have maximum _____________ no. of Long Raw data type columns
(a). One
(b). No limit
(c) 255
(d) Depends on table space
25. Which of the following objects are dropped automatically when a table is dropped?
(a). Procedure
(b). Constraints
(c). Views
(d). Synonyms
26. Which of the following fields in a student file can be used as a primary key?
(a) Class
(b) Social Security Number
(c) GPA
(d) Major
27. A command that lets you change one or more fields in a record is
(a). insert
(b) Modify
(c) Lookup
(d). none of above.

28. Which is the make given to the database management system which is able to
handle full text data, image data, audio and video?
(a). full media
(b). graphics media
(c). multimedia
(d). hypertext
29. The keys that can have NULL values are
(a). Primary Key
(b). Unique Key
(c). Foreign Key
(d) Both B and C
30. Triggers can be written for
(a). Insert, delete, update
(b). Create, alter, drop
(c) . Login, logout
(d). (A), (B) and (C)

You might also like