Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ID | CHAR | 36 | null |
|
|
Entry unique ID. |
||||||||||||||
| ACCOUNT_ID | CHAR | 36 | null |
|
|
Checking account unique ID. |
||||||||||||||
| ENTRY_DATE_ID | INT | 10 | null |
|
|
Entry full date unique ID (year+month+day). Refers to the date the entry affected the balance (DataLancamento, asOfDate). |
||||||||||||||
| EVENT_DATE_ID | INT | 10 | null |
|
|
Event full date unique ID (year+month+day). Refers to the date of the entry in the system (DataEntrada, DataEntradaLote). |
||||||||||||||
| EVENT_TIME_ID | INT | 10 | null |
|
|
Event time unique ID (hour+minute). Refers to the time of the entry in the system (DataEntrada, DataEntradaLote). |
||||||||||||||
| HISTORY_CODE_ID | INT | 10 | null |
|
|
History code unique ID. |
||||||||||||||
| ENTRY_KIND_ID | CHAR | 36 | null |
|
|
Entry kind unique ID. |
||||||||||||||
| CURRENCY | CHAR | 3 | null |
|
|
Entry currency (BRL, USS, etc). |
||||||||||||||
| AMOUNT | DECIMAL | 19 | null |
|
|
Entry amount. |
||||||||||||||
| CREATED_AT | DATETIME | 26 | CURRENT_TIMESTAMP(6) |
|
|
Timestamp value to register a record creation time. |
||||||||||||||
| UPDATED_AT | DATETIME | 26 | √ | CURRENT_TIMESTAMP(6) |
|
|
Timestamp value to register a record update time. |
|||||||||||||
| ACTIVE | TINYINT | 3 | 1 |
|
|
Marks if a given entry is active (if not active, 0 is stored) |
||||||||||||||
| EVENT_CREATED_AT | DATETIME | 26 | null |
|
|
Marks creation event date time |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | ID |
| DTW_BST_ENTRY_ACCOUNT_IDX | Performance | Asc | ACCOUNT_ID |
| DTW_BST_ENTRY_ENTRY_DATE_IDX | Performance | Asc | ENTRY_DATE_ID |
| DTW_BST_ENTRY_EVENT_DATE_IDX | Performance | Asc | EVENT_DATE_ID |
| DTW_BST_ENTRY_HCID_CURR_ACT | Performance | Asc/Asc/Asc/Asc | ENTRY_DATE_ID + HISTORY_CODE_ID + CURRENCY + ACTIVE |
| DTW_BST_ENTRY_KIND_IDX | Performance | Asc | ENTRY_KIND_ID |
| DTW_BST_EVENT_HCID_CURR_ACT | Performance | Asc/Asc/Asc/Asc | EVENT_CREATED_AT + HISTORY_CODE_ID + CURRENCY + ACTIVE |
| DTW_BST_FACT_ENTRY_ACC_ENTD_ACT_CURR | Performance | Asc/Asc/Asc/Asc | ACCOUNT_ID + ENTRY_DATE_ID + ACTIVE + CURRENCY |
| DTW_BST_FACT_ENTRY_ACC_EVTDT_ACT_CURR | Performance | Asc/Asc/Asc/Asc | ACCOUNT_ID + EVENT_CREATED_AT + ACTIVE + CURRENCY |
| DTW_BST_FK_FACT_EVENT_TIME | Performance | Asc | EVENT_TIME_ID |
| DTW_BST_FK_FACT_HISTORY_CODE | Performance | Asc | HISTORY_CODE_ID |

