Search code examples
databasedatabase-designschemaaccounting

Database Design for a double entry accounting system


Should journal entries be recorded in a database design?

In the real world it makes sense to keep a daily entry book, then later transfer the daily entry book into double entry accounts. but in the computerized version, doing this produces duplicate records and that doesn't quite make sense?

Real life:
User ---> journal day book (single entry) ---> ledgers account (double entry)

Solution

  • The point about double entry book-keeping is that any trained accountant would understand it immediately. So if you are building a system for accountants then it will make communication easier if you model their domain exactly. There may also be business rules which can only be implemented in a double entry model (just a guess on my part).

    It also provides a good audit trail, which is always useful.

    edit

    "i was more interested to know if I should record the journal entries or not"

    If I were presenting a logical data model to a bunch of users from an accounting background I would definitely include the Journal as an Entity. However when it came to the physical database I would prefer to implement it as a view over the Ledger table.