patternsqlMinor
Database Design for Forecasting Review
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
-
An
-
An
-
A
-
A
-
A
-
A
-
A
-
A
-
A
-
A
-
A
-
A
-
A
-
A
-
A
-
A
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
ENTRYhas a date it was credited on or debited on
- An
ENTRYhas a singlePAYEE
-
An
ENTRY can be associated to a BUDGET CATEGORY-
A
CREDIT has an amount of the ENTRY- A
CREDIThas a description of theENTRY
- A
CREDITcan be scheduled in the future
-
A
CREDIT can be reoccurring in frequency and or amount-
A
DEBIT has an amount of the ENTRY- A
DEBIThas a description of theENTRY
- A
DEBITcan 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 CATEGORYhas a name
-
A
BUDGET CATEGORY has a BUDGET amount-
A
FORECAST has a start date- A
FORECASThas an end date
- A
FORECASThas a beginning balance
- A
FORECASThas manyFORECASTED DAYS
-
A
FORECAST has a single FORECASTED BUDGET-
A
FORECASTED DAY has a single date- A
FORECASTED DAYcan have manyFORECASTED DEBITS
-
A
FORECASTED DAY can have many FORECASTED CREDITS-
A
FORECASTED DEBIT has an amount- A
FORECASTED DEBIThas a description
- A
FORECASTED DEBIThas aFORECASTED BUDGET CATEGORY
- A
FORECASTED DEBIThas 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.
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.