# Package org.apache.sis.metadata.sql

package org.apache.sis.metadata.sql
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`

- Related Packages
  Package
  Description
  org.apache.sis.metadata
  Root package for various metadata implementations.
  org.apache.sis.metadata.iso
  Root package for ISO 19115 metadata about resources (data or services).
- Class
  Description
  MetadataSource
  A connection to a metadata database in read-only mode.
  MetadataStoreException
  Thrown when a metadata access failed.
  MetadataWriter
  A connection to a metadata database with write capabilities.