MySQL Questions and Answers – APIs Available for MySQL

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “APIs Available for MySQL”.

1. How many of these languages have interfaces to bind to the C API of MySQL?

Perl, PHP, Python

a) 0
b) 1
c) 2
d) 3
View Answer

Answer: d
Explanation: The client library provides the means through which the MySQL bindings for other languages can be built on top of the C API. This type of interface exists for Perl, PHP, Python and others.

2. Which language is the core for APIs and communication in MySQL?
a) C
b) C++
c) Python
d) Ruby
View Answer

Answer: a
Explanation: In order to provide application development, MySQL provides a client library written in the C programming language. It enables the access of MySQL databases from a C program.
advertisement
advertisement

3. For how many of the following do interfaces exist for implementing direct native client-server protocol?

Java, PHP, Ruby

a) 0
b) 1
c) 2
d) 3
View Answer

Answer: d
Explanation: There are interfaces for languages like Java, PHP and Python that implement the native client-server protocol directly instead of using the C library to handle communications.
Note: Join free Sanfoundry classes at Telegram or Youtube

4. Each language binding defines its own interface for accessing MySQL.
a) True
b) False
View Answer

Answer: a
Explanation: Each language binding defines its own interface that dictates all the rules for accessing MySQL. Popular and useful programming languages like C++, Java, Python, PHP and others.

5. The primary programming interface to MySQL is _____________
a) C API
b) C++ API
c) Java API
d) Python API
View Answer

Answer: a
Explanation: The primary programming interface to MySQL is the C API. It is used to implement some of the standard clients in the MySQL distribution including mysql, mysqladmin and mysqldump.
advertisement

6. The DBI API for Perl is _____________
a) database interface
b) database id
c) database identity
d) database integrity
View Answer

Answer: a
Explanation: In MySQL, DBI is implemented as a Perl module. It interfaces with other modules at the DBD (Database Driver) level. Each of it provides access to a specific database engine.

7. For which language is the engine specific interface PDO defined?
a) Python
b) Perl
c) PHP
d) C
View Answer

Answer: c
Explanation: Like DBI, PHP includes support for accessing several database engines in addition to MySQL. It has engine specific interfaces, and interfaces that are more engine independent.
advertisement

8. For which language is the PEAR module used?
a) Python
b) Perl
c) PHP
d) C
View Answer

Answer: c
Explanation: The PEAR database module is specified for the language PHP. PHP is a server side scripting language and it provides an appropriate method of embedding programs in the web pages.

9. The JDBI interface is available for _____________
a) C
b) C++
c) Python
d) Java
View Answer

Answer: d
Explanation: The JDBI interface is available for the programming language Java. Java is one of the most widely popular languages in the world. It is a powerful object oriented programming language.

10. The MySQL APIs are libraries to connect applications to database servers.
a) True
b) False
View Answer

Answer: a
Explanation: The MySQL Connectors and APIs are some drivers and libraries. They are used to connect the applications in different programming languages to the database servers of MySQL.

Sanfoundry Global Education & Learning Series – MySQL Database.

To practice all areas of MySQL Database, 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.