= Schema

RacksDB is provided with a database schema. It is basically a YAML file that
defines the _objects_ represented in the database with their _properties_, and
the relations between these objects.

The content of this file eventually defines the
xref:structure.adoc[database structure]. This schema can be customized to store
additional data using xref:ext.adoc[schema extensions].

== Path

When RacksDB is installed, the schema is available in path
[.path]#`/usr/share/racksdb/schemas/racksdb.yml`#.

The file is also available in
https://github.com/rackslab/racksdb/blob/main/schemas/racksdb.yml[source code Git
repository].

== Content

The schema file is a mapping that contains 3 main keys:

`_version`:: Version number of the schema as a string.
`_content`:: Database root object definition.
`_objects`:: All other objects definitions.

The format of `_content` is an xref:#object[object definition]. The format of
`_objects` is a mapping whose keys are objects names and values are
xref:#object[objects definitions].

include::partial$prop-types.adoc[]
