Solved

GL Trial Balance Data Model

Posted on 2014-11-27
11
258 Views
Last Modified: 2014-12-04
I am trying to create a data warehouse from scratch starting with Trial Balance reporting in a multidimensional form.

The tables I have in my staging area are:

-General Ledger Accounts  (Account Balances with daily snapshots of closing balances)
-General Trans Accounts    (Detailed transaction linked at the line level indicating debit and credit values)
-Business Entity (Details of each line of business linked to chart of account sub_prod_id)
-Chart of Accounts
-GL Mapping (GL Codes mapped to Chart of Accounts)

Can anyone help?
0
Comment
Question by:barkome
  • 5
  • 4
  • 2
11 Comments
 
LVL 11

Accepted Solution

by:
srikanthreddyn143 earned 250 total points
Comment Utility
1. GL Account table -->

GL_ACCOUNT

1. GL_ACCOUNT_ID
2. GL_ACCOUNT_NAME
3. GL_ACCOUNT_NUMBER
4. CURRENT_ACCOUNT_BALANCE

2., GL Transaction table -->

1. GL_ACCOUNT_ID (Forieng key to GL_ACCOUNT.GL_ACCOUNT_ID)
2. DEBIT_CREDIT_TRANSACTION (Char(1)) --> indicated D for Debit and C for credit
3. GL_TRANSACTION_AMOUNT
4. TRANSACTION_TYPE --> This identifies different business processes that created transactions in this table

You can add other column to map yourother business identities.

3. END_OF_DAY BALANCE table

1. GL_ACCOUNT_ID
2. END_OF DAY_BALANCE --> calculated balance for the day
3. END_DATE --> Closing Date

You can actually get information of 3 rd table information from Table 2 itself. It is up to you whether to have different table. I would consider different table thinking of data the transaction table will have.

Thanks
0
 
LVL 35

Assisted Solution

by:David Todd
David Todd earned 250 total points
Comment Utility
Hi,

Pretty much agree with the above.

To take the generalised trial balance and create P&L and Balance Sheet you'll need an indicator as such on the GL_Account table.

One thing I've seen is that the Debit/Credit sign is also on the GL_Account table.

Although harder to read, it can be easier if the D/B is a bit which is then mangled like (2 * sign - 1 ) * amount.

HTH
  David
0
 

Author Comment

by:barkome
Comment Utility
Thanks Guys

So the GL Transaction will be my detailed fact table(e.g F_GL_TRANS), while GL_ACCOUNT will be DimGL_Acct, and END_OF_DAY BALANCE will be Dim_EOD_Balance?

@David, will the indicator you mentioned be the Dimension_Key?

@Srikanthreddyn143, I agree with the different table for EOD balance, as the current balance in the GL Account table will be the actual opening balance (closing balance for the previous day)

Also, will I need a separate fact table for monthly summaries? There's a requirement to have the capabilities to be able to drill down from account balance summary to view the actual transactions that make up the daily/monthly balance.
0
 
LVL 35

Expert Comment

by:David Todd
Comment Utility
Hi,

I don't see the P&L/Balance Sheet indicator as a dimension key. Maybe a sub-key or property of the account-number dimension.

HTH
  David
0
 

Author Comment

by:barkome
Comment Utility
Thanks David

There is actually an indicator (I,E,A) on the Chart of Account Table....
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 11

Expert Comment

by:srikanthreddyn143
Comment Utility
Also, will I need a separate fact table for monthly summaries? There's a requirement to have the capabilities to be able to drill down from account balance summary to view the actual transactions that make up the daily/monthly balance.

You can derive from Table 2 or You can populate table 3 everyday through SQL job or any other service and use it
0
 

Author Comment

by:barkome
Comment Utility
Dears

Im having difficulty, trying to present a solution regarding drill down to transactions from the trial balance report.

Where I am having a problem is how to display the individual opening balance for each line item on the day of either a debit or credit transaction. My GL Ledger table only has the current closing balance, with no historical snapshot of daily opening balances even at the time of the transactions.

Can anyone help?
0
 
LVL 11

Expert Comment

by:srikanthreddyn143
Comment Utility
That's the reason we have 3rd table END_OF_DAY BALANCE table.

This table needs to get updated everyday with cumulative amount of all the transactions happendd for that day plus previous day balance.

Let's take an example.

On December 3rd you have a record in END_OF_DAY Balance...

12/03/2014  $100.00
on Dec 4th you made 2 debit transactions.

1. When first debit of $10 is posted in trans table, you need to update END_OF_DAY balance to $110 i.e., $100( prev day) + $10
2. When second debit of $30 is made, it will be $110 + $30 = $140

That it will be easy to get daily closing balances

Or

Get the total amount of transaction happened in a the date range from GL Trans table and total amount prior to selected date range and you can do math to get specific day closing amount.

I don't prefer this method as there will be huge load running through all transactions.
0
 

Author Comment

by:barkome
Comment Utility
Apologies for my questions, but Im a little lost here, what about historical opening balances on a daily basis?
0
 
LVL 11

Expert Comment

by:srikanthreddyn143
Comment Utility
Opening balance will be previous day's closing balance.
0
 

Author Comment

by:barkome
Comment Utility
I understand the logic on business terms but developing a query to achieve that is proving difficult, and I really need help on this.

The Ldgr acct only has current balance, with a few other attributes relating to chart of accounts and so on. The transaction table has daily debit, credit and effective dates.

Based on this, what syntax can I use to to get opening balance dr, opening balance cr, movement balance dr, movement balance cr, closing balance dr and closing balance cr, with ldgr ID, GL code, chrt ID at both monthly and daily level for drill down analysis or reporting? What will be the fact table and how will this be updated with foreign keys links to dimension tables?
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now