# Annotations in a database

<table data-header-hidden><thead><tr><th width="115.5"></th><th></th></tr></thead><tbody><tr><td>Read</td><td>Yes</td></tr><tr><td>Write</td><td>No</td></tr></tbody></table>

JMap has its own storage format for annotations in database tables. If you have any annotations in this format, JMap Server can use them as a spatial data source. Annotation tables in JMap format have a certain number of required fields, as explained in the table below. An SQL query must be provided. The query will be executed to read the data and it can access more than one table at a time.

The database connection must already be configured. Refer to the [Creating Databases](/e/administrator/jmap-server-administrator-manual/resources-databases/creating-databases.md) section for more details on this topic.

<table data-header-hidden><thead><tr><th width="197.5"></th><th></th></tr></thead><tbody><tr><td>Database</td><td>Select the database from which the data must be read. This database must already be configured in JMap Admin.</td></tr><tr><td>SQL query</td><td>Enter the SQL query used to extract annotations from the database.</td></tr><tr><td>Geometry table</td><td>Select the physical table containing the geometries. By clicking on <strong>Load</strong>, you will obtain the list of fields returned by the query. This action is necessary to configure the remaining parameters.</td></tr><tr><td>X field</td><td>Select the field containing the X coordinate of the lower left position of the text.</td></tr><tr><td>Y field</td><td>Select the field containing the Y coordinate of the lower left position of the text.</td></tr><tr><td>Id field</td><td>Select a field containing unique identifiers. Only fields containing integer numbers are listed.</td></tr><tr><td>Text field</td><td>Select the field containing the annotation text.</td></tr><tr><td>Height field</td><td>Select the field containing the height of the annotation, indicated in data units.</td></tr><tr><td>Angle field</td><td>Select the field containing the rotation angle of the annotation text. The angle is indicated in degrees and increases clockwise. The zero value indicates that the text is horizontal.</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-jmapserver-lima.k2geospatial.com/e/administrator/jmap-server-administrator-manual/resources-spatial-data/vector-data-sources/annotations-in-a-database.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
