ITPEC FE Morning October 2022 Question 19

Topic: Software

Which of the following is the standard API (Application Programming Interface) used by a Java application to access a database?

Explanation

JDBC — Java Database Connectivity is the standard Java API for connecting to a database and running SQL.

A Java program calls the JDBC interfaces (connections, statements, result sets), and a JDBC driver for the particular DBMS translates those calls into the database's own protocol. The same program can therefore work with different DBMS products by changing the driver.

Answer (c)

Why not others:

  • •(a) HTML — the markup language for web pages; it has nothing to do with database access
  • •(b) Java VM — the virtual machine that executes Java bytecode, not an API for databases
  • •(d) SQL — the query language sent to the database; JDBC is the interface through which a Java program sends it

Key rule: An API is the set of calls a program uses; SQL is what it sends through that API, and for Java the API is JDBC.

Software · AI-written, may contain errors

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.