CATS Developer Documentation

Database Structure

See also the WIKI page on CATS Developer documentation. It tends to be more up to date than this page, but is still incomplete.

ANSWERS

One record per possible answer

ANSWERS_INCORRECT

One record per incorrect answer in any test, for statistic purposes

LEARNPROGRESS

LEARNPROGRESS stores one record for each test which is done. Primary key is "lp_id" (autoincrement), "user_id" and "root" refer to a USER record. Other columns:

QUESTIONS

One record per possible question

QUESTIONTYPE

For backward compatibility only, do not use anymore!

This table lists the different kind of questions.

Currently the following types are supported:

Note: The definition of this table does not support adding of new user interface languages very well, since every new language needs a new column in this table. The table should be retired soon and replaced with another one which supports adding UI languages without modification of database structure!

QUESTIONTYPE_V2

Replacement for QUESTIONTYPE-table, which supports adding new languages dynamically

QUESTION_DESCRIPTION

An optional explanation for a question, which is shown during the debriefing of a test.

STATISTICS

One (or no) record per question, for statistic purposes

TOPIC_TYPE

Type of a test, "what is the test good for". Corresponds to CATS_TYPE on the main database, but matching is done by text.

One TOPIC_TYPE entry usually referenced by one or more (one for each supported language) entries in TOPICS

TOPICS

One record per kind of test. Corresponds to CATS_VARIANT on the main database

USER

Table USER contains the user records for the test. A user record is related to one certificate which is used for login.

The primary key is the combination of "user_id" (serial number of the certificate) and "root" (issuer of the certificate). The only other column currently in use is "admin" which is set to 1 for users with administrative privileges.

USER_ADDRESS

Currently not used