Database Design for Forecasting ReviewHow do I properly design a many-to-many (charges/payments) accounting...
What is an explicit bijection in combinatorics?
How can I handle players killing my NPC outside of combat?
How can I make my enemies feel real and make combat more engaging?
How can guns be countered by melee combat without raw-ability or exceptional explanations?
Have the UK Conservatives lost the working majority and if so, what does this mean?
Protagonist constantly has to have long words explained to her. Will this get tedious?
Why write a book when there's a movie in my head?
Was the Soviet N1 really capable of sending 9.6 GB/s of telemetry?
Manager has noticed coworker's excessive breaks. Should I warn him?
Can a Hydra make multiple opportunity attacks at once?
Including proofs of known theorems in master's thesis
How to make transparent background from pdf to png
Coworker asking me to not bring cakes due to self control issue. What should I do?
Why don't programs completely uninstall (remove all their files) when I remove them?
PostGIS function to move a polygon to centre over new point coordinates
What is the smallest molar volume?
How do I avoid the "chosen hero" feeling?
How can I persuade an unwilling soul to become willing?
How to prep Curse of Strahd effectively
What's the meaning of #0?
Is the tritone (A4 / d5) still banned in Roman Catholic music?
What could cause an entire planet of humans to become aphasic?
What does it mean for south of due west?
Excluding or including by awk
Database Design for Forecasting Review
How do I properly design a many-to-many (charges/payments) accounting system?How to design a database for financial bond prices?Double entry bookkeeping database designPersonal finance database designhow to group transaction entries?Table structure recommendationNeed help with Double Entry DB DesignDatabase design scenario for budget (whole and daily)Double Entry Accounting SchemaGaming shop database schema
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 manyENTRIES
An
ENTRY
can either be aCREDIT
orDEBIT
- An
ENTRY
has a date it was credited on or debited on - An
ENTRY
has a singlePAYEE
An
ENTRY
can be associated to aBUDGET CATEGORY
A
CREDIT
has an amount of theENTRY
- A
CREDIT
has a description of theENTRY
- A
CREDIT
can be scheduled in the future A
CREDIT
can be reoccurring in frequency and or amountA
DEBIT
has an amount of theENTRY
- A
DEBIT
has a description of theENTRY
- A
DEBIT
can be scheduled in the future A
DEBIT
can be reoccurring in frequency and or amountA
PAYEE
has a nameA
BUDGET
has manyBUDGET CATEGORIES
A
BUDGET
can only be associated to a single calendar MonthA
BUDGET CATEGORY
can contain manyENTRIES
- A
BUDGET CATEGORY
has a name A
BUDGET CATEGORY
has aBUDGET
amountA
FORECAST
has a start date- A
FORECAST
has an end date - A
FORECAST
has a beginning balance - A
FORECAST
has manyFORECASTED DAYS
A
FORECAST
has a singleFORECASTED BUDGET
A
FORECASTED DAY
has a single date- A
FORECASTED DAY
can have manyFORECASTED DEBITS
A
FORECASTED DAY
can have manyFORECASTED CREDITS
A
FORECASTED DEBIT
has an amount- A
FORECASTED DEBIT
has a description - A
FORECASTED DEBIT
has aFORECASTED BUDGET CATEGORY
- A
FORECASTED DEBIT
has a singlePAYEE
A
FORECASTED DEBIT
can be reoccurringA
FORECASTED CREDIT
has an amount- A
FORECASTED CREDIT
has a description - A
FORECASTED CREDIT
has aFORECASTED BUDGET CATEGORY
- A
FORECASTED CREDIT
has a singlePAYEE
A
FORECASTED CREDIT
can be reoccurringA
FORECASTED BUDGET
has manyFORECASTED BUDGET CATEGORIES
A
FORECASTED BUDGET CATEGORY
can have manyPAYEES
A
PAYEE
has a name
Sample Data
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
| Account Number | Date | Description | Payee Name | Credit Amount | Debit Amount | Budget Category |
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
| 25178 | 10/01/18 | Payroll | My Work | $1000.00 | | Income |
| 25178 | 10/02/18 | McRibs for Lunch | McDonalds | | $13.12 | Fast Food |
| 25178 | 10/03/18 | Electric Bill | FPL | | $133.68 | Electric |
| 25178 | 10/04/18 | Water Bill | City Water Co. | | $58.12 | Water and Sewage |
| 25178 | 10/05/18 | Clothes for Work | Target | | $65.02 | Clothes |
| 99875 | 10/28/18 | Bonus Check | My Work | $1300.00 | | Income |
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
+----------+-------------+--------------+---------------+-----------------+------------------+
| Due Date | Payee | Debit Amount | Credit Amount | Budget Category | Re-Occurs On Day |
+----------+-------------+--------------+---------------+-----------------+------------------+
| 10/28/18 | Mortgage Co | $1500.00 | | Mortgage | 28 |
| 10/01/18 | My Work | | $990.00 | Income | 1 |
| 10/03/18 | FPL | $110.00 | | Electric | 3 |
+----------+-------------+--------------+---------------+-----------------+------------------+
Current Database Design
I figured it would be helpful to know WHY I did something so you can understand my logic and reasoning.
- Each Budget can contain more then 1 Budget Category. I added an
isActive
column on bothBudgets
andBudgetCategories
in case I wanted to reactivate a different budget or budget category. - I separated transactions into two very much alike split tables
Debits
andCredits
as I saw there was two types of transactions. - In order to allow and track Scheduled or Reoccurring transactions I created a
ScheduledTransactions
table that allowed me to have two different amounts, an expected amount inScheduledTransactions
and an actual amount in eitherDebits
orCredits
.
- I figured each forecast would need a start and end date as well as a starting balance.
- Each day would need to be forecasted to be able to determine the sum of Debits and Credits.
- I think I could have used the other tables and added a few isForecasted Columns and it would have worked the same. I decided not to go that route in order to decouple the two in case any changes would need to be made as well as if this was a large scale application reading and writing large forecasts into the same tables as actual transactions I would think would cause a log of performance issues.
sql-server database-design best-practices
|
show 2 more comments
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 manyENTRIES
An
ENTRY
can either be aCREDIT
orDEBIT
- An
ENTRY
has a date it was credited on or debited on - An
ENTRY
has a singlePAYEE
An
ENTRY
can be associated to aBUDGET CATEGORY
A
CREDIT
has an amount of theENTRY
- A
CREDIT
has a description of theENTRY
- A
CREDIT
can be scheduled in the future A
CREDIT
can be reoccurring in frequency and or amountA
DEBIT
has an amount of theENTRY
- A
DEBIT
has a description of theENTRY
- A
DEBIT
can be scheduled in the future A
DEBIT
can be reoccurring in frequency and or amountA
PAYEE
has a nameA
BUDGET
has manyBUDGET CATEGORIES
A
BUDGET
can only be associated to a single calendar MonthA
BUDGET CATEGORY
can contain manyENTRIES
- A
BUDGET CATEGORY
has a name A
BUDGET CATEGORY
has aBUDGET
amountA
FORECAST
has a start date- A
FORECAST
has an end date - A
FORECAST
has a beginning balance - A
FORECAST
has manyFORECASTED DAYS
A
FORECAST
has a singleFORECASTED BUDGET
A
FORECASTED DAY
has a single date- A
FORECASTED DAY
can have manyFORECASTED DEBITS
A
FORECASTED DAY
can have manyFORECASTED CREDITS
A
FORECASTED DEBIT
has an amount- A
FORECASTED DEBIT
has a description - A
FORECASTED DEBIT
has aFORECASTED BUDGET CATEGORY
- A
FORECASTED DEBIT
has a singlePAYEE
A
FORECASTED DEBIT
can be reoccurringA
FORECASTED CREDIT
has an amount- A
FORECASTED CREDIT
has a description - A
FORECASTED CREDIT
has aFORECASTED BUDGET CATEGORY
- A
FORECASTED CREDIT
has a singlePAYEE
A
FORECASTED CREDIT
can be reoccurringA
FORECASTED BUDGET
has manyFORECASTED BUDGET CATEGORIES
A
FORECASTED BUDGET CATEGORY
can have manyPAYEES
A
PAYEE
has a name
Sample Data
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
| Account Number | Date | Description | Payee Name | Credit Amount | Debit Amount | Budget Category |
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
| 25178 | 10/01/18 | Payroll | My Work | $1000.00 | | Income |
| 25178 | 10/02/18 | McRibs for Lunch | McDonalds | | $13.12 | Fast Food |
| 25178 | 10/03/18 | Electric Bill | FPL | | $133.68 | Electric |
| 25178 | 10/04/18 | Water Bill | City Water Co. | | $58.12 | Water and Sewage |
| 25178 | 10/05/18 | Clothes for Work | Target | | $65.02 | Clothes |
| 99875 | 10/28/18 | Bonus Check | My Work | $1300.00 | | Income |
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
+----------+-------------+--------------+---------------+-----------------+------------------+
| Due Date | Payee | Debit Amount | Credit Amount | Budget Category | Re-Occurs On Day |
+----------+-------------+--------------+---------------+-----------------+------------------+
| 10/28/18 | Mortgage Co | $1500.00 | | Mortgage | 28 |
| 10/01/18 | My Work | | $990.00 | Income | 1 |
| 10/03/18 | FPL | $110.00 | | Electric | 3 |
+----------+-------------+--------------+---------------+-----------------+------------------+
Current Database Design
I figured it would be helpful to know WHY I did something so you can understand my logic and reasoning.
- Each Budget can contain more then 1 Budget Category. I added an
isActive
column on bothBudgets
andBudgetCategories
in case I wanted to reactivate a different budget or budget category. - I separated transactions into two very much alike split tables
Debits
andCredits
as I saw there was two types of transactions. - In order to allow and track Scheduled or Reoccurring transactions I created a
ScheduledTransactions
table that allowed me to have two different amounts, an expected amount inScheduledTransactions
and an actual amount in eitherDebits
orCredits
.
- I figured each forecast would need a start and end date as well as a starting balance.
- Each day would need to be forecasted to be able to determine the sum of Debits and Credits.
- I think I could have used the other tables and added a few isForecasted Columns and it would have worked the same. I decided not to go that route in order to decouple the two in case any changes would need to be made as well as if this was a large scale application reading and writing large forecasts into the same tables as actual transactions I would think would cause a log of performance issues.
sql-server database-design best-practices
just a thought do you require metadata columns in each table like when the row got inserted, who inserted it, when last updated, who updated it, which process etc?
– Biju jose
Nov 5 '18 at 5:21
Since this is for personal development use I wont need any of that.
– Jon H
Nov 6 '18 at 1:18
1
The schema and normalisation rules depend upon how you choose to model the problem. Traditionally you'd have separate tables for actuals, budgets and forecasts. But you could have them all in a single table with an attribute or flag to denote the difference. Same with DR/CR. Same table but use +/- values to indicate I/O. Once you move into double entry accounting you'd need both sides of an equation to balance and create accounts. Are you going that far?
– Sir Swears-a-lot
Nov 6 '18 at 3:31
1
I think this is a very ambitious project to tackle for the purpose of learning about databases. Db Schema design and normalisation is one thing, accurate record keeping is another, accounting and forecasting is even more complex again. Which is your priority?
– Sir Swears-a-lot
Nov 6 '18 at 3:35
@SirSwears-a-lot Yeah I am not going that far. Think about just being able to track your personal finances into various budget groups and be able to project simple what if scenarios like... What if I got a new car payment and went on vacation 4 months out? What would my income to debt ratio look like on a week to week or month to month frequency. Or What if I changed my Grocery Budget from 500 to 600?
– Jon H
Nov 6 '18 at 4:49
|
show 2 more comments
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 manyENTRIES
An
ENTRY
can either be aCREDIT
orDEBIT
- An
ENTRY
has a date it was credited on or debited on - An
ENTRY
has a singlePAYEE
An
ENTRY
can be associated to aBUDGET CATEGORY
A
CREDIT
has an amount of theENTRY
- A
CREDIT
has a description of theENTRY
- A
CREDIT
can be scheduled in the future A
CREDIT
can be reoccurring in frequency and or amountA
DEBIT
has an amount of theENTRY
- A
DEBIT
has a description of theENTRY
- A
DEBIT
can be scheduled in the future A
DEBIT
can be reoccurring in frequency and or amountA
PAYEE
has a nameA
BUDGET
has manyBUDGET CATEGORIES
A
BUDGET
can only be associated to a single calendar MonthA
BUDGET CATEGORY
can contain manyENTRIES
- A
BUDGET CATEGORY
has a name A
BUDGET CATEGORY
has aBUDGET
amountA
FORECAST
has a start date- A
FORECAST
has an end date - A
FORECAST
has a beginning balance - A
FORECAST
has manyFORECASTED DAYS
A
FORECAST
has a singleFORECASTED BUDGET
A
FORECASTED DAY
has a single date- A
FORECASTED DAY
can have manyFORECASTED DEBITS
A
FORECASTED DAY
can have manyFORECASTED CREDITS
A
FORECASTED DEBIT
has an amount- A
FORECASTED DEBIT
has a description - A
FORECASTED DEBIT
has aFORECASTED BUDGET CATEGORY
- A
FORECASTED DEBIT
has a singlePAYEE
A
FORECASTED DEBIT
can be reoccurringA
FORECASTED CREDIT
has an amount- A
FORECASTED CREDIT
has a description - A
FORECASTED CREDIT
has aFORECASTED BUDGET CATEGORY
- A
FORECASTED CREDIT
has a singlePAYEE
A
FORECASTED CREDIT
can be reoccurringA
FORECASTED BUDGET
has manyFORECASTED BUDGET CATEGORIES
A
FORECASTED BUDGET CATEGORY
can have manyPAYEES
A
PAYEE
has a name
Sample Data
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
| Account Number | Date | Description | Payee Name | Credit Amount | Debit Amount | Budget Category |
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
| 25178 | 10/01/18 | Payroll | My Work | $1000.00 | | Income |
| 25178 | 10/02/18 | McRibs for Lunch | McDonalds | | $13.12 | Fast Food |
| 25178 | 10/03/18 | Electric Bill | FPL | | $133.68 | Electric |
| 25178 | 10/04/18 | Water Bill | City Water Co. | | $58.12 | Water and Sewage |
| 25178 | 10/05/18 | Clothes for Work | Target | | $65.02 | Clothes |
| 99875 | 10/28/18 | Bonus Check | My Work | $1300.00 | | Income |
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
+----------+-------------+--------------+---------------+-----------------+------------------+
| Due Date | Payee | Debit Amount | Credit Amount | Budget Category | Re-Occurs On Day |
+----------+-------------+--------------+---------------+-----------------+------------------+
| 10/28/18 | Mortgage Co | $1500.00 | | Mortgage | 28 |
| 10/01/18 | My Work | | $990.00 | Income | 1 |
| 10/03/18 | FPL | $110.00 | | Electric | 3 |
+----------+-------------+--------------+---------------+-----------------+------------------+
Current Database Design
I figured it would be helpful to know WHY I did something so you can understand my logic and reasoning.
- Each Budget can contain more then 1 Budget Category. I added an
isActive
column on bothBudgets
andBudgetCategories
in case I wanted to reactivate a different budget or budget category. - I separated transactions into two very much alike split tables
Debits
andCredits
as I saw there was two types of transactions. - In order to allow and track Scheduled or Reoccurring transactions I created a
ScheduledTransactions
table that allowed me to have two different amounts, an expected amount inScheduledTransactions
and an actual amount in eitherDebits
orCredits
.
- I figured each forecast would need a start and end date as well as a starting balance.
- Each day would need to be forecasted to be able to determine the sum of Debits and Credits.
- I think I could have used the other tables and added a few isForecasted Columns and it would have worked the same. I decided not to go that route in order to decouple the two in case any changes would need to be made as well as if this was a large scale application reading and writing large forecasts into the same tables as actual transactions I would think would cause a log of performance issues.
sql-server database-design best-practices
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 manyENTRIES
An
ENTRY
can either be aCREDIT
orDEBIT
- An
ENTRY
has a date it was credited on or debited on - An
ENTRY
has a singlePAYEE
An
ENTRY
can be associated to aBUDGET CATEGORY
A
CREDIT
has an amount of theENTRY
- A
CREDIT
has a description of theENTRY
- A
CREDIT
can be scheduled in the future A
CREDIT
can be reoccurring in frequency and or amountA
DEBIT
has an amount of theENTRY
- A
DEBIT
has a description of theENTRY
- A
DEBIT
can be scheduled in the future A
DEBIT
can be reoccurring in frequency and or amountA
PAYEE
has a nameA
BUDGET
has manyBUDGET CATEGORIES
A
BUDGET
can only be associated to a single calendar MonthA
BUDGET CATEGORY
can contain manyENTRIES
- A
BUDGET CATEGORY
has a name A
BUDGET CATEGORY
has aBUDGET
amountA
FORECAST
has a start date- A
FORECAST
has an end date - A
FORECAST
has a beginning balance - A
FORECAST
has manyFORECASTED DAYS
A
FORECAST
has a singleFORECASTED BUDGET
A
FORECASTED DAY
has a single date- A
FORECASTED DAY
can have manyFORECASTED DEBITS
A
FORECASTED DAY
can have manyFORECASTED CREDITS
A
FORECASTED DEBIT
has an amount- A
FORECASTED DEBIT
has a description - A
FORECASTED DEBIT
has aFORECASTED BUDGET CATEGORY
- A
FORECASTED DEBIT
has a singlePAYEE
A
FORECASTED DEBIT
can be reoccurringA
FORECASTED CREDIT
has an amount- A
FORECASTED CREDIT
has a description - A
FORECASTED CREDIT
has aFORECASTED BUDGET CATEGORY
- A
FORECASTED CREDIT
has a singlePAYEE
A
FORECASTED CREDIT
can be reoccurringA
FORECASTED BUDGET
has manyFORECASTED BUDGET CATEGORIES
A
FORECASTED BUDGET CATEGORY
can have manyPAYEES
A
PAYEE
has a name
Sample Data
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
| Account Number | Date | Description | Payee Name | Credit Amount | Debit Amount | Budget Category |
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
| 25178 | 10/01/18 | Payroll | My Work | $1000.00 | | Income |
| 25178 | 10/02/18 | McRibs for Lunch | McDonalds | | $13.12 | Fast Food |
| 25178 | 10/03/18 | Electric Bill | FPL | | $133.68 | Electric |
| 25178 | 10/04/18 | Water Bill | City Water Co. | | $58.12 | Water and Sewage |
| 25178 | 10/05/18 | Clothes for Work | Target | | $65.02 | Clothes |
| 99875 | 10/28/18 | Bonus Check | My Work | $1300.00 | | Income |
+----------------+----------+------------------+----------------+---------------+--------------+------------------+
+----------+-------------+--------------+---------------+-----------------+------------------+
| Due Date | Payee | Debit Amount | Credit Amount | Budget Category | Re-Occurs On Day |
+----------+-------------+--------------+---------------+-----------------+------------------+
| 10/28/18 | Mortgage Co | $1500.00 | | Mortgage | 28 |
| 10/01/18 | My Work | | $990.00 | Income | 1 |
| 10/03/18 | FPL | $110.00 | | Electric | 3 |
+----------+-------------+--------------+---------------+-----------------+------------------+
Current Database Design
I figured it would be helpful to know WHY I did something so you can understand my logic and reasoning.
- Each Budget can contain more then 1 Budget Category. I added an
isActive
column on bothBudgets
andBudgetCategories
in case I wanted to reactivate a different budget or budget category. - I separated transactions into two very much alike split tables
Debits
andCredits
as I saw there was two types of transactions. - In order to allow and track Scheduled or Reoccurring transactions I created a
ScheduledTransactions
table that allowed me to have two different amounts, an expected amount inScheduledTransactions
and an actual amount in eitherDebits
orCredits
.
- I figured each forecast would need a start and end date as well as a starting balance.
- Each day would need to be forecasted to be able to determine the sum of Debits and Credits.
- I think I could have used the other tables and added a few isForecasted Columns and it would have worked the same. I decided not to go that route in order to decouple the two in case any changes would need to be made as well as if this was a large scale application reading and writing large forecasts into the same tables as actual transactions I would think would cause a log of performance issues.
sql-server database-design best-practices
sql-server database-design best-practices
edited Nov 6 '18 at 1:17
Jon H
asked Nov 4 '18 at 15:55
Jon HJon H
685
685
just a thought do you require metadata columns in each table like when the row got inserted, who inserted it, when last updated, who updated it, which process etc?
– Biju jose
Nov 5 '18 at 5:21
Since this is for personal development use I wont need any of that.
– Jon H
Nov 6 '18 at 1:18
1
The schema and normalisation rules depend upon how you choose to model the problem. Traditionally you'd have separate tables for actuals, budgets and forecasts. But you could have them all in a single table with an attribute or flag to denote the difference. Same with DR/CR. Same table but use +/- values to indicate I/O. Once you move into double entry accounting you'd need both sides of an equation to balance and create accounts. Are you going that far?
– Sir Swears-a-lot
Nov 6 '18 at 3:31
1
I think this is a very ambitious project to tackle for the purpose of learning about databases. Db Schema design and normalisation is one thing, accurate record keeping is another, accounting and forecasting is even more complex again. Which is your priority?
– Sir Swears-a-lot
Nov 6 '18 at 3:35
@SirSwears-a-lot Yeah I am not going that far. Think about just being able to track your personal finances into various budget groups and be able to project simple what if scenarios like... What if I got a new car payment and went on vacation 4 months out? What would my income to debt ratio look like on a week to week or month to month frequency. Or What if I changed my Grocery Budget from 500 to 600?
– Jon H
Nov 6 '18 at 4:49
|
show 2 more comments
just a thought do you require metadata columns in each table like when the row got inserted, who inserted it, when last updated, who updated it, which process etc?
– Biju jose
Nov 5 '18 at 5:21
Since this is for personal development use I wont need any of that.
– Jon H
Nov 6 '18 at 1:18
1
The schema and normalisation rules depend upon how you choose to model the problem. Traditionally you'd have separate tables for actuals, budgets and forecasts. But you could have them all in a single table with an attribute or flag to denote the difference. Same with DR/CR. Same table but use +/- values to indicate I/O. Once you move into double entry accounting you'd need both sides of an equation to balance and create accounts. Are you going that far?
– Sir Swears-a-lot
Nov 6 '18 at 3:31
1
I think this is a very ambitious project to tackle for the purpose of learning about databases. Db Schema design and normalisation is one thing, accurate record keeping is another, accounting and forecasting is even more complex again. Which is your priority?
– Sir Swears-a-lot
Nov 6 '18 at 3:35
@SirSwears-a-lot Yeah I am not going that far. Think about just being able to track your personal finances into various budget groups and be able to project simple what if scenarios like... What if I got a new car payment and went on vacation 4 months out? What would my income to debt ratio look like on a week to week or month to month frequency. Or What if I changed my Grocery Budget from 500 to 600?
– Jon H
Nov 6 '18 at 4:49
just a thought do you require metadata columns in each table like when the row got inserted, who inserted it, when last updated, who updated it, which process etc?
– Biju jose
Nov 5 '18 at 5:21
just a thought do you require metadata columns in each table like when the row got inserted, who inserted it, when last updated, who updated it, which process etc?
– Biju jose
Nov 5 '18 at 5:21
Since this is for personal development use I wont need any of that.
– Jon H
Nov 6 '18 at 1:18
Since this is for personal development use I wont need any of that.
– Jon H
Nov 6 '18 at 1:18
1
1
The schema and normalisation rules depend upon how you choose to model the problem. Traditionally you'd have separate tables for actuals, budgets and forecasts. But you could have them all in a single table with an attribute or flag to denote the difference. Same with DR/CR. Same table but use +/- values to indicate I/O. Once you move into double entry accounting you'd need both sides of an equation to balance and create accounts. Are you going that far?
– Sir Swears-a-lot
Nov 6 '18 at 3:31
The schema and normalisation rules depend upon how you choose to model the problem. Traditionally you'd have separate tables for actuals, budgets and forecasts. But you could have them all in a single table with an attribute or flag to denote the difference. Same with DR/CR. Same table but use +/- values to indicate I/O. Once you move into double entry accounting you'd need both sides of an equation to balance and create accounts. Are you going that far?
– Sir Swears-a-lot
Nov 6 '18 at 3:31
1
1
I think this is a very ambitious project to tackle for the purpose of learning about databases. Db Schema design and normalisation is one thing, accurate record keeping is another, accounting and forecasting is even more complex again. Which is your priority?
– Sir Swears-a-lot
Nov 6 '18 at 3:35
I think this is a very ambitious project to tackle for the purpose of learning about databases. Db Schema design and normalisation is one thing, accurate record keeping is another, accounting and forecasting is even more complex again. Which is your priority?
– Sir Swears-a-lot
Nov 6 '18 at 3:35
@SirSwears-a-lot Yeah I am not going that far. Think about just being able to track your personal finances into various budget groups and be able to project simple what if scenarios like... What if I got a new car payment and went on vacation 4 months out? What would my income to debt ratio look like on a week to week or month to month frequency. Or What if I changed my Grocery Budget from 500 to 600?
– Jon H
Nov 6 '18 at 4:49
@SirSwears-a-lot Yeah I am not going that far. Think about just being able to track your personal finances into various budget groups and be able to project simple what if scenarios like... What if I got a new car payment and went on vacation 4 months out? What would my income to debt ratio look like on a week to week or month to month frequency. Or What if I changed my Grocery Budget from 500 to 600?
– Jon H
Nov 6 '18 at 4:49
|
show 2 more comments
2 Answers
2
active
oldest
votes
I would identify the payees, in terms of budget and type of account. Say you need to list or consult the payees. I would also have an active column for payees.
It could be nice to know what account pays what budget in the future.
add a comment |
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.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f221752%2fdatabase-design-for-forecasting-review%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I would identify the payees, in terms of budget and type of account. Say you need to list or consult the payees. I would also have an active column for payees.
It could be nice to know what account pays what budget in the future.
add a comment |
I would identify the payees, in terms of budget and type of account. Say you need to list or consult the payees. I would also have an active column for payees.
It could be nice to know what account pays what budget in the future.
add a comment |
I would identify the payees, in terms of budget and type of account. Say you need to list or consult the payees. I would also have an active column for payees.
It could be nice to know what account pays what budget in the future.
I would identify the payees, in terms of budget and type of account. Say you need to list or consult the payees. I would also have an active column for payees.
It could be nice to know what account pays what budget in the future.
answered Nov 8 '18 at 19:34
EuricoEurico
11
11
add a comment |
add a comment |
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.
New contributor
add a comment |
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.
New contributor
add a comment |
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.
New contributor
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.
New contributor
New contributor
answered 5 mins ago
Hawkins DaleHawkins Dale
1
1
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f221752%2fdatabase-design-for-forecasting-review%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
just a thought do you require metadata columns in each table like when the row got inserted, who inserted it, when last updated, who updated it, which process etc?
– Biju jose
Nov 5 '18 at 5:21
Since this is for personal development use I wont need any of that.
– Jon H
Nov 6 '18 at 1:18
1
The schema and normalisation rules depend upon how you choose to model the problem. Traditionally you'd have separate tables for actuals, budgets and forecasts. But you could have them all in a single table with an attribute or flag to denote the difference. Same with DR/CR. Same table but use +/- values to indicate I/O. Once you move into double entry accounting you'd need both sides of an equation to balance and create accounts. Are you going that far?
– Sir Swears-a-lot
Nov 6 '18 at 3:31
1
I think this is a very ambitious project to tackle for the purpose of learning about databases. Db Schema design and normalisation is one thing, accurate record keeping is another, accounting and forecasting is even more complex again. Which is your priority?
– Sir Swears-a-lot
Nov 6 '18 at 3:35
@SirSwears-a-lot Yeah I am not going that far. Think about just being able to track your personal finances into various budget groups and be able to project simple what if scenarios like... What if I got a new car payment and went on vacation 4 months out? What would my income to debt ratio look like on a week to week or month to month frequency. Or What if I changed my Grocery Budget from 500 to 600?
– Jon H
Nov 6 '18 at 4:49