Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fact Table Design for transactional model

Status
Not open for further replies.
Oct 1, 2003
1
SG
If my OLTP table is based on transactional model, how do i implement my fact table.

For example,
Below shows the simplified OLTP table. In addition to credit and debit, 'deletion' of a transaction is possible.

ID Date TransactionType Amount RefID
001 28/11/03 Credit $100 null
002 01/12/03 Delete $100 001

How do i ensure that the total amount is correct?
Should i just change the sign of the delete record to -ve?
 
If you wish to keep the greatest detail in your datawarehouse design (and be able to track individual bookings) you should store both credit and debit records.
On the reporting side you can then create correct calculation by using objects that have negative values where required like: sign*measure

where sign can be either 1 or -1 based on the calculation model you use.

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top