company logo

Connecting an application to a database

Keywords:  data sourceaccess handle

In order to access data in an ODABA database, an access handle hierarchy is required.

The simple but static way to connect to a database is opening the database from within a program (function). In this case, however, locations for dictionary and database have to be passed to the functions explicitly (handle hierarchies).

  • Access handles - Database access is provided by means of handle hierarchies, which may be opened explicitly or implicitly.

A more comfortable way is using data source definitions in a configuration or ini-file. Using configuration or ini-files allows providing generic and scalable applications, because the configuration also allows choosing the preferred client/server model.

  • Data source - In order to simplify and re-use handle hierarchies, one may define data sources for generic database access. Data sources are defined either in a configuration or ini-file or in a data catalog.