250+ TOP MCQs on Accessing SQL From a Programming Language

RDBMS Interview Questions and Answers for freshers on “Accessing Sql from a Programming Language”.

1. Which of the following is/are a function of dynamic SQL?
a) Allowing a program to construct an SQL query in a character string
b) Submitting the query
c) Retrieving the result into the program variables a tuple at a time
d) All of the mentioned

Answer: d
Clarification: Dynamic SQL allows the program to construct the queries in character string format, it submits them, and then retrieves the data into the program variables one tuple at a time.

2. What is the full form of JDBC?
a) Java Database Connectivity
b) Java Database Co-Operation
c) JSP Database Committee
d) Java Database Creation

Answer: a
Clarification: The full form of JDBC is Java Database Connectivity. This full form is no longer widely used and the abbreviation is mostly used everywhere.

3. State true or false: Developers cannot write their own functions into SQL
a) True
b) False

Answer: b
Clarification: Developers can write their own functions into SQL by using the create function statement.

4. Which of the following are not a part of PL/SQL
a) Triggers
b) Packages
c) Functions
d) None of the mentioned

Answer: d
Clarification: All the three mentioned features i.e. triggers, functions, packages are a part of PL/SQL.

5. The part of SQL that deals with the SQL supports constructs is called as _______
a) Persistent construct dealer
b) Persistent storage module
c) Persistent supports center
d) Primary storage medium

Answer: b
Clarification: The part of SQL that deals with the SQL supports constructs is called as Persistent Storage Module (PSM). The SQL supports construct give it almost all the power of a general purpose programming language.

6. A _________ is a statement that the system executes whenever a database is modified
a) Trigger
b) Function
c) Package
d) Protocol

Answer: a
Clarification: A trigger is a statement that the system executes whenever a database is modified. Immediately after the specified modification of the database is complete, the trigger statement gets executed and then the execution is continued.

7. State true or false: Recursive queries are permitted in SQL
a) True
b) False

Answer: a
Clarification: Recursive queries can be used in SQL in order to verify a condition repeatedly. SQL allows recursive queries.

8. How many different types of drivers are present in JDBC?
a) 1
b) 2
c) 3
d) 4

Answer: d
Clarification: There are four types of JDBC drivers which are named JDBC Type 1,2,3,4 drivers respectively.

9. Which JDBC Driver is the most efficient of all the JDBC drivers?
a) Type 1 Driver
b) Type 2 Driver
c) Type 3 Driver
d) Type 4 Driver

Answer: The JDBC type 4 driver is the most efficient of all the JDBC drivers. This is an all Java driver and hence is the most efficient.

10. Which package comprises of the core JDBC API?
a) java.sql
b) java.database
c) sql.java
d) java.relation

Answer: a
Clarification: The java.sql package comprises of the core JDBC API. JDBC is an application program interface which contains all the functions to link and execute database functions in Java.

Leave a Reply

Your email address will not be published. Required fields are marked *