Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 35

1.

DATABASE SYSTEM CONCEPT

Multiple Choice Question:

1.What is a database?
a) Organized collection of information that cannot be accessed, updated, and managed
b) Collection of data or information without organizing
c) Organized collection of data or information that can be accessed, updated, and managed
d) Organized collection of data that cannot be update.

Answer: C

2. What is the full form of DBMS?


a) Data of Binary Management System
b) Database Management System
c) Database Management Service
d) Data Backup Management System

Answer: B

3. What is DBMS?
a) DBMS is a collection of queries
b) DBMS is a high-level language
c) DBMS is a programming language
d) DBMS stores, modifies and retrieves data

Answer: D

4. Who created the first DBMS?


a) Edgar Frank Codd
b) Charles Bachman
c) Charles Babbage
d) Sharon B. Codd

Answer: B

5. Image oriented data


b) Text, files containing data
c) Data in the form of audio or video
d) All of the above

Answer: D

6. In which of the following formats data is stored in the database management system?
a) Image
b) Text
c) Table
d) Graph

Answer: C

7. Which of the following is not a type of database?


a) Hierarchical
b) Network
c) Distributed
d) Decentralized
View Answer
Answer: d
8. Which of the following is not an example of DBMS?
a) MySQL
b) Microsoft Acess
c) IBM DB2
d) Google

Answer: D

9. Which of the following is a feature of DBMS?


a) Minimum Duplication and Redundancy of Data
b) High Level of Security
c) Single-user Access only
d) Support ACID Property

Answer: C

10. Which of the following is a feature of the database?


a) No-backup for the data stored
b) User interface provided
c) Lack of Authentication
d) Store data in multiple locations

Answer: B

11. Which of the following is not a function of the database?


a) Managing stored data
b) Manipulating data
c) Security for stored data
d) Analyzing code

Answer: D

12. Which of the following is a function of the DBMS?


a) Storing data
b) Providing multi-users access control
c) Data Integrity
d) All of the above

Answer: D

13. Which of the following is a component of the DBMS?


a) Data
b) Data Languages
c) Data Manager
d) All of the above

Answer: D

14. Which of the following is known as a set of entities of the same type that share same properties, or
attributes?
a) Relation set
b) Tuples
c) Entity set
d) Entity Relation model
Answer: C

15. What is information about data called?


a) Hyper data
b) Tera data
c) Meta data
d) Relations

Answer: C

16. What does an RDBMS consist of?


a) Collection of Records
b) Collection of Keys
c) Collection of Tables
d) Collection of Fields

Answer: C

17. The values appearing in given attributes of any tuple in the referencing relation must likewise occur in
specified attributes of at least one tuple in the referenced relation, according to _____________________
integrity constraint.
a) Referential
b) Primary
c) Referencing
d) Specific

Answer: A

18. _____________ is a hardware component that is most important for the operation of a database management
system.
a) Microphone
b) High speed, large capacity disk to store data
c) High-resolution video display
d) Printer

Answer: B

19. The DBMS acts as an interface between ________________ and ________________ of an enterprise-class
system.
a) Data and the DBMS
b) Application and SQL
c) Database application and the database
d) The user and the software

Answer: C

20. The ability to query data, as well as insert, delete, and alter tuples, is offered by ____________
a) TCL (Transaction Control Language)
b) DCL (Data Control Language)
c) DDL (Data Definition Language)
d) DML (Data Manipulation Language)

Answer: D

21. ______________ is a set of one or more attributes taken collectively to uniquely identify a record.
a) Primary Key
b) Foreign key
c) Super key
d) Candidate key
Answer: C

22. Which command is used to remove a relation from an SQL?


a) Drop table
b) Delete
c) Purge
d) Remove

Answer: A

23. Which of the following set should be associated with weak entity set for weak entity to be meaningful?
a) Neighbor set
b) Strong entity set
c) Owner set
d) Identifying set

Answer: D

24. Which of the following command is correct to delete the values in the relation teaches?
a) Delete from teaches;
b) Delete from teaches where Id =’Null’;
c) Remove table teaches;
d) Drop table teaches;

Answer: A

25. Procedural language among the following is __________


a) Domain relational calculus
b) Tuple relational calculus
c) Relational algebra
d) Query language

Answer: C

26. _________________ operations do not preserve non-matched tuples.


a) Left outer join
b) Inner join
c) Natural join
d) Right outer join

Answer: B

27. Which forms have a relation that contains information about a single entity?
a) 4NF
b) 2NF
c) 5NF
d) 3NF

Answer: A

