πŸ—„οΈ

Database Management System MCQs

749+ questions with answers

101

The database administrator who authorizes all the new users, modifies the database and takes grants privilege is

a Super user
b Administrator
c Operator of operating system
d All of the mentioned
Medium
View Details β†’
102

Which of the following is used to provide privilege to only a particular attribute?

a Grant select on employee to Amit
b Grant update(budget) on department to Raj
c Grant update(budget,salary,Rate) on department to Raj
d Grant delete to Amit
Medium
View Details β†’
103

Which of the following statement is used to remove the privilege from the user Amir?

a Remove update on department from Amir
b Revoke update on employee from Amir
c Delete select on department from Raj
d Grant update on employee from Amir
Medium
View Details β†’
104

Which of the following is true regarding views?

a The user who creates a view cannot be given update authorization on a view without having update authorization on the relat
b The user who creates a view cannot be given update authorization on a view without having update authorization on the relat
c If a user creates a view on which no authorization can be granted, the system will allow the view creation request
d A user who creates a view receives all privileges on that view
Medium
View Details β†’
105

If we wish to grant a privilege and to allow the recipient to pass the privilege on to other users, we append the __________ clause to the appropriate grant command.

a With grant
b Grant user
c Grant pass privelege
d With grant option
Medium
View Details β†’
106

Which of the following is used to avoid cascading of authorizations from the user?

a Granted by current role
b Revoke select on department from Amit, Satoshi restrict;
c Revoke grant option for select on department from Amit;
d Revoke select on department from Amit, Satoshi cascade;
Medium
View Details β†’
107

The granting and revoking of roles by the user may cause some confusions when that user role is revoked. To overcome the above situation

a The privilege must be granted only by roles
b The privilege is granted by roles and users
c The user role cannot be removed once given
d By restricting the user access to the roles
Medium
View Details β†’
108

Which of the following is used to access the database server at the time of executing the program and get the data from the server accordingly?

a Embedded SQL
b Dynamic SQL
c SQL declarations
d SQL data analysis
Medium
View Details β†’
109

Which of the following header must be included in java program to establish database connectivity using JDBC ?

a Import java.sql.*;
b Import java.sql.odbc.jdbc.*;
c Import java.jdbc.*;
d Import java.sql.jdbc.*;
Medium
View Details β†’
110

DriverManager.getConnection(_______ , ______ , ______) What are the two parameters that are included?

a URL or machine name where server runs, Password, User ID
b URL or machine name where server runs, User ID, Password
c User ID, Password, URL or machine name where server runs
d Password, URL or machine name where server runs, User ID
Medium
View Details β†’
111

Which of the following invokes functions in sql?

a Prepared Statements
b Connection statement
c Callable statements
d All of the mentioned
Medium
View Details β†’
112

Which of the following function is used to find the column count of the particular resultset?

a getMetaData()
b Metadata()
c getColumn()
d get Count()
Medium
View Details β†’
113

Which of the following is a following statement is a prepared statements?

a Insert into department values(?,?,?)
b Insert into department values(x,x,x)
c SQLSetConnectOption(conn, SQL AUTOCOMMIT, 0)
d SQLTransact(conn, SQL ROLLBACK)
Medium
View Details β†’
114

Which of the following is used to distinguish the variables in SQL from the host language variables?

a .
b –
c :
d ,
Medium
View Details β†’
115

Which of the following is used to access large objects from a database ?

a setBlob()
b getBlob()
c getClob()
d all of the mentioned
Medium
View Details β†’
116

Which of the following is used to input the entry and give the result in a variable in a procedure?

a Put and get
b Get and put
c Out and In
d In and out
Medium
View Details β†’
117

The format for compound statement is

a Begin ……. end
b Begin atomic……. end
c Begin ……. repeat
d Both Begin ……. end and Begin atomic……. end
Medium
View Details β†’
118

A stored procedure in SQL is a___________

a Block of functions
b Group of Transact-SQL statements compiled into a single execution plan.
c Group of distinct SQL statements.
d None of the mentioned
Medium
View Details β†’
119

Temporary stored procedures are stored in _________ database.

a Master
b Model
c User specific
d Tempdb
Medium
View Details β†’
120

Declare out of classroom seats condition DECLARE exit handler FOR OUT OF classroom seats BEGIN SEQUENCE OF statements END

a Calling procedures
b Handling Exception
c Handling procedures
d All of the mentioned
Medium
View Details β†’
121

A __________ is a special kind of a store procedure that executes in response to certain action on the table like insertion, deletion or updation of data.

a Procedures
b Triggers
c Functions
d None of the mentioned
Medium
View Details β†’
122

Triggers are not supported for

a Delete
b Update
c Views
d Insert
Medium
View Details β†’
123

The CREATE TRIGGER statement is used to create the trigger. THE _____ clause specifies the table name on which the trigger is to be attached. The ______ specifies that this is an AFTER INSERT trigger.

