Metadata is the set of contextual data associated with the sample when it is collected in the field or created in the laboratory. They make it possible to provide information specific to each protocol and describing the production context of the sample, such as the situation in the sampling plan (border or interior of agricultural parcel, plot number, type of taxon harvested, height and depth sediment core, sample location sampled from a core, type of drill substrate, trap type, etc.). They are strongly linked to the nature of the samples collected, and in view of the diversity of the data collected, cannot be defined in advance during the design of the software. This involves providing a mechanism that dynamically creates their schema.

Since 2003, Postgresql supports the Javascript Object Notation or JSON format. In addition, PostgreSQL designers have adapted the SQL query language to search for attributes stored in a JSON field. The ease of implementation of these new syntax and the flexibility of the JSON format has definitely played in favor of the choice of JSON type for the metadata field.

On the one hand, in the menu Paramètres–> Métadonnéesthe collection managers define the form of their metadata themselves : the list of possible fields, with their type (STRING, BOOLEAN, FLOAT, LISTE), their meaning, their unit of measure and the possible values ​​if list enumerated (warning : limit to 50 the size of the list). This defines a JSON schema that is stored and then can be associated with the sample type concerned.

A subsample (a derived sample) inherit metadata common with that of its parent. This makes it possible not to re-enter information already entered for the parent, but to specify further metadata if necessary for the type associated with the derived sample.

To facilitate the creation of metadata forms, COLLEC-SCIENCE allows to create by duplication of an existing form metadata.

Formulaire de métadonnées (schéma JSON) défini par le gestionnaire de collection.

On the other side, in the menu Echantillons, if the type of sample is associated with the appropriate metadata form, users fill in the form for each sample.

Metadata form (JSON data) informed by the user.