28. The top level of the hierarchy consists of ______ each of which can contain _____.
a) Schemas, Catalogs
b) Schemas, Environment
c) Environment, Schemas
d) Catalogs, Schemas
Answer: D

29. _______ indicates the maximum number of entities that can be involved in a relationship.
a) Greater Entity Count
b) Minimum cardinality
c) Maximum cardinality
d) ERD

Answer: C

30. For designing a normal RDBMS which of the following normal form is considered adequate?
a) 4NF
b) 3NF
c) 2NF
d) 5NF

Answer: B

31. Which of the following gives a logical structure of the database graphically?
a) Entity-relationship diagram
b) Entity diagram
c) Database diagram
d) Architectural representation

Answer: A

32. The entity relationship set is represented in E-R diagram as


a) Double diamonds
b) Undivided rectangles
c) Dashed lines
d) Diamond

Answer: D

33. The Rectangles divided into two parts represents


a) Entity set
b) Relationship set
c) Attributes of a relationship set
d) Primary key

Answer: A

34. Consider a directed line(->) from the relationship set advisor to both entity sets instructor and student. This
indicates _________ cardinality
a) One to many
b) One to one
c) Many to many
d) Many to one

Answer: B

35. We indicate roles in E-R diagrams by labeling the lines that connect ___________ to __________
a) Diamond , diamond
b) Rectangle, diamond
c) Rectangle, rectangle
d) Diamond, rectangle

Answer: D
36. An entity set that does not have sufficient attributes to form a primary key is termed a __________
a) Strong entity set
b) Variant set
c) Weak entity set
d) Variable set

Answer: C

37. For a weak entity set to be meaningful, it must be associated with another entity set, called the
a) Identifying set
b) Owner set
c) Neighbour set
d) Strong entity set

Answer: A

38. Weak entity set is represented as


a) Underline
b) Double line
c) Double diamond
d) Double rectangle
Answer: D
39. If you were collecting and storing information about your music collection, an album would be considered
a(n) _____
a) Relation
b) Entity
c) Instance
d) Attribute

Answer: B

40. What term is used to refer to a specific record in your music database; for instance; information stored about
a specific album?
a) Relation
b) Instance
c) Table
d) Column

Answer: B
2.Relational Data Model

41. Dr.E.F. Codd represented.......rules that a database must obey if it has to be considered


truly relational.
(A) 10
(B) 15
(C) 14
(D) 12
Answer: D

42. The language used in application programs to request data from the DBMS is referred to as
the
(A) DML
(B) DDL
(C) DCL
(D) None of the above
Answer: A

43..In SQL, which command is used to update existing row in a table


(A) Insert
(B) Delete
(C) Update
(D) None of the above
Answer: C

44. In SQL, TCL  stands for-----


(A) Transmission Control Language
(B) Transaction Central Language
(C) Ternary Control Language
(D) Transaction Control Language
Answer: D

45.  --------is used to control privilege in Database.


(A) Data Manipulation Language
(B) Data Definition Language
(C) Data Query Language
(D) Data Control Language
Answer D

0046.Which SQL statement is used to extract data from a database?


(A) EXTRACT
(B) GET
(C) OPEN
(D) SELECT
Answer: D

47.Which of the following keyword can be used to return different values?


(A) SELECT
(B) GET
(C) OPEN
(D) DISTINCT
Answer: D

48.. operator is used to display a record if either the first condition or the second condition
is true.
(A) AND
(B) OR
(C) Both (A) & (B)
(D) None of the above
Answer: B

49. Which one of the following is a set of one or more attributes taken collectively to uniquely identify a record?
A). Candidate key 
B. Sub key 
C. Super key 
D. Foreign key
Answer: C

50.  A attribute in a relation is a foreign key if the _______ key from one relation is used as an attribute in that  relation .
A) candidate 
B. Primary 
C. Super 
D. Sub
Answer:A

51. A function that has no partial functional dependencies is in _______ form :


[A] 3NF
[B] 2NF
[C] 4NF
[D] BCNF
Answer :B

52. Third normal form is based on the concept of _________


[A] Closure Dependency
[B] Transitive Dependency
[C] Normal Dependency
[D] Functional Dependency
Answer: B

53. Functional dependencies are a generalization of :


[A] Key dependencies
[B] Relation dependencies
[C] Database dependencies
[D] None of these
Answer: A

54. Which of the following is/are the DDL statements? 

A. Create 
B. Drop 
C. Alter 
D. All of the Mentioned
Answer: D

55. Which of the following statement removes sales and suppliers database?


