RDBMS Questions and Answers – Accessing SQL From a Programming Language

This set of RDBMS Interview Questions and Answers for freshers focuses 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
View Answer

Answer: d
Explanation: 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
View Answer

Answer: a
Explanation: 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
View Answer

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

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

Answer: d
Explanation: 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
View Answer

Answer: b
Explanation: 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.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

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

Answer: a
Explanation: 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
View Answer

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

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

Answer: d
Explanation: 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
View Answer

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.
advertisement

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

Answer: a
Explanation: 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.

Sanfoundry Global Education & Learning Series – RDBMS.

To practice all areas of RDBMS for Interviews, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.