MCQOPTIONS
Saved Bookmarks
This section includes 1294 Mcqs, each offering curated multiple-choice questions to sharpen your Computer Science Engineering (CSE) knowledge and support exam preparation. Choose a topic below to get started.
| 1201. |
Which of the following invokes functions in sql? |
| A. | prepared statements |
| B. | connection statement |
| C. | callable statements |
| D. | all of the mentioned |
| Answer» D. all of the mentioned | |
| 1202. |
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» B. import java.sql.odbc.jdbc.*; | |
| 1203. |
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» C. sql declarations | |
| 1204. |
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» B. the privilege is granted by roles and users | |
| 1205. |
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» E. | |
| 1206. |
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» C. revoke grant option for select on department from amit; | |
| 1207. |
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 deï¬ne 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 deï¬ne 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» D. a user who creates a view receives all privileges on that view | |
| 1208. |
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» C. grant update(budget,salary,rate) on department to raj | |
| 1209. |
The database administrator who authorizes all the new users, modiï¬es the database and takes grants privilege is |
| A. | super user |
| B. | administrator |
| C. | operator of operating system |
| D. | all of the mentioned |
| Answer» E. | |
| 1210. |
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» B. schemas, catalogs | |
| 1211. |
Which of the following closely resembles Create view? |
| A. | create table . . .like |
| B. | create table . . . as |
| C. | with data |
| D. | create view as |
| Answer» C. with data | |
| 1212. |
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» B. drop type | |
| 1213. |
The user deï¬ned data type can be created using |
| A. | create datatype |
| B. | create data |
| C. | create deï¬netype |
| D. | create type |
| Answer» E. | |
| 1214. |
Which of the following is used to store movie and image ï¬les? |
| A. | clob |
| B. | blob |
| C. | binary |
| D. | image |
| Answer» C. binary | |
| 1215. |
A                  on an attribute of a relation is a data structure that allows the database system to ï¬nd those tuples in the relation that have a speciï¬ed value for that attribute efficiently, without scanning through all the tuples of the relation. |
| A. | index |
| B. | reference |
| C. | assertion |
| D. | timestamp |
| Answer» B. reference | |
| 1216. |
Dates must be speciï¬ed in the format |
| A. | mm/dd/yy |
| B. | yyyy/mm/dd |
| C. | dd/mm/yy |
| D. | yy/dd/mm |
| Answer» C. dd/mm/yy | |
| 1217. |
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 speciï¬c property (i.e., table column) |
| D. | prevent users from changing the values stored in the table |
| Answer» D. prevent users from changing the values stored in the table | |
| 1218. |
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» B. create assertion check ‘predicate’ ‘assertion-name’; | |
| 1219. |
Domain constraints, functional dependency and referential integrity are special forms of |
| A. | foreign key |
| B. | primary key |
| C. | assertion |
| D. | referential constraint |
| Answer» D. referential constraint | |
| 1220. |
Which of the following is not an integrity constraint? |
| A. | not null |
| B. | positive |
| C. | unique |
| D. | check ‘predicate’ |
| Answer» C. unique | |
| 1221. |
             will undo all statements up to commit? |