A. DROP DATABASE Sales, NewSales 
B. DROP DATABASE Sales, suppliers 
C. DROP DATABASE Sales and suppliers 
D. DROP DATABASE Sales-suppliers
Answer: B.

56. Which of the following is not included in DML (Data Manipulation Language)?


A. Insert 
B. Update 
C. Delete 
D. Alter
Answer: D.

57 Which of the following columns in a table cannot be updated?


A. DATE type columns in the table 
B. Columns which allows NULL values in the table 
C. A primary key column which also serves as foreign key reference in another table 
D. All of the above
Answer: C

58. What is the maximum value that can be stored in NUMERIC(4,2)?


A. 9999.99 
B. 99.9999 
C. 99.99 
D. 9.99
Answer: C

59. Determine data type for the given column? Column Name: IFSC_Code ; Description: A 11 Character
alphanumeric code that identifies a bank branch ; Example: SBIN0009044.
A. VARCHAR2(50) 
B. NUMBER 
C. Char(11) 
D. NUMBER(11)
Answer: C.

60. Which of the following is not an integrity constraint?


A. Not null 
B. Positive 
C. Unique 
D. Check predicate
Answer: B

61.Foreign key is the one in which the ________ of one relation is referenced in another relation.
A. Foreign key 
B. Primary key 
C. References 
D. Check constraint
Answer: B

62. Which one of the following is used to define the structure of the relation ,deleting relations and relating
schemas ?
A. DML(Data Manipulation Langauge) 
B. DDL(Data Definition Langauge) 
C. Query 
D. Relational Schema
Answer: B

63. The basic data type char(n) is a _____ length character string and varchar(n) is _____ length character.
A. Fixed, equal 
B. Fixed, variable 
C. Equal, variable 
D. Variable, equal
Answer: B

64. Which ACID property specifies that once the transaction is committed, its permanent even in case of power
failures?
A. Atomicity 
B. Consistency 
C. Isolation 
D. Durability
Answer: D

65.  Command that comes under DCL is/are -


A.GRANT
B.REVOKE
C.Both A. and B.
D.None of the above
Answer: C

66. . Following the completion of a transaction, it must be executed to save all the operations performed in the
transaction. Here we are talking about which command?

A.REVOKE
B.COMMIT
C.ROLLBACK
D.SAVE

Answer: B

67 .Difference between GRAND & REVOKE command is/are?

A. The GRANT command can be used to grant a user access to databases and tables whereas The
REVOKE command can be used to revoke all access privileges already assigned to the user.
B. The REVOKE command can be used to grant a user access to databases and tables whereas The
GRANT command can be used to revoke all access privileges already assigned to the user.
C. A transaction can be rolled back to its last saved state.
D. None of the above

Answer: A

68. The database design prevents some data from being stored due to _______.
A. Deletion anomalies
B. Insertion anomalies
C. Update anomalies
D. Selection anomalies
Answer: B.
69.  In which normal foam Boyee-code can operate?
A.first normal foam
B.second normal foam
C.third normal foam
D.all of above
Answer: D
70. ______________ and all tables in the database should be only one primary key.
A.2NF
B.3NF
C.key
D.primary key
Answer: B.

71.  If we want to retain all duplicates, we must write ________ in place of union.
a) Union all
b) Union some
c) Intersect all
d) Intersect some
Answer: A
72.  Which of the following statement is correct?
A. Comparison Operator has higher precedence than Conjunction Operator.
B. Identity Operator has higher precedence than Multiplication Operator.
C. Both A and B
D. None of the above

Answer: C

73. Which of these are the types of operators?

a)Arithmetic
b)Comparison
c)Set
d)All of the above

Answer: D

