GL Trial Balance Data Model

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?
barkomeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

srikanthreddyn143Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David ToddSenior DBACommented:
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
barkomeAuthor Commented:
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

David ToddSenior DBACommented:
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
barkomeAuthor Commented:
Thanks David

There is actually an indicator (I,E,A) on the Chart of Account Table....
0
srikanthreddyn143Commented:
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
barkomeAuthor Commented:
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
srikanthreddyn143Commented:
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
barkomeAuthor Commented:
Apologies for my questions, but Im a little lost here, what about historical opening balances on a daily basis?
0
srikanthreddyn143Commented:
Opening balance will be previous day's closing balance.
0
barkomeAuthor Commented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.