# Data Source Connections

JReport Designer requires access to your data source so that it can import the database schema; this information allows JReport to automatically build the queries that provide the data for the report. Data source connections are defined, named, and stored in the catalog along with the reports and other resources that use them.

JReport is extremely efficient when working with data sources that are in a relational database software. The Java Database Connectivity (JDBC) and Java Database Connectivity - Open Database Connectivity (JDBC-ODBC) connections are the basic approaches for connecting to a database for data. Other data source types can also be accessed.

This chapter describes the following categories of data source connection-related tasks:

- JDBC connections: Connects to a relational database via a JDBC driver or JDBC-ODBC bridge.
- XML connections: Connects to and transforms an XML hierarchy model to a relational model.
- User-defined data sources: Through the UDS API, JReport Designer can access data from an external data source, such as a text file or Lotus Notes, which is not stored in a database or when there is no JDBC driver available.
- Hierarchical data sources: JReport Designer directly supports XML format data source by wrapping the provided HDS API. JReport Designer's built-in classes can implement the XML format hierarchical data source interface. You can directly import an XML data source to a catalog using the Catalog Browser.

See an example: The SampleComponents catalog, included with JReport Designer, contains reports that have examples of different data source connections. Open the following report set to see the connection examples: `<install_root>\Demo\Reports\SampleComponents\DataSourceConnections.cls.`