74.SQL Division operator divides the operand on the ____ side by the operand on the ____ side.
a)Left, Left
b)Right, Left
c)Left, Right
d)Right, Right
Answer: C
75.Which of the following is a SQL Logical Operator?
A)SQL ALL Operator
B)SQL OR Operator
C)SQL LIKE Operator
D)All of the above
Answer: D
76.To combine multiple retrievals, we write several SELECT statements and put the keyword between them.
What is the keyword?
A. COMBINE
B. CONCAT
C. JOIN
D. UNION
Answer: D
77.Which of the following is TRUE about Pattern Matching in SQL?
A)In SQL, pattern matching is performed with LIKE clauses.
B)An SQL query usually begins with a LIKE clause before a WHERE clause
C)Using the LIKE clause in an SQL query, we compare the pattern in the query with the pattern present in a
table.
D)All of the above
Answer: D
78.What is the difference between UNION & UNION ALL operators?
A)Combining the results of two select statements will be done using UNION whereas combined records from
both queries are returned by UNION ALL operator.
B)Combining the results of two select statements will be done using UNION ALL whereas combined records
from both queries are returned by UNION operator.
C)After performing the UNION operation, duplicate rows will not be removed whereas after performing the
UNION ALL operation, duplicate rows will be removed.
D)None of the above
Answer: A
79.If we want to retain all duplicates, we must write ________ in place of union.
a) Union all
b) Union some
c) Intersect all
d) Intersect some
Answer: A
80._ _ _ ’ matches any string of ______ three characters. ’_ _ _ %’ matches any string of at ______ three
characters.
a) Atleast, Exactly
b) Exactly, Atleast
c) Atleast, All
d) All, Exactly
Answer: B
3.Interactive SQL and Advance SQL
81. What is SQL Server?
a) SQL Server is a relational database management system
b) SQL Server is a software whose main purpose is to store and retrieve data
c) SQL Server is a highly secure server and does not allow any database file manipulation during execution
d) All of the mentioned

Answer: A

82. When was the first version of Microsoft SQL Server released?
a) 1991
b) 1990
c) 1988
d) 1983

Answer: C

83. Which of the following is a free database software running free SQL Server technology?
a) SQL Server Web
b) SQL Server Enterprise
c) SQL Server Workgroup
d) SQL Server Express

Answer: D

84. Which of the following companies originally worked together to create and market the first version of SQL
Server?
a) Sybase
b) Ashton-Tate
c) Microsoft
d) All of the Mentioned

Answer: D

85.  What is the Codename for SQL Server 2012?


a) Katmai
b) Denali
c) Heaton
d) Kilimanjaro

Answer: B

86. Which was the first version of SQL Server to introduce in-memory capability?
a) SQL Server 2005
b) SQL Server 2008
c) SQL Server 2012
d) SQL Server 2014

Answer: D
 
87.  Which of the following data type is not present in SQL Server?
a) Geography
b) hierarchyid
c) Boolean
d) bit

Answer: C

88. Which database is used by SQL Server Agent for scheduling alerts and jobs, and recording operators?
a) temp
b) model
c) msdb
d) master

Answer: C

89. SQL Server has mainly how many types of views?


a) four
b) three
c) one
d) two

Answer: D

90.  Which of the following is not a SQL Server INFORMATION_SCHEMA view?


a) Sys.dm_ exec_ connections
b) INFORMATION_SCHEMA.KEY_COLUMN_USAGE
c) INFORMATION_SCHEMA.DOMAIN_CONSTRAINTS
d) INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE

Answer: A

91. Which of the following joins is SQL server default?


a) Inner
b) Equi
c) Outer
d) None of the Mentioned

Answer: A

92.  Which of the following is not a class of constraint in SQL Server?


a) UNIQUE
b) NOT NULL
c) CHECK
d) NULL

Answer: D

93. Which of the reasons will force you to use the XML data model in SQL Server?
a) Order is inherent in your data
b) Your data is sparse or you do not know the structure of the data
c) Your data represents containment hierarchy
d) All of the Mentioned

Answer: D
 
94. What is the hybrid model in SQL Server?
a) Using XML with views
b) Using XML with triggers
c) Combination of relational and XML data type columns
d) Combination of relational and non-relational data type columns
Answer: C

95.  Which of the following feature of SQL Server was used before XML technology for semi structured data?
a) In memory database
b) Stored Procedure
c) Dynamic management views
d) None of the mentioned

Answer: B

96. Which of the following language is used for procedural flow in SQL Server?
a) Control-of-flow language
b) Flow language
c) Control language
d) None of the mentioned

Answer: A

97.  Exception handling is possible in SQL Server using _____________


a) FINAL
b) FINALLY
c) THROW
d) All of the mentioned

Answer: C

98. Which of the following stored procedure is already defined in SQL Server?
a) System defined Procedure
b) CLR Stored Procedure
c) Extended Procedure
d) User Defined Stored Procedure

Answer: A

99.  DML triggers in SQL Server is applicable to _____________


a) Update
b) Delete
c) Insert
d) All of the mentioned

Answer: D

100.  User defined function in SQL Server can return ____________


a) Result set
b) Scalar value
c) Set of values
d) All of the mentioned

Answer: D
 
101. Which of the stored procedure is used to test the SQL injection attack?
a) xp_reg
b) xp_write
c) xp_regwrite
d) all of the mentioned

