4.17.2 Database schema
The image below shows the database schema of the daisy repository. The actual content of parts is stored in files on the hard disk, the blob_id column in the parts table contains the filename (or more correctly, the id used by the BlobStore component to retrieve the data, but this is currently the same as the file name).
Most of the database schema is pretty classic, in the sense that there are various tables to represent the various entities. This makes the model readable and SQL querying easy and fast. The downside is that it is fixed.
The most important exception is the table in which the document fields are stored (called "thefields"), since the document fields are user-defined and can be multi-valued and hierarchical. This table follows what is often called the Entity-Attribute-Value design.
Never make changes to the database directly, always use the repository APIs.