DTW_BST_FACT_ENTRY


Description

Entry fact table definition.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
ID CHAR 36 null
DTW_BST_COMPENSATING_ENTRY.COMPENSATED_ENTRY_ID DTW_BST_COMPENSATED_ENTRY_ID_FK R
DTW_BST_COMPENSATING_ENTRY.ENTRY_ID DTW_BST_COMPENSATING_ENTRY_ID_FK R
DTW_BST_ENTRY_DETAILS.ENTRY_ID DTW_BST_FK_FACT_ENTRY C
DTW_BST_ENTRY_FEATURE.ENTRY_ID DTW_BST_ENTRY_FEATURE_ENTRY_FK C

Entry unique ID.

ACCOUNT_ID CHAR 36 null
DTW_BST_DIM_ACCOUNT.ACCOUNT_ID DTW_BST_FK_FACT_ENTRY_ACCOUNT R

Checking account unique ID.

ENTRY_DATE_ID INT 10 null
DTW_BST_DIM_DATE.DATE_ID DTW_BST_FK_FACT_ENTRY_DATE R

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
DTW_BST_DIM_DATE.DATE_ID DTW_BST_FK_FACT_EVENT_DATE R

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
DTW_BST_DIM_TIME.TIME_ID DTW_BST_FK_FACT_EVENT_TIME R

Event time unique ID (hour+minute). Refers to the time of the entry in the system (DataEntrada, DataEntradaLote).

HISTORY_CODE_ID INT 10 null
DTW_BST_DIM_HISTORY.HISTORY_CODE_ID DTW_BST_FK_FACT_HISTORY_CODE R

History code unique ID.

ENTRY_KIND_ID CHAR 36 null
DTW_BST_DIM_ENTRY_KIND.ENTRY_KIND_ID DTW_BST_FK_FACT_ENTRY_KIND R

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

Relationships