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
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
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.
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
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.
4. Each language binding defines its own interface for accessing MySQL.
a) True
b) False
View Answer
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
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.
6. The DBI API for Perl is _____________
a) database interface
b) database id
c) database identity
d) database integrity
View Answer
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
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.
8. For which language is the PEAR module used?
a) Python
b) Perl
c) PHP
d) C
View Answer
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
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
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.
- Apply for Programming Internship
- Check MySQL Books
- Practice Programming MCQs
- Check Information Technology Books