DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:struct:dbinternals

This is an old revision of the document!


Struct Plugin

Database Internals

The struct plugin maps the a relatively dynamic schema mechanism on a much more rigid relational database system. It also needs to take care that schemas evolve over time, but data in the past has to be preserved and the appropriate schema at that time need to be used.

To do this, schemas in struct do not map directly to tables in the database.

SELECT S.ts, S.tbl, T.label, SC.colref, T.ismulti
  FROM schemas S,
       schema_cols SC,
       types T
 WHERE SC.sid = S.id
   AND SC.tid = T.id
   AND SC.enabled = 1
GROUP BY S.tbl, T.label
HAVING MAX(S.ts)
ORDER BY S.tbl, SC.sort
;

FIXME work in progress…

plugin/struct/dbinternals.1651750632.txt.gz · Last modified: 2022-05-05 13:37 by andi

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki