user_guide:howto:polydb_api

This is an old revision of the document!


MongoDB stores data in collections orgenized in databases (so the structure has two levels). There is one special database admin for user information, permissions and passwords.

The polyDB uses two databases inside a MongoDB instancs: Data is stored in the database polyDB. Users and permissions are stored in admin.

A objects are stored in collections, and collections can be organized in (nested) sections. For each data collection there is an accompanying collection containing meta information on the data.

A family of objects (a collection in polyDB language) collection organized in the subsection sub of section section is stored in the MongoDB collection section.sub.collection. The meta information is in _collectionInfo.section.sub.collection. For example, the family of smooth reflexive polytopes is in the collection SmoothReflexive in the subsection Lattice of the section Polytopes. In polyDB the data is contained in the MongoDB collection Polytopes.Lattice.SmoothReflexive, and the meta information is in _collectionInfo.Polytopes.Lattice.SmoothReflexive.

Data in the data collection is described by two documents in the mata collection:

  • a document for meta information. This document should have the following entries
    • description: A short description of the data
    • maintainer: Maintainer of the data in polyDB
    • creator: Name of person creating the data
    • contributor: Name of the person who prepared the data for inclusion onto polyDB
    • fields: A list of data fields contained in a document in the collection. This can be used to produce a list of data that can be queried from the collection.
    • polydb_version: the version of polyDB used to store the data
    • packages: Here software packages can store additional information they need to access the data
  • a json schema: A json schema that completely describes the data. Each document in the collection should verify against this schema. MongoDB comes with its own internal schema verification methods. However, in polyDB we do not use this as it is based on an old draft of the schema language and has modifications from the standard.
  • user_guide/howto/polydb_api.1568102426.txt.gz
  • Last modified: 2019/09/10 08:00
  • by paffenholz