| A. | transaction |
| B. | flashback |
| C. | rollback |
| D. | abort |
| Answer» D. abort | |
| 1222. |
Which of the following is used to get back all the transactions back after rollback? |
| A. | commit |
| B. | rollback |
| C. | flashback |
| D. | redo |
| Answer» D. redo | |
| 1223. |
A transaction completes its execution is said to be |
| A. | committed |
| B. | aborted |
| C. | rolled back |
| D. | failed |
| Answer» B. aborted | |
| 1224. |
In order to maintain the consistency during transactions, database provides |
| A. | commit |
| B. | atomic |
| C. | flashback |
| D. | retain |
| Answer» C. flashback | |
| 1225. |
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» D. flashback | |
| 1226. |
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» D. flashback | |
| 1227. |
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» D. all of the mentioned | |
| 1228. |
A Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â consists of a sequence of query and/or update statements. |
| A. | transaction |
| B. | commit |
| C. | rollback |
| D. | flashback |
| Answer» B. commit | |
| 1229. |
Materialised views make sure that |
| A. | view deï¬nition is kept stable |
| B. | view deï¬nition is kept up-to-date |
| C. | view deï¬nition is veriï¬ed for error |
| D. | view is deleted after speciï¬ed time |
| Answer» C. view deï¬nition is veriï¬ed for error | |
| 1230. |
How many join types in join condition: |
| A. | 2 |
| B. | 3 |
| C. | 4 |
| D. | 5 |
| Answer» E. | |
| 1231. |
Which of the following creates a virtual relation for storing the query? |
| A. | function |
| B. | view |
| C. | procedure |
| D. | none of the mentioned |
| Answer» C. procedure | |
| 1232. |
Updating the value of the view |
| A. | will affect the relation from which it is deï¬ned |
| B. | will not change the view deï¬nition |
| C. | will not affect the relation from which it is deï¬ned |
| D. | cannot determine |
| Answer» B. will not change the view deï¬nition | |
| 1233. |
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» C. select * from r union join s | |
| 1234. |
The operation which is not considered a basic operation of relational algebra is |
| A. | join |
| B. | selection |
| C. | union |
| D. | cross product |
| Answer» B. selection | |
| 1235. |
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» E. | |
| 1236. |
How many tables may be included with a join? |
| A. | one |
| B. | two |
| C. | three |
| D. | all of the mentioned |
| Answer» E. | |
| 1237. |
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» D. all of the mentioned | |
| 1238. |
The        condition allows a general predicate over the relations being joined. |
| A. | on |
| B. | using |
| C. | set |
| D. | where |
| Answer» B. using | |
| 1239. |
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» D. natural join | |
| 1240. |
The problem of ordering the update in multiple updates is avoided using |
| A. | set |
| B. | where |
| C. | case |
| D. | when |
| Answer» D. when | |
| 1241. |
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» E. | |
| 1242. |
How can you ï¬nd rows that do not match some speciï¬ed condition? |
| A. | exists |
| B. | double use of not exists |
| C. | not exists |
| D. | none of the mentioned |
| Answer» C. not exists | |
| 1243. |
The EXISTS keyword will be true if: |
| A. | any row in the subquery meets the condition only |
| B. | all rows in the subquery fail the condition only |
| C. | both of these two conditions are met |
| D. | neither of these two conditions is met |
| Answer» B. all rows in the subquery fail the condition only | |
| 1244. |
Which of the following creates a temporary relation for the query on which it is deï¬ned? |
| A. | with |
| B. | from |
| C. | where |
| D. | select |
| Answer» B. from | |
| 1245. |
Subqueries cannot: |
| A. | use group by or group functions |
| B. | retrieve data from a table different from the one in the outer query |
| C. | join tables |
| D. | appear in select, update, delete, insert statements. |
| Answer» D. appear in select, update, delete, insert statements. | |
| 1246. |
Which of the following is not an aggregate function? |
| A. | avg |
| B. | sum |
| C. | with |
| D. | min |
| Answer» D. min | |
| 1247. |
The                  keyword is used to access attributes of preceding tables or subqueries in the from clause. |
| A. | in |
| B. | lateral |
| C. | having |
| D. | with |
| Answer» C. having | |
| 1248. |
SQL applies predicates in the                clause after groups have been formed, so aggregate functions may be used. |
| A. | group by |
| B. | with |
| C. | where |
| D. | having |
| Answer» C. where | |
| 1249. |
The phrase “greater than at least one†is represented in SQL by |
| A. | < all |
| B. | < some |
| C. | > all |
| D. | > some |
| Answer» E. | |
| 1250. |
The          connective tests for set membership, where the set is a collection of values produced by a select clause. The          connective tests for the absence of set membership. |
| A. | or, in |
| B. | not in, in |
| C. | in, not in |
| D. | in, or |
| Answer» D. in, or | |