HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Database Design for Forecasting Review

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
designdatabaseforecastingforreview

Problem

I am trying to learn more about Relational Databases and I figured there is no better way to learn then to actually do something. I decided to make a personal attempt to look at Personal Budget Accounting and Forecasting. I have done some research thus far and would like to get some insight on my current Database Design and Normalization.

What are your thoughts and suggestions on my current Database Design? I have included some information below to better help you help me :)

Disclosure: This is a personal project. Not for homework or for work.

Business Facts

-
A Bank ACCOUNT can have many ENTRIES

-
An ENTRY can either be a CREDIT or DEBIT

  • An ENTRY has a date it was credited on or debited on



  • An ENTRY has a single PAYEE



-
An ENTRY can be associated to a BUDGET CATEGORY

-
A CREDIT has an amount of the ENTRY

  • A CREDIT has a description of the ENTRY



  • A CREDIT can be scheduled in the future



-
A CREDIT can be reoccurring in frequency and or amount

-
A DEBIT has an amount of the ENTRY

  • A DEBIT has a description of the ENTRY



  • A DEBIT can be scheduled in the future



-
A DEBIT can be reoccurring in frequency and or amount

-
A PAYEE has a name

-
A BUDGET has many BUDGET CATEGORIES

-
A BUDGET can only be associated to a single calendar Month

-
A BUDGET CATEGORY can contain many ENTRIES

  • A BUDGET CATEGORY has a name



-
A BUDGET CATEGORY has a BUDGET amount

-
A FORECAST has a start date

  • A FORECAST has an end date



  • A FORECAST has a beginning balance



  • A FORECAST has many FORECASTED DAYS



-
A FORECAST has a single FORECASTED BUDGET

-
A FORECASTED DAY has a single date

  • A FORECASTED DAY can have many FORECASTED DEBITS



-
A FORECASTED DAY can have many FORECASTED CREDITS

-
A FORECASTED DEBIT has an amount

  • A FORECASTED DEBIT has a description



  • A FORECASTED DEBIT has a FORECASTED BUDGET CATEGORY



  • A FORECASTED DEBIT has a single `

Solution

More generally: I would START with a list of questions that I want to answer. Like:

Who am I paying the most? Did I pay the sewage-hauling bill this month? What are my cash requirements for this month? Will I need to go out and kill stuff for food?

The nature of these questions should drive the design of the schema.

That said, this schema looks pretty good.

I agree with the idea that the debits and credits could be in a single table.

Context

StackExchange Database Administrators Q#221752, answer score: 2

Revisions (0)

No revisions yet.