Last update: 2015-08-24 11:20

All content in a Casebox core is stored in two mysql tables:

  • tree: a hierarchical (id, parent_id) table that holds only the data structure
  • objects: the actual objects content as JSON records

Note files are stored on the disk, not in mysql database. Only the filename, metadata and the actual path to the file on disk is stored.

Each object of the tree (the object is also called a node) has a template associated, even files, folders and user comments are stored in the tree table and have a template associated. For example, the folder template might have only one field title, but it can easily be expanded to have more fields. See the fields of some templates below (file_template, folder, task).

There are several classes of templates (called Template Types) used to create a new template (think of this as sub-classes in object oriented paradigm). The templates and fields are themselves stored in the tree, that might sound like a "conceptual recusion", but it works fine. See chapter Template Types

The template is defined by specifying its name, type, config. See template config.

Each template field has also a name, type and configuration. See template fields.

The central type of field is _objects, the values of this field are objects of the tree. It allows to create dropdown/lookup fields. Example: the list of countries or color of a product can be defined as _objects fields and linked to folders in the tree that contains countries, colors. See _objects fieldtype.

CB is using additional mysql tables to store templates/fields: templates and templates_structure.