207
81k
Chapter:

1200+ more mcqs Solved MCQs

in DataBase Management System (DBMS)

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) , Bachelor of Science in Computer Science FY (BSc CS) , Bachelor of Science in Computer Science SY (BSc CS) , Bachelor of Science in Information Technology SY (BSc IT) , Bachelor of Computer Applications (BCA) .

Chapters

More MCQs
201.

How can you find rows that do not match some specified condition?

A. exists
B. double use of not exists
C. not exists
D. none of the mentioned
Answer» B. double use of not exists
202.

Which one of the following deletes all the entries but keeps the structure of the relation.

A. delete from r where p;
B. delete from instructor where dept name= ’finance’;
C. delete from instructor where salary between 13000 and 15000;
D. delete from instructor;
Answer» D. delete from instructor;
203.

The problem of ordering the update in multiple updates is avoided using

A. set
B. where
C. case
D. when
Answer» C. case
204.

The        condition allows a general predicate over the relations being joined.

A. on
B. using
C. set
D. where
Answer» A. on
205.

Which of the join operations do not preserve non matched tuples?

A. left outer join
B. right outer join
C. inner join
D. natural join
Answer» C. inner join
206.

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 mentioned
Answer» C. outer join
207.

How many tables may be included with a join?

A. one
B. two
C. three
D. all of the mentioned
Answer» D. all of the mentioned
208.

Which are the join types in join condition:

A. cross join
B. natural join
C. join with using clause
D. all of the mentioned
Answer» D. all of the mentioned
209.

How many join types in join condition:

A. 2
B. 3
C. 4
D. 5
Answer» D. 5
210.

The operation which is not considered a basic operation of relational algebra is

A. join
B. selection
C. union
D. cross product
Answer» A. join
211.

In SQL the statement select * from R, S is equivalent to

A. select * from r natural join s
B. select * from r cross join s
C. select * from r union join s
D. select * from r inner join s
Answer» B. select * from r cross join s
212.

Which of the following creates a virtual relation for storing the query?

A. function
B. view
C. procedure
D. none of the mentioned
Answer» B. view
213.

Materialised views make sure that

A. view definition is kept stable
B. view definition is kept up-to-date
C. view definition is verified for error
D. view is deleted after specified time
Answer» B. view definition is kept up-to-date
214.

Updating the value of the view

A. will affect the relation from which it is defined
B. will not change the view definition
C. will not affect the relation from which it is defined
D. cannot determine
Answer» A. will affect the relation from which it is defined
215.

Which of the following is used at the end of the view to reject the tuples which do not satisfy the condition in where clause?

A. with
B. check
C. with check
D. all of the mentioned
Answer» C. with check
216.

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

A. transaction
B. commit
C. rollback
D. flashback
Answer» A. transaction
217.

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. rollback
218.

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. rollback
219.

In order to maintain the consistency during transactions, database provides

A. commit
B. atomic
C. flashback
D. retain
Answer» B. atomic
220.

A transaction completes its execution is said to be

A. committed
B. aborted
C. rolled back
D. failed
Answer» A. committed
221.

Which of the following is used to get back all the transactions back after rollback?

A. commit
B. rollback
C. flashback
D. redo
Answer» C. flashback
222.

             will undo all statements up to commit?

A. transaction
B. flashback
C. rollback
D. abort
Answer» C. rollback
223.

Which of the following is not an integrity constraint?

A. not null
B. positive
C. unique
D. check ‘predicate’
Answer» B. positive
224.

Domain constraints, functional dependency and referential integrity are special forms of                    

A. foreign key
B. primary key
C. assertion
D. referential constraint
Answer» C. assertion
225.

Which of the following is the right syntax for the assertion?

A. create assertion ‘assertion-name’ check ‘predicate’;
B. create assertion check ‘predicate’ ‘assertion-name’;
C. create assertions ‘predicates’;
D. all of the mentioned
Answer» A. create assertion ‘assertion-name’ check ‘predicate’;
226.

Data integrity constraints are used to:

A. control who is allowed access to the data
B. ensure that duplicate records are not entered into the table
C. improve the quality of data entered for a specific property (i.e., table column)
D. prevent users from changing the values stored in the table
Answer» C. improve the quality of data entered for a specific property (i.e., table column)
227.

Dates must be specified in the format

A. mm/dd/yy
B. yyyy/mm/dd
C. dd/mm/yy
D. yy/dd/mm
Answer» B. yyyy/mm/dd
228.

A                  on an attribute of a relation is a data structure that allows the database system to find those tuples in the relation that have a specified value for that attribute efficiently, without scanning through all the tuples of the relation.

A. index
B. reference
C. assertion
D. timestamp
Answer» A. index
229.

Which of the following is used to store movie and image files?

A. clob
B. blob
C. binary
D. image
Answer» B. blob
230.

The user defined data type can be created using

A. create datatype
B. create data
C. create definetype
D. create type
Answer» D. create type
231.

Values of one type can be converted to another domain using which of the following?

A. cast
B. drop type
C. alter type
D. convert
Answer» A. cast
232.

Which of the following closely resembles Create view?

A. create table . . .like
B. create table . . . as
C. with data
D. create view as
Answer» B. create table . . . as
233.

In contemporary databases, the top level of the hierarchy consists of              each of which can contain            

A. catalogs, schemas
B. schemas, catalogs
C. environment, schemas
D. schemas, environment
Answer» A. catalogs, schemas
234.

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
Answer» D. all of the mentioned
235.

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
Answer» B. grant update(budget) on department to raj
236.

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 relations used to define the view
B. the user who creates a view cannot be given update authorization on a view without having update authorization on the relations used to define the view
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
Answer» C. if a user creates a view on which no authorization can be granted, the system will allow the view creation request
237.

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
Answer» D. with grant option
238.

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;
Answer» B. revoke select on department from amit, satoshi restrict;
239.

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
Answer» A. the privilege must be granted only by roles
240.

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
Answer» B. dynamic sql
241.

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.*;
Answer» A. import java.sql.*;
242.

Which of the following invokes functions in sql?

A. prepared statements
B. connection statement
C. callable statements
D. all of the mentioned
Answer» C. callable statements
243.

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()
Answer» A. getmetadata()
244.

Which of the following is used as the embedded SQL in COBOL?

A. exec sql <embedded sql statement >;
B. exec sql <embedded sql statement > end-exec
C. exec sql <embedded sql statement >
D. exec sql <embedded sql statement > end exec;
Answer» B. exec sql <embedded sql statement > end-exec
245.

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

A. .
B.
C. :
D. ,
Answer» B. –
246.

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

A. setblob()
B. getblob()
C. getclob()
D. all of the mentioned
Answer» D. all of the mentioned
247.

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
Answer» B. triggers
248.

Triggers are supported in

A. delete
B. update
C. views
D. all of the mentioned
Answer» C. views
249.

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
Answer» B. these triggers run after an insert, update or delete on a table
250.

The variables in the triggers are declared using

A.
B. @
C. /
D. /@
Answer» B. @

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.