Answer: C
102. Which is the default field terminator for bulk insert in SQL Server?
a) Brackets
b) Parenthesis
c) Full stop
d) Comma

Answer: D

103. Which of the following is the main feature of dotConnect for SQL Server?
a) Supports the latest versions of SQL Server
b) Extra data binding capabilities
c) Ability of monitoring query execution
d) All of the mentioned

Answer: D

104. Which of the following is used to overcome the Replication in SQL Server?


a) Availability problems
b) Maintenance problems
c) Performance problems
d) All of the mentioned

Answer: D

105.  When you _______ an Access table from a SQL Server, SSMA restores the original Access table and its
data.
a) Unlink
b) import
c) link
d) all of the mentioned

Answer: A

106. Which of the following SQL Server tools is used to enhance data management and governance?
a) SSDT
b) OBEII
c) SSIT
d) All of the mentioned

Answer: A

107. Backing up your SQL Server database is essential for _______ your data.
a) Replication
b) protecting
c) preventing
d) none of the mentioned

Answer: B

a) Secondary server
b) primary server
c) secondary database
d) primary database

Answer: B
108.What type of join is needed when you wish to include rows that do not have matching values?
a)Equi-join

b)Natural join

c)Outer join

d)All of the above.

Answer :C

109.Which of the following is a comparison operator in SQL?


(A) =  
(B) LIKE
(C) BETWEEN
(D) All of the above

Answer : D

110.Which database level is closest to the users?


(A) External
(B) Internal
(C) Physical
(D) Conceptual

Answer : A

111.Which of the following database object does not physically exist?


(A) base table
(B) index
(C) view
(D) none of the above

Answer : C

112.A set of possible data values is called


(A) attribute.
(B) degree.
(C) tuple.
(D) domain.

Answer : D

113.A primary key is combined with a foreign key creates


(A) Parent-Child relationship between the tables that connect them.
(B) Many to many relationships between the tables that connect them.
(C) Network model between the tables that connect them.
(D) None of the above.

Answer: A

114.NULL is
(A) the same as 0 for integer
(B) the same as blank for character
(C) the same as 0 for integer and blank for character
(D) not a value

Answer: D
115.The ______ operator is used to compare a value to a list of literals values that have been specified.
(A) BETWEEN
(B) ANY
(C) IN
(D) ALL

Answer -A

116.Hierarchical model is also called


(A) Tree structure
(B) Plex Structure
(C) Normalise Structure
(D) Table Structure

Answer : A

117.Which one of the following is not true for a view:


(A) A view is derived from other tables.
(B) A view is a virtual table.
(C) A view definition is permanently stored as part of the database.
(D) The view never contains derived columns.

Answer : C

118.A table joined with itself is called


(A) Join
(B) Self Join
(C) Outer Join
(D) Equi Join

Answer : B

119._________ is a virtual table that draws its data from the result of an SQL SELECT statement.
(A) View
(B) Synonym
(C) Sequence
(D) Transaction

Answer: A

120.A data manipulation command the combines the records from one or more tables is called
(A) SELECT
(B) PROJECT
(C) JOIN
(D) PRODUCT

Answer : C
4.PL/SQL Programming
121.PL/SQL loops are know now as–

A)Iterative Case Statements

B)Iterative Control Statements

C)Indentation Control Statements

D)Indentation Case Statements

Answer: B

122.What is the correct syntax of WHILE Loop?

A)WHILE<condition>

LOOP statements;

ENDLOOP;

B)LOOP statements;

WHILE<condition>

ENDLOOP;

C)ENDLOOP;

WHILE<condition>

LOOP statements;

D)None of the above

Answer: A

What is the correct syntax of WHILE Loop?

A)WHILE<condition>

LOOP statements;

ENDLOOP;

123.InthecontextscreatedbyOracle,acursorrepresentsa_____________.

A)Function
B)Table

C)Pointer

D)None of the above

Answer :C

124.Whichofthefollowingisnotanadvantageoftrigger?

A)Various column values areautomaticallygeneratedbytriggers

B)Maintainstheintegrityofreferential

C)Tablesarereplicatedasynchronously

D)Validatingtransactionsandpreventingthemfrombeinginvalid

Answer:C)Tablesarereplicatedasynchronously

125.WhatdoesINSERTorUPDATEorDELETEclausesdoinTriggersyntax?

A)DMLOperationisperformed

B)DDLOperationisperformed

C)DCLOperationisperformed

D)TCLOperationisperformed

Answer:A)DMLOperationisperformed

126.Whichofthefollowingis/areTRUEaboutPL/SQLVariables?

