CHAPTER 1
Computer developers are frequently asked to create systems to assist a client in running his or her business. While the developer has the tools (e.g., SQL Server, C#, Visual Studio, etc.) to produce solid applications, the client has the knowledge of the business that needs to be computerized.
Unfortunately, most of the clients are not developers. (If they were, why would they hire programmers in the first place?)
The meeting of these two kinds of expertise is often fraught with miscommunication. The client explains his or her needs to the developer who, in turn, tries to convert those needs into a design and, eventually, into a running application. Often, after the client sees the finished program, he or she then has a clearer picture of what he or she wants the computer to do and, unfortunately, that picture frequently looks nothing like the program the developer wrote.
This disconnect (between the customer’s explanations of his or her needs and how they are seen by all of the other roles in development) has been known for a long time, as shown in Figure 1. The tree swing diagram has been used for years and, although the artwork has improved, the concept remains true to this day:

Tree swing diagram, courtesy of the Monolithic Dome Institute
What I will do in this book is introduce developers to some of the most common business applications into which he or she may run. I will also identify some terms that have special meaning so that, when one client explains that the repair parts can be “LIFO” but the new cars better be “specific-id” and another client wants to convert from “weighted average” to “FIFO,” the developer will understand that the clients are actually talking about inventory reporting.
In the first chapter, I would like to explore some fundamental accounting concepts and definitions. While it is not my intent or desire to have developers study for the CPA exam, it is my hope to allow them to understand what the client means when terms such as debit, credit, and out of balance are discussed.
Accounting begins with one simple concept which is as fundamental to accountants as the DO WHILE loop is to programmers. This concept is that all businesses have assets which are funded by one of two sources: the business owners (equity) or the company’s creditors (liabilities). Another view of this concept is the equation:
ASSETS = LIABILITIES + OWNER'S EQUITY
An accounting system, therefore, provides a method of record keeping that allows the user to track business activity and to record each transaction's impact on the above equation. To achieve these objectives, the system uses two primary repositories of information: the Chart of Accounts and the journals.
The Chart of Accounts is an itemized list of assets, creditor bills, and owner's equity in the business that need to be tracked by the system. Each item in the chart is generally assigned an account number and a descriptive name. In addition, each item has a dollar balance associated with it. The account numbers assigned usually designate some sort of grouping of the accounts. All assets, for example, might begin with the number one while current assets range from 1,000 through 1,500. For example, if the business owns a computer setup worth $5,000, then its entry in the chart of accounts might look as follows:
Computer Asset in Chart of Accounts
Account # | Description | Type | Balance |
1750 | HP Server, Router, and two workstation computers | Asset | $5,000 |
Note: For example‘s sake, we are grouping several hardware component together; however, in most businesses, each hardware component would have its own entry in the chart of accounts.
If the business borrowed money for the computer system (say $4,000), then another entry in the chart would reflect that loan:
Loan for Computer Purchase
Account # | Description | Type | Balance |
2550 | Computer Loan-HP Server and workstations | Liability | $4,000 |
Each item in the business will be listed in a similar fashion in the chart. This listing of accounts is sometimes called the General Ledger. The account type field is also important since we must be able to determine the account type to test that our basic equation stays true.
In our example above, the account type is part of the chart. In many accounting systems, the account number defines the account type. Whichever method is used, we can test the basic equation by the following construct:
If the equation is true, then accounting books are in balance. A balance sheet is a financial statement that lists the assets on one side and the liabilities and equity on the other. Both sides are totaled and must be equal. It provides the business with an accurate picture on a given date of the net worth of the business (net worth is the sum of all of the assets minus the sum of all liabilities, which happens to be the same as the sum of the owner's equity accounts).
Journals are recordings of activity or business transactions that have occurred. Every journal entry will impact one or more of the accounts in the ledger—either increasing or decreasing that account's balance. Many accounting systems will group transactions into specialized journals such as a sales journal or a cash receipts journal. In addition to the specialized journals, almost all systems have a general journal in which transactions which don't fall into any group are recorded.
In computer terms, the chart of accounts is a master file and the journal is the activity file which affects items in the master. Usually, transactions are accumulated in the journal and, after a period of time, applied to or posted against the chart of accounts:
Transaction and master
Now that we have briefly reviewed the two main information sources for the systems, let's take a look at how these two work together to ensure that the key equation (shown below) always stays in balance:
Double Entry Accounting is the most common method of accounting for business transactions. To understand how the method works, we need to introduce two new terms that are somewhat hard to define: debit and credit.
Each account in the chart has a balance and this balance is considered to be a debit or a credit. For the asset accounts, the debit represents a positive balance in the chart while the credit represents a negative balance. If the business checking account has $6,000 in it, we would say the account has a $ 6,000 debit balance. If they write a check which reduces the balance, that check will be credited to the account. Credit entries reduce the balance in an asset account.
The liability and equity accounts work in reverse; credits are considered positive balances and the debit represents a negative balance. If the sales tax liability for one state is $ 2,000, we would say we have a $2,000 credit balance in sales tax payable. As they pay the sales tax, that balance will be reduced by debiting the account.
The following chart summarizes debits and credits:
Debit/Credit Summary
Description | Debit | Credit |
Assets such as cash, inventory, computers, office supplies, etc. | Increase | Decrease |
Liabilities such as phone bills, car loan, sales tax collected, etc. | Decrease | Increase |
Equity such as owner’s contribution, common stock, etc. | Decrease | Increase |
Every transaction that occurs must consist of at least one debit and one credit entry. The total of all debits and credits must equal. As long as this rule is followed, the books will never get out of balance.
To properly record the above events, the following items are entered in the chart of accounts:
Chart of Accounts
Account # | Description | Type | Debit | Credit |
|---|---|---|---|---|
1000 | Cash-Checking Account | Asset | ||
1100 | Software | Asset | ||
1200 | Subscriptions | Asset | ||
1600 | Computer System | Asset | ||
2000 | Loan for Computer | Liability | ||
3000 | Owner’s Equity | Equity |
In addition, the following journal entries are written into the general journal:
General Journal
Account # | Description | Debit | Credit | |
|---|---|---|---|---|
A | 1000 | Cash-Checking Account | $10,000 | |
3000 | Owner’s Equity | $10,000 | ||
B | 1600 | Computer System | $6,000 | |
1000 | Cash-Checking Account | $1,000 | ||
2000 | Loan for Computer | $5,000 | ||
C | 1100 | Software | $794 | |
1200 | Subscriptions | $99 | ||
1000 | Cash-Checking | $893 | ||
D | 1000 | Cash-Checking | $1,000 | |
2000 | Loan for Computer | $1,000 |
Notice that, for each transaction, the total debits and credits are equal. If not, the transaction would be considered out of balance and could not be applied to the master file.
When the transactions are posted, the chart of accounts will appear as illustrated below:
Detailed Chart of Accounts
Acc | Description | Type | Debit | Credit |
|---|---|---|---|---|
1000 | Cash-Checking Account | Asset | ||
Beginning Balance | 0 | |||
A) | Owner Investment | $10,000 | ||
B) | Computer System Purchase | $1,000 | ||
C) | Software/Subscription purchase | $893 | ||
D) | Loan Repayment | $1,000 | ||
Ending Balance | $7,107 | |||
1100 | SOFTWARE | Asset | ||
Beginning Balance | 0 | |||
C) | Software Purchase | $794 | ||
Ending Balance | $794 | |||
1200 | SUBSCRIPTIONS | Asset | ||
Beginning Balance | 0 | |||
C) | Subscription Purchase | $99 | ||
Ending Balance | $99 | |||
1600 | COMPUTER SYSTEM | Asset | ||
Beginning Balance | 0 | |||
B) | Computer Purchase | $6,000 | ||
Ending Balance | $6,000 | |||
2000 | LOAN FOR COMPUTER | Liabilitiy | ||
Beginning Balance | 0 | |||
B) | Computer Purchase | $5,000 | ||
D) | Loan Repayment | $1,000 | ||
Ending Balance | $4,000 | |||
3000 | OWNER’S EQUITY | Equity | ||
Beginning Balance | 0 | 0 | ||
A) | Owner Investment | $10,000 | ||
Ending Balance | $10,000 |
To test that the equation is still in balance, add up all of the ending balances for the assets accounts. Now add up all of the ending balances for the liabilities and the equity account.
1000—Cash ($7,107) + 1100—Software ($794) + 1200—Magazine ($99) + 1600—Computer ($6,000)
2000—Computer Loan ($4,000) + 3000—Owner’s Equity ($10,000)
The total ending balances above should each be $14,000.
An accounting system's objective is to keep the primary equation true at all times. As long as the double-entry procedure (i.e., debits and credits equal at all times) is followed, the chart of accounts will stay in balance. This allows the owner of the business at any time to see the source of funds that were used to acquire the business's assets.
Note: In this chapter, I painted the definitions of Assets, Liabilities, etc. with a broad brush. In most accounting systems, the accounts are further categorized as Current Assets (Assets likely to turn to Cash within the year), Fixed Assets (assets that will be part of the company for a long time such as cars, computers, etc.). Similiarly, liabilties might be broken down as well, further categorized as Current Liabilities (due this year) or Long-Term liabilites that are not due for several years (mortgages., etc). A good accounting system offers the flexibility to categorize assets into any grouping that works for the business.
Now, let’s quickly define some of the accounting terms I used in this chapter:
In this chapter, I’ve covered the basics of double entry accounting and shown how this information is recorded in the system. In the next chapter, I will expand upon these concepts to show how making money appears in the chart, and the journal entries to record revenues and expenses.
Note: The Appendix contains some SQL scripts to create tables and procedures so you can try the accounting transactions out using Microsoft SQL Server (2005 or higher). These scripts are not meant to help you design a complete accounting system but, rather, they give you enough to let you watch the transactions through the tables and flows in a database. If you need to write your own system, feel free to use these scripts as a basic starting point.