Table MF_CardTransaction

Card of table MF_CardTransaction

Name

MF_CardTransaction

Dimensional Type

Fact

Comment

Individual transactions recorded to card access system's ledgers.

The business key here is the transaction ID and the name of the system from which the data is taken. The transaction ID is calculated as part of the ETL process and converted to a 36-character varchar field. In CS Gold it is calculated, using the LEDGERS_CARL view, using the transaction table number, the transaction ID generation, the transaction ID, and the transaction ID sequence. It makes sense to collapse all these values down into a single key field.

This table is loaded (as far as CS Gold is concerned, in 2012) from a view, LEDGERS_CARL, which is based on a delivered view, LEDGERS_VR, but with the addition throughout of another field, TRANSIDSEQ.

The full definition of this view, as of April 2012, in the Oracle back-end to CS Gold, is appended below. Note how it collapses information from multiple ledgers into one transaction table:

CREATE VIEW DIEBOLD.LEDGERS_CARL
(
TABLEID,
TRANDATE,
LOCATION,
PATRONID,
TRANSIDSEQ_GENERATION,
TRANSID,
TRANSIDSEQ,
ACCOUNTTYPE,
APPRVALUEOFTRAN,
COMPLETIONSTATUS,
REASONMSG,
TRANSTYPE,
CURRENTPRIMARYKEY
)
AS
(SELECT 1 tableid,
trandate,
LOCATION,
patronid,
transidseq_generation,
transid,
transidseq,
accounttype,
0 ApprValueOfTran,
completionstatus,
reasonmsg,
trantype transtype,
currentprimarykey
FROM activitytranledger_vr
WHERE patronid IS NOT NULL
AND trantype IN
(10000,
10200,
10300,
10301,
12000,
12100,
20000,
20203,
20303,
0,
990000,
940002)
UNION ALL
SELECT 2 tableid,
trandate,
LOCATION,
patronid,
transidseq_generation,
transid,
transidseq,
0 accounttype,
ApprValueOfTran,
DECODE (transtatus, 'C', '1', 'P', '1', 0) completionstatus,
(SELECT DISTINCT description
FROM uilistvalues
WHERE FIELD = 'TransType'
AND numcopyofvalue = m.transtype
AND groupid = -1)
reasonmsg,
transtype transtype,
currentprimarykey
FROM mealplantranledg_TRAN_vr m
WHERE (operatorname NOT LIKE 'PATIMP-%' OR operatorname IS NULL)
AND transtype IN (9090, 9898, 179898, 209090, 209898, 219898)
UNION ALL
SELECT 3 tableid,
trandate,
LOCATION,
patronid,
transidseq_generation,
transid,
transidseq,
accounttype,
ApprValueOfTran,
DECODE (transtatus, 'C', '1', 'P', '1', 0) completionstatus,
(SELECT DISTINCT description
FROM uilistvalues
WHERE FIELD = 'TransType'
AND numcopyofvalue = g.transtype
AND groupid = -1)
reasonmsg,
transtype transtype,
currentprimarykey
FROM generalledger_TRAN_vr g
WHERE accounttype = 2
AND (operatorname NOT LIKE 'PATIMP-%' OR operatorname IS NULL)
AND transtype IN
(9090,
9999,
179999,
189999,
209090,
209999,
219090,
219999,
939999,
949999)
UNION ALL
SELECT 4 tableid,
trandate,
LOCATION,
patronid,
transidseq_generation,
transid,
transidseq,
0 accounttype,
0 ApprValueOfTran,
completionstatus,
reasonmsg,
transtype transtype,
currentprimarykey
FROM time_attend_tranledger_TRAN_vr
WHERE transtype IN (100, 200, 201, 202, 300)
UNION ALL
SELECT 5 tableid,
trandate,
LOCATION,
patronid,
transidseq_generation,
transid,
transidseq,
accounttype,
0 ApprValueOfTran,
'0' completionstatus,
reasonmsg,
transactiontype transtype,
currentprimarykey
FROM transactionfailledger_TRAN_vr
WHERE transactiontype IN
(9090,
9898,
179898,
209090,
209898,
219898,
9090,
9999,
179999,
189999,
209090,
209999,
219090,
219999,
939999,
949999));


CREATE PUBLIC SYNONYM LEDGERS_CARL FOR DIEBOLD.LEDGERS_CARL;

GRANT SELECT ON DIEBOLD.LEDGERS_CARL TO CARLETON_DATAWAREHOUSE;


Check constraint name of the table MF_CardTransaction

CKT_MF_CARDTRANSACTION


List of outgoing references of the table MF_CardTransaction