A)Variablesserveasameansforprogrammerstotemporarilystoredataduringcode

execution.

B)PL/SQLprogramsbenefitfromitsuse.

C)Thereisnothingspecialaboutitotherthanbeingthenameofastoragearea.

D)Alloftheabove

Answer:D)Alloftheabove

127.PL/SQLConstantisa/an_______literalvalue.

A)In-built

B)User-defined

C)Bothaandb
D)Noneoftheabove

Answer:B)User-defined

128.WhatisTRUEaboutconstant_nameinPL/SQLConstant?

A)Exactlylikeavariablename,itisanameforaconstant.

B)Aconstantworddoesn'tchangeitsvalueandisareservedword.

C)BothA.andB.

D)Noneoftheabove

Answer:C)BothA.andB.

129.WhichofthefollowingiscorrectsyntaxofIFstatement?

A)IF-THENstatement

B)IF-THEN-ELSEstatement

C)IF-THEN-ELSIFstatement

D)Alloftheabove

Answer:D)Alloftheabove

130.Whenyouwanttoexecuteaseriesofstatementsrepeatedly,youusethePL/SQL

____loop.

A)CursorFor

B)Cursor

C)For

D)While

Answer:C)For

131.PL/SQLLoopsarealsoknownas–

A)IterativeCaseStatements

B)IterativeControlStatements

C)IndentationControlStatements

D)IndentationCaseStatements
Answer:B)IterativeControlStatements

132.ThePL/SQL________looprunsaseriesofstatementsaslongasaconditionistrue,

soitcanbeusedinaseriesofstatements.

A)While

B)CursorFor

C)Basic

D)For

Answer:A)While

133.Howmanytypesofexceptionarethereinsql?

A.2

B.3

C.4

D.5

Answer:A.2

134.Whichofthefollowingexceptionraisedwhenanarithmetic,conversion,truncation,

orsizeconstrainterroroccurs?mm

A.ZERO_DIVIDE

B.VALUE_ERROR

C.TOO_MANY_ROWS

D.SELF_IS_NULL

Answer:B.Value_Error

135.InthePL/SQLblockbelow,howmanyrowswillbeinsertedinthemessagestable?

DECLARE

v_start_salesNUMBER:=2;

v_end_salesNUMBER:=100;

BEGIN

FORiINv_start_sales..v_end_salesLOOP

INSERTINTOmessages(msgid)
VALUESv_start_sales;

ENDLOOP;

END;

A.0

B.99

C.1

D.100

Answer:B.99

136.Tohandleraisedexceptions,youwriteseparateroutinescalledexceptionhandlers.

A.Yes

B.No

Answer:A

137.AnExplicitcursorisdefinedbytheprogramforanyquerythatreturnsmorethan

onerowofdata.

A.True

B.False

Answer:A.True

138.WhichtypeofcursorisautomaticallydeclaredbyOracleeverytimeanSQL

statementisexecuted?

A.AnImplicit

B.AnExplicit

C.BothA&B

D.Noneoftheabove

Answer.A.Animplicit

139.“NO_DATA_FOUND”and“TOO_MANY_ROWS”arethetwomostcommonerrors

foundwhenexecutingaSELECTstatement.
A.True

B.False

Answer:A.True

140.WhichExceptionisalsoknownasOraclenamedexceptionhandler?

A.PredefinedException

B.InternalException

C.UserdefinedException

D.Noneoftheabove

Ans:A.predefinedException

141.Howcanauserdefinedexceptionberaised?

A.UsingRAISEstatementonly

B.UsingRAISEstatementorRAISE_APPL_ERRORfunction

CUsingINVOKEstatementorRAISEstatement

D.UsingRAISEstatementorRAISE_APPLICATION_ERRORprocedure

Ans:D.UsingRAISEstatementorRAISE_APPLICATION_ERRORprocedure

142.Whichofthefollowingexecutesthequeryandidentifiestheresultset,consistingof

allrowsthatmeetthequerysearchcriteria.

A.FetchingwithaCursor

B.Openingacursor

C.Fetchingbulkdatawithacursor

D.Noneoftheabove

AnswerB.Openingacursor.

143.Whichofthefollowingreturnsalldistinctrowsselectedbyeitherquery?

A.INTERSECT

B.MINUS

C.UNION
D.UNIONALL

Answer:C.UNION

144.Whichofthefollowingisusedtodefinecodethatisfiredwhencertainactionsor

eventoccur?

A.Replace

B.Keyword

C.Trigger

D.Cursor