a for insert, on
b On, for insert
c For, insert
d None of the mentioned
Medium
View Details β†’
124

What are the after triggers?

a Triggers generated after a particular operation
b These triggers run after an insert, update or delete on a table
c These triggers run after an insert, views, update or delete on a table
d All of the mentioned
Medium
View Details β†’
125

The variables in the triggers are declared using

a –
b @
c /
d /@
Medium
View Details β†’
126

The default extension for an Oracle SQL*Plus file is:

a .txt
b .pls
c .ora
d .sql
Medium
View Details β†’
127

What are the different in triggers?

a Define, Create
b Drop, Comment
c Insert, Update, Delete
d All of the mentioned
Medium
View Details β†’
128

Triggers ________ enabled or disabled

a Can be
b Cannot be
c Ought to be
d Always
Medium
View Details β†’
129

Which prefixes are available to Oracle triggers?

a : new only
b : old only
c Both :new and : old
d Neither :new nor : old
Medium
View Details β†’
130

Any recursive view must be defined as the union of two subqueries: a _______ query that is nonrecursive and a __________ query.

a Base, recursive
b Recursive, Base
c Base, Redundant
d View, Base
Medium
View Details β†’
131

Ranking of queries is done by which of the following?

a Group by
b Order by
c Having
d Both Group by and Order by
Medium
View Details β†’
132

In rank() function if one value is shared by two tuples then

a The rank order continues as counting numbers
b The rank order continues by leaving one rank in the middle
c The user specifies the order
d The order does not change
Medium
View Details β†’
133

The __________ function that does not create gaps in the ordering.

a Intense_rank()
b Continue_rank()
c Default_rank()
d Dense_rank()
Medium
View Details β†’
134

If there are n tuples in the partition and the rank of the tuple is r, then its ________ is defined as (r βˆ’1)/(nβˆ’1).

a Ntil()
b Cum_rank
c Percent_rank
d rank()
Medium
View Details β†’
135

The functions which construct histograms and use buckets for ranking is

a Rank()
b Newtil()
c Ntil()
d None of the mentioned
Medium
View Details β†’
136

The command ________________ such tables are available only within the transaction executing the query and are dropped when the transaction finishes.

a Create table
b Create temporary table
c Create view
d Create label view
Medium
View Details β†’
137

OLAP stands for

a Online analytical processing
b Online analysis processing
c Online transaction processing
d Online aggregate processing
Medium
View Details β†’
138

Data that can be modeled as dimension attributes and measure attributes are called _______ data.

a Multidimensional
b Singledimensional
c Measured
d Dimensional
Medium
View Details β†’
139

The generalization of cross-tab which is represented visually is ____________ which is also called as data cube.

a Two dimensional cube
b Multidimensional cube
c N-dimensional cube
d Cuboid
Medium
View Details β†’
140

The process of viewing the cross-tab (Single dimensional) with a fixed value of one attribute is

a Slicing
b Dicing
c Pivoting
d Both Slicing and Dicing
Medium
View Details β†’
141

The operation of moving from finer-granularity data to a coarser granularity (by means of aggregation) is called a ________

a Rollup
b Drill down
c Dicing
d Pivoting
Medium
View Details β†’
142

In SQL the cross-tabs are created using

a Slice
b Dice
c Pivot
d All of the mentioned
Medium
View Details β†’
143

What do data warehouses support?

a OLAP
b OLTP
c OLAP and OLTP
d Operational databases
Medium
View Details β†’
144

Which one of the following is the right syntax for DECODE?

a DECODE (search, expression, result [, search, result]… [, default])
b DECODE (expression, result [, search, result]… [, default], search)
c DECODE (search, result [, search, result]… [, default], expression)
d DECODE (expression, search, result [, search, result]… [, default])
Medium
View Details β†’
145

Relational Algebra is a __________ query language that takes two relations as input and produces another relation as an output of the query.

a Relational
b Structural
c Procedural
d Fundamental
Medium
View Details β†’
146

Which of the following is a fundamental operation in relational algebra?

a Set intersection
b Natural join
c Assignment
d None of the mentioned
Medium
View Details β†’
147

Which of the following is used to denote the selection operation in relational algebra?

a Pi (Greek)
b Sigma (Greek)
c Lambda (Greek)
d Omega (Greek)
Medium
View Details β†’
148

For select operation the ________ appear in the subscript and the ___________ argument appears in the paranthesis after the sigma.

a Predicates, relation
b Relation, Predicates
c Operation, Predicates
d Relation, Operation
Medium
View Details β†’
149

The ___________ operation, denoted by βˆ’, allows us to find tuples that are in one relation but are not in another.

a Union
b Set-difference
c Difference
d Intersection
Medium
View Details β†’
150

Which is a unary operation:

a Selection operation
b Primitive operation
c Projection operation
d Generalized selection
Medium
View Details β†’