-
Notifications
You must be signed in to change notification settings - Fork 2
ER Diagram
The utility uses a set of tables to store the messages and the configuration. This is the entity/relation diagram of the database.
First line: Table's name
# Primary key (mandatory.)
* Mandatory field.
o Optional field.
++==============================---------------+
|| '
|| A
+------------+ +-------------+ +-----------------------+
| LEVEL | | CONF_LOGGER | | CONF_LOGGER_EFFECTIVE |
| # LEVEL_ID |======- - - <| # LOGGER_ID | | # LOGGER_ID |
| * NAME | | * NAME | | * LEVEL_ID |
+------------+ + - <| o PARENT_ID | | * HIERARCHY |
|| ' | o LEVEL_ID | +-----------------------+
|| ' +-------------+ -'-
|| ' || || || '
|| ' || || || '
|| +=====++ ' ++======-----------+
|| '
|| -A-
' +-------------------+
' | REFERENCE |
' | # LOGGER_ID |
' | # APPENDER_REF_ID |
' +-------------------+
' -V-
' '
+-----------------------+ '
' ||
A ||
+-----------------+
+---------------+ | CONF_APPENDER |
| APPENDER | | # REF_ID |
| # APPENDER_ID |====- - <| * NAME |
| * NAME | | * APPENDER_ID |
*---------------+ | o CONFIGURATION |
| * PATTERN |
+-----------------+
+---------------+
| CONFIGURATION |
| # KEY |
| o VALUE |
+---------------+
+-------------+
| LOG |
| * DATE |
| o LEVEL_ID |
| o LOGGER_ID |
| * MESSAGE |
+-------------+
+----------------------+ +------------------+ +-------------+
| CONF_APPENDER_HIST | | CONF_LOGGER_HIST | | LOG_HIST |
| # REF_ID | | # LOGGER_ID | | * DATE |
| * NAME | | * NAME | | o LEVEL_ID |
| * APPENDER_ID | | o PARENT_ID | | o LOGGER_ID |
| o CONFIGURATION | | o LEVEL_ID | | * MESSAGE |
| * PATTERN | | * BUS_START | | * SYS_START |
| * BUS_START | | * BUS_END | | * SYS_END |
| * BUS_END | | * SYS_START | +-------------+
| * SYS_START | | * END_START |
| * END_START | | * TS_ID |
| * TS_ID | +------------------+
+----------------------+
Remember that the real names of the tables are in plural, but in an E/R diagram are in singular.
All these tables except LOGS
are in the LOGGER_SPACE
tablespace. LOGS
is in the LOG_DATA_SPACE
tablespace that has different characteristics to improve the performance while writing. The tablespace with 8 KB page size was selected because it could contain minimum 29 rows (when the message uses the full capacity), and a maximum of 255 when the messages are very short (Without compression, in row-store, in regular tablespace-not large).
The LOG_HIST
table is created like LOG
, but at that time, two more columns are added in order to enable the temporal capabilities.
In a similar way, CONF_LOGGER_HIST
and CONF_APPENDER_HIST
are created like CONF_LOGGERS
, but the extra columns are added when the temporal capabilities are enabled.