Answer:C.Trigger

145.Whatcommandisusedtoremovingtrigger?

A.DROPTRIGGERTrig;

B.ALTERTRIGGERTrig;

CDELETETRIGGERTrig;

D.Noneoftheabove

Ans:A.DROPTRIGGERTrig;

146.Howtoenablealltriggersonemptable?

AYoucannotenablemultipletriggersonatableinonecommand.

B.ALTERTRIGGERSONTABLEemployeesENABLE;

C.ALTERemployeesENABLEALLTRIGGERS;

D.ALTERTABLEemployeesENABLEALLTRIGGERS;

Answer:D.ALTERTABLEemployeesENABLEALLTRIGGERS;

147.Whenshouldforwarddeclarationbeusedinprocedures?

A.Alwaysfornestedprocedures

B.IfnestedsubprogramsinthesamePL/SQLblockinvokeeachother

C.Forpackagedsubprogramsalways

D.Fortwostandalonesubprogramsinvokingeachother
Answer:B.IfnestedsubprogramsinthesamePL/SQLblockinvokeeachother

148.Whichofthefollowingisnotadifferencebetweenprocedureandfunction?

AFunctionscanbecalledfromSQLwhereasprocedurescannotbecalled.

BFunctioncanbeusedinplaceofanexpressionwhereasaprocedurecan’tbeusedso.

C.Thereturnstatementismandatoryforafunctionwhichisnotforaprocedure

D.Functionsareusedforexecutingbusinesslogicandcomputationbutaprocedureis

not.

Answer:D.Functionsareusedforexecutingbusinesslogicandcomputationbuta

procedureisnot.

149.Whatdoesareturnstatementinafunctiondo?

A.Itreturnscontroltothecallingprogramandreturnstheresultsofthefunction.

B.Itreturnscontroltothecallingprogramonlyiftherearenoresultstoshow.

C.Itonlyreturnstheresultsofthefunctionifany.

D.Itterminatesthefunctionwithoutreturnanyresults&returnscontroltothecalling

program.

Ans:A..Itreturnscontroltothecallingprogramandreturnstheresultsofthefunction.

150.TheCREATETRIGGERstatementisusedtocreatethetrigger.THE_____clause

specifiesthetablenameonwhichthetriggeristobeattached.The______specifiesthat

thisisanAFTERINSERTtrigger.

a)forinsert,on

b)On,forinsert

c)For,insert

d)Noneofthementioned

Answer:b)On,forinsert

151.ThedefaultextensionforanOracleSQL*Plusfileis:

a).txt

b).pls

c).ora
d).sql

Answer:d).sql

152.Triggerscanbeenabledordisabledwiththe________statement.

A)ALTERTABLEstatement

B)DROPTABLEstatement

C)DELETETABLEstatement

D)noneofthementioned

Ans:A)ALTERTABLEstatement

153.Whatarethedifferentintriggers?

A.Define,Create

B.Drop,Comment

C.Insert,Update,Delete

D.Allofthementioned

Answer:C.Insert,Update,Delete

154.Triggerisspecialtypeof__________procedure.

A.Function

B.Stored

C.View

D.Table

Answer:B.Stored

155.HowmanytypesoftriggersarepresentinSQLServer?

A.2

B.3

C.4

D.5

Answer:C.4

156._____________procedurecannotbecreatedinResourcedatabase.

a)System
b)Userdefined

c)Extended

d)Allofthementioned

Answer: B

157. If no header is specified, the block is said to be an _______________ PL/SQL block.


a) Strong
b) Weak
c) Empty
d) Anonymous

Answer: D

158. _________________ is a sequence of zero or more characters enclosed by single quotes.


a) Integers literal
b) String literal
c) String units
d) String label

Answer: B

159. In _______________ the management of the password for the account can be handled outside of oracle
such as operating system.
a) Database Authentication
b) Operating System Authentication
c) Internal Authentication
d) External Authentication

Answer: B

160. In ________________ of Oracle, the database administrator creates a user account in the database for each
user who needs access.
a) Database Authentication
b) Operating System Authentication
c) Internal Authentication
d) External Authentication

Answer: A
5.Database Security and Transaction Processing

161. Collections of operations that form a single logical unit of work are called __________
a) Views
b) Networks
c) Units
d) Transactions

Answer: D

162. The “all-or-none” property is commonly referred to as _________


a) Isolation
b) Durability
c) Atomicity
d) None of the mentioned

Answer: C

163. Which of the following is a property of transactions?


a) Atomicity
b) Durability
c) Isolation
d) All of the mentioned

