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













8















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 PAYEE

  • A FORECASTED DEBIT can be reoccurring


  • A FORECASTED CREDIT has an amount


  • A FORECASTED CREDIT has a description

  • A FORECASTED CREDIT has a FORECASTED BUDGET CATEGORY

  • A FORECASTED CREDIT has a single PAYEE

  • A FORECASTED CREDIT can be reoccurring


  • A FORECASTED BUDGET has many FORECASTED BUDGET CATEGORIES


  • A FORECASTED BUDGET CATEGORY can have many PAYEES


  • 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.



Revision4-Forecast




  • Each Budget can contain more then 1 Budget Category. I added an isActive column on both Budgets and BudgetCategories in case I wanted to reactivate a different budget or budget category.

  • I separated transactions into two very much alike split tables Debits and Credits 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 in ScheduledTransactions and an actual amount in either Debits or Credits.


Revision4-Main




  • 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.










share|improve this question

























  • 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


















8















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 PAYEE

  • A FORECASTED DEBIT can be reoccurring


  • A FORECASTED CREDIT has an amount


  • A FORECASTED CREDIT has a description

  • A FORECASTED CREDIT has a FORECASTED BUDGET CATEGORY

  • A FORECASTED CREDIT has a single PAYEE

  • A FORECASTED CREDIT can be reoccurring


  • A FORECASTED BUDGET has many FORECASTED BUDGET CATEGORIES


  • A FORECASTED BUDGET CATEGORY can have many PAYEES


  • 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.



Revision4-Forecast




  • Each Budget can contain more then 1 Budget Category. I added an isActive column on both Budgets and BudgetCategories in case I wanted to reactivate a different budget or budget category.

  • I separated transactions into two very much alike split tables Debits and Credits 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 in ScheduledTransactions and an actual amount in either Debits or Credits.


Revision4-Main




  • 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.










share|improve this question

























  • 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
















8












8








8


2






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 PAYEE

  • A FORECASTED DEBIT can be reoccurring


  • A FORECASTED CREDIT has an amount


  • A FORECASTED CREDIT has a description

  • A FORECASTED CREDIT has a FORECASTED BUDGET CATEGORY

  • A FORECASTED CREDIT has a single PAYEE

  • A FORECASTED CREDIT can be reoccurring


  • A FORECASTED BUDGET has many FORECASTED BUDGET CATEGORIES


  • A FORECASTED BUDGET CATEGORY can have many PAYEES


  • 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.



Revision4-Forecast




  • Each Budget can contain more then 1 Budget Category. I added an isActive column on both Budgets and BudgetCategories in case I wanted to reactivate a different budget or budget category.

  • I separated transactions into two very much alike split tables Debits and Credits 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 in ScheduledTransactions and an actual amount in either Debits or Credits.


Revision4-Main




  • 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.










share|improve this question
















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 PAYEE

  • A FORECASTED DEBIT can be reoccurring


  • A FORECASTED CREDIT has an amount


  • A FORECASTED CREDIT has a description

  • A FORECASTED CREDIT has a FORECASTED BUDGET CATEGORY

  • A FORECASTED CREDIT has a single PAYEE

  • A FORECASTED CREDIT can be reoccurring


  • A FORECASTED BUDGET has many FORECASTED BUDGET CATEGORIES


  • A FORECASTED BUDGET CATEGORY can have many PAYEES


  • 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.



Revision4-Forecast




  • Each Budget can contain more then 1 Budget Category. I added an isActive column on both Budgets and BudgetCategories in case I wanted to reactivate a different budget or budget category.

  • I separated transactions into two very much alike split tables Debits and Credits 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 in ScheduledTransactions and an actual amount in either Debits or Credits.


Revision4-Main




  • 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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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





















  • 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












2 Answers
2






active

oldest

votes


















0














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.






share|improve this answer































    0














    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.





    share








    New contributor




    Hawkins Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




















      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
      });


      }
      });














      draft saved

      draft discarded


















      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









      0














      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.






      share|improve this answer




























        0














        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.






        share|improve this answer


























          0












          0








          0







          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.






          share|improve this answer













          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 8 '18 at 19:34









          EuricoEurico

          11




          11

























              0














              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.





              share








              New contributor




              Hawkins Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

























                0














                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.





                share








                New contributor




                Hawkins Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.























                  0












                  0








                  0







                  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.





                  share








                  New contributor




                  Hawkins Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  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.






                  share








                  New contributor




                  Hawkins Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share


                  share






                  New contributor




                  Hawkins Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 5 mins ago









                  Hawkins DaleHawkins Dale

                  1




                  1




                  New contributor




                  Hawkins Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  Hawkins Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  Hawkins Dale is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






























                      draft saved

                      draft discarded




















































                      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.




                      draft saved


                      draft discarded














                      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





















































                      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







                      Popular posts from this blog

                      Szabolcs (Ungheria) Altri progetti | Menu di navigazione48°10′14.56″N 21°29′33.14″E /...

                      Discografia di Klaus Schulze Indice Album in studio | Album dal vivo | Singoli | Antologie | Colonne...

                      How to make inet_server_addr() return localhost in spite of ::1/128RETURN NEXT in Postgres FunctionConnect to...