Name

Parent Table

Foreign Key Columns

Relationship_228

MD_Building (Shortcut)

MD_Building_SurrogateKey

Relationship_229

MD_CardPatron

MD_CardPat_SurrogateKey

Relationship_230

MD_CardTransactionType

MD_CardTransType_SurrogateKey

Relationship_231

MD_CardLocation

MD_CardLoc_SurrogateKey

Relationship_232

MD_Time (Shortcut)

MD_Time_TimeInteger

Relationship_233

MD_Date (Shortcut)

MD_Date_DateInteger

Relationship_234

MD_Employee (Shortcut)

MD_CollPers_SurrogateKeyDStu

Relationship_235

MD_DegreeStudent (Shortcut)

MD_CollPers_SurrogateKeyEmp

Relationship_236

MD_Room (Shortcut)

MD_Room_SurrogateKey


List of diagrams containing the table MF_CardTransaction

Name

StarsCardAccessDiagram


List of columns of the table MF_CardTransaction

Name

Comment

Domain

Data Type

Length

MD_CardPat_SurrogateKey

 

<None>

numeric

 

MD_CardTransType_SurrogateKey

 

<None>

numeric

 

MD_Time_TimeInteger

Integer representing the time of day in the format HHMMSS (e.g., 23:01:01 at one minute one second after eleven o'clock in the evening). Not typically used for reporting.

Unlike MD_Date_Dateinteger (in MD_Date), this integer is not really human-readable, because it's not set up for base-10. Rather, it's calculated using the formula: (hour << 16) Or (min << 8) Or (sec), where the Or's are logical, and the << operator is a binary left shift. In T-SQL, this is (hour * POWER(2, 16)) + (minute * POWER(2, 8)) + second.

<None>

int

 

MD_Date_DateInteger

Integer representation of the date (e.g., 20070101 for 1 Jan 2007). Defaults to 99991231, for situations where a date is required but none is available.

DW_DateInteger

int

 

MD_CardLoc_SurrogateKey

 

<None>

numeric

 

MD_Building_SurrogateKey

 

<None>

numeric

 

MD_CollPers_SurrogateKeyDStu

 

<None>

numeric

 

MD_CollPers_SurrogateKeyEmp

 

<None>

numeric

 

MD_Room_SurrogateKey

 

<None>

numeric

 

MF_CardTrans_System

Name of system from which transactions are being liften. Defaults to CSGold. As of 2012 we have only CS Gold data in this field.

DW_CodeDesc

varchar(32)

32

MF_CardTrans_ID

Don't expose any of the ID fields to users here. This one is created ad hoc, in the case of CS Gold by converting the table number, transaction ID generation, transaction ID, and transaction ID sequence number to strings and concatenating them, with zero padding to make a 36-character ID. This key should uniquely identify a transaction within a given MF_CardTrans_System.

DW_UniqueIdentifier36Char

varchar(36)

36

MF_CardTrans_RealID

Don't expose any of these ID fields to users. This one contains the 'real' transaction ID in the source system, as an integer (if such an integer exists, apart from the MF_CardTrans_ID). This is not populated for OneCard, since a single transaction ID doesn't really exist there. Rather the transaction ID is compound, consisting of a generation number and an ID (the ID alone is not unique).

<None>

bigint

 

MF_CardTrans_Ledger

Name of ledger from which transaction was taken.

DW_CodeDesc

varchar(32)

32

MF_CardTrans_Value

 

<None>

money

 

MF_CardTrans_IsCompleted

 

DW_YesOrNoNOTNULL

char(3)

3

MF_CardTrans_AuditKey

 

DW_AuditKey

bigint

 

MF_CardTrans_Timestamp

 

<None>

timestamp

 


List of indexes of the table MF_CardTransaction

Name

Unique

Cluster

Primary

Foreign Key

Alternate Key

Table

MF_CARDTRANSACTION_PK

TRUE

FALSE

TRUE

FALSE

FALSE

MF_CardTransaction

RELATIONSHIP_240_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_CardTransaction

RELATIONSHIP_245_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_CardTransaction

RELATIONSHIP_246_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_CardTransaction

RELATIONSHIP_247_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_CardTransaction

RELATIONSHIP_248_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_CardTransaction

RELATIONSHIP_241_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_CardTransaction

RELATIONSHIP_242_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_CardTransaction

RELATIONSHIP_243_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_CardTransaction

RELATIONSHIP_244_FK

FALSE

FALSE

FALSE

TRUE

FALSE

MF_CardTransaction


List of keys of the table MF_CardTransaction

Name

Identifier_1