Multiple choice technology programming languages

What is, in terms of JDBC, a DataSource?

  1. A DataSource is the basic service for managing a set of JDBC drivers

  2. A DataSource is the Java representation of a physical data source

  3. A DataSource is a registry point for JNDI-services

  4. A DataSource is a factory of connections to a physical data source

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

A DataSource is a factory object that provides connections to a physical data source. It encapsulates connection details, implements connection pooling, and supports distributed transactions. Option A describes DriverManager, not DataSource. Option B is imprecise - DataSource is an interface, not a representation. Option C describes JNDI, not DataSource.