Answer: D

164. Execution of translation in isolation preserves the _________ of a database


a) Atomicity
b) Consistency
c) Durability
d) All of the mentioned

Answer: B

165. Which of the following is not a property of a transaction?


a) Atomicity
b) Simplicity
c) Isolation
d) Durability

Answer: B

166. Which of the following systems is responsible for ensuring durability?


a) Recovery system
b) Atomic system
c) Concurrency control system
d) Compiler system

Answer: A
167. Which of the following systems is responsible for ensuring isolation?
a) Recovery system
b) Atomic system
c) Concurrency control system
d) Compiler system

Answer: C

168. State true or false: Information residing in the volatile storage does not usually survive system crashes
a) True
b) False

Answer: A

169. A transaction that has not been completed successfully is called as _______
a) Compensating transaction
b) Aborted transaction
c) Active transaction
d) Partially committed transaction

Answer: B

170. Which of the following is not a transaction state?


a) Active
b) Partially committed
c) Failed
d) Compensated

Answer: D

181. The execution sequences in concurrency control are termed as ________


a) Serials
b) Schedules
c) Organizations
d) Time tables

Answer: B

182. The scheme that controls the interaction between executing transactions is called as _____
a) Concurrency control scheme
b) Multiprogramming scheme
c) Serialization scheme
d) Schedule scheme

Answer: A

183. Consider money is transferred from (1)account-A to account-B and (2) account-B to account-A. Which of
the following form a transaction?
a) Only 1
b) Only 2
c) Both 1 and 2 individually
d) Either 1 or 2

Answer: C

184. A transaction is delimited by statements (or function calls) of the form __________
a) Begin transaction and end transaction
b) Start transaction and stop transaction
c) Get transaction and post transaction
d) Read transaction and write transaction

Answer: A

185. The Oracle RDBMS uses the ____ statement to declare a new transaction start and its properties.
a) BEGIN
b) SET TRANSACTION
c) BEGIN TRANSACTION
d) COMMIT

Answer: B

186. In SQL, which command is used to issue multiple CREATE TABLE, CREATE VIEW and GRANT
statements in a single transaction?
a) CREATE PACKAGE
b) CREATE SCHEMA
c) CREATE CLUSTER
d) All of the mentioned

Answer: B

187. In SQL, the CREATE TABLESPACE is used


a) To create a place in the database for storage of scheme objects, rollback segments, and naming the data files
to comprise the tablespace
b) To create a database trigger
c) To add/rename data files, to change storage
d) All of the mentioned

Answer: A

188. Which character function can be used to return a specified portion of a character string?
a) INSTR
b) SUBSTRING
c) SUBSTR
d) POS

Answer: C

189. What are the different events in Triggers?


a) Define, Create
b) Drop, Comment
c) Insert, Update, Delete
d) Select, Commit

Answer: C

190. Transaction processing is associated with everything below except


a) Producing detail summary or exception reports
b) Recording a business activity
c) Confirming an action or triggering a response
d) Maintaining a data

Answer: C

191. What is the command used to define view in SQL?


a) define view
b) new view
c) create view
d) none of the mentioned
Answer: C

192. The _______ statement causes the statements to undo all the updates performed on the transaction
a) Undo work
b) Rollback work
c) Commit work
d) Replace work

Answer: B

193. In order to undo the work of transaction after last commit which one should be used?
a) View
b) Commit
c) Rollback
d) Flashback

Answer: C

194. A _________ consists of a sequence of query and/or update statements.


a) Transaction
b) Commit
c) Rollback
d) Flashback

Answer: A

195. Which of the following makes the transaction permanent in the database?
a) View
b) Commit
c) Rollback
d) Flashback

Answer: B

196. Consider the following action:

TRANSACTION.....
Commit;
ROLLBACK;
What does Rollback do?
a) Undoes the transactions before commit
b) Clears all transactions
c) Redoes the transactions before commit
d) No action

Answer: D

197. In case of any shut down during transaction before commit which of the following statement is done
automatically?
a) View
b) Commit
c) Rollback
d) Flashback

Answer: C

198. Transaction processing is associated with everything below except


a) Conforming an action or triggering a response
b) Producing detail summary or exception report
c) Recording a business activity
d) Maintaining a data

Answer: A

199.Execution of translation in isolation preserves the _________ of a database


a) Atomicity
b) Consistency
c) Durability
d) All of the mentioned

Answer: B

200. ______ will undo all statements up to commit?


a) Transaction
b) Flashback
c) Rollback
d) Abort

Answer: C

You might also like