## Database providers

Each database provider is composed of a shared library (loaded at runtime) and some configuration files, which are prefixed with the provider name. Also note that each provider comes with a PKG-CONFIG .pc file which allows one to check if a provider is installed (it does not, like most of the .pc files, define any CFLAGS or LIBS), and it's wise to include them in each provider's component.

### 'Generic' provider

Most of the providers are 'generic' as they have the same files structure, here for example the PostgreSQL provider's file are:

    .
    |-- lib
    |   |-- libgda-4.0
    |   |   `-- providers
    |   |       `-- libgda-postgres.so
    |   `-- pkgconfig
    |       `-- libgda-postgres-4.0.pc
     `-- share
        `-- libgda-4.0
            |-- postgres_specs_add_column.xml
            |-- postgres_specs_create_db.xml
            |-- postgres_specs_create_index.xml
            |-- postgres_specs_create_table.xml
            |-- postgres_specs_create_view.xml
            |-- postgres_specs_drop_column.xml
            |-- postgres_specs_drop_db.xml
            |-- postgres_specs_drop_index.xml
            |-- postgres_specs_drop_table.xml
            |-- postgres_specs_drop_view.xml
            |-- postgres_specs_dsn.xml
            `-- postgres_specs_rename_table.xml

This kind of component should be made dependant on the database's library which is used, such as LibPQ for PostgreSQL, and also on Libgda's runtime component.

### The SQLite provider

The SQLite provider uses the same files layout as the 'generic' provider, but there is no need to add a dependency on SQLite itself.

### The JDBC provider

The JDBC provider allows one to access database through its JDBC driver, using the Java Native Interface (JNI), and a Java virtual machine runtime. The files to include in this component are:

    .
    |-- lib
    |   |-- libgda-4.0
    |   |   `-- providers
    |   |       |-- gdaprovider-4.0.jar
    |   |       `-- libgda-jdbc.so
    |   `-- pkgconfig
    |       `-- libgda-jdbc-4.0.pc
     `-- share
        `-- libgda-4.0
            |-- jdbc_specs_create_table.xml
            `-- jdbc_specs_dsn.xml

This component should be made dependant on the Java virtual machine.