# Package org.apache.sis.metadata.sql

An implementation of Metadata interfaces fetching the data from an SQL database.

See: Description

- Class Summary
  Class | Description
  --- | ---
  MetadataSource | A connection to a metadata database in read-only mode.
  MetadataWriter | A connection to a metadata database with write capabilities.

- Exception Summary
  Exception | Description
  --- | ---
  MetadataStoreException | Thrown when a metadata access failed.

## Package org.apache.sis.metadata.sql Description

An implementation of Metadata interfaces fetching the data from an SQL database. Each metadata class is mapped to a table, and each metadata property is mapped to a column in the table corresponding to the class. Tables and columns are created only when first needed.

This package is not a replacement for more sophisticated metadata applications. This package provides only a direct mapping from metadata interfaces and methods to database tables and columns with limited capability. This is suitable only for applications wanting a simple metadata schema. The restrictions are:

- Interfaces and methods must have `UML` annotations.
- Collections are not currently supported (only the first element is stored).
- `InternationalString` are stored only for the default locale.
- Cyclic graph (A references B which reference A) are not supported, unless foreigner key constraints are manually disabled for the columns which contain the cyclic references.

If the database supports table inheritance (like PostgreSQL), then this package will leverage that feature for the storage of metadata that are sub-interface of other metadata (for example `GeographicDescription` which extends `GeographicExtent`).

Since:
  0.8
See Also:
  `org​.apache​.sis​.referencing​.factory​.sql`

Defined in the `sis-metadata` module

Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.