Which statements about JDBC are true? (2 answers)

  1. [_] [a] JDBC is an API to connect to relational-, object- and XML data sources

  2. [_] [b] JDBC stands for Java DataBase Connectivity

  3. [_] [c] JDBC is an API to access relational databases, spreadsheets and flat files

  4. [_] [d] JDBC is an API to bridge the object-relational mismatch between OO programs and relational


Correct Option: B,C

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) JDBC is an API to connect to relational-, object- and XML data sources. This statement is incorrect. JDBC is primarily used for connecting to relational databases, not object or XML data sources. For connecting to object or XML data sources, other APIs like JPA (Java Persistence API) or JAXB (Java Architecture for XML Binding) are typically used.

Option B) JDBC stands for Java DataBase Connectivity. This statement is correct. JDBC stands for Java DataBase Connectivity. It is a Java API that provides a standard way to connect to and interact with relational databases.

Option C) JDBC is an API to access relational databases, spreadsheets and flat files. This statement is correct. JDBC can be used to access relational databases, spreadsheets, and flat files. It provides a set of classes and interfaces that enable Java programs to interact with these data sources using SQL queries.

Option D) JDBC is an API to bridge the object-relational mismatch between OO programs and relational. This statement is incorrect. While JDBC allows Java programs to interact with relational databases, it does not specifically address the object-relational mismatch. Object-relational mapping frameworks like Hibernate or JPA are designed to bridge this mismatch.

The correct answers are B) JDBC stands for Java DataBase Connectivity and C) JDBC is an API to access relational databases, spreadsheets and flat files.

Find more quizzes: