Hi all,
just to practice a bit more with asp.net and c#, I was thinking to build a small application to keep an eye at my monthly and yearly expenses (rent, car, bills, food shopping). I have a few ideas but I thought I'd check with you guys what's the best way to build this, mostly when it comes down to store and retrieve info from the database.
I'm thinking to start with a page containing a form with the following input fields:
Rent:
-Rent cost
Car:
-Car cost
Bills:
-Bills
Food
-Food shopping
When I submit the form the data will be saved in the database (I will obviously allow for blanks in the above form as not all the expenses occur on a monthly basis).
Then there will be another page which displays my results at the end of the month, something like this:
October 2012
Rent cost: this month you've spent xxx£
Car cost: this month you've spent xxx£
Bills cost: this month you've spent xxx£
Food cost: this month you've spent xxx£
November 2012
Rent cost: this month you've spent xxx£
Car cost: this month you've spent xxx£
Bills cost: this month you've spent xxx£
Food cost: this month you've spent xxx£
December 2012
Rent cost: this month you've spent xxx£
Car cost: this month you've spent xxx£
Bills cost: this month you've spent xxx£
Food cost: this month you've spent xxx£
Now let's turn to the database side: here is where it gets complicated, well at least for me.
1)What's better, to keep all the data in one table, or do one table for each month?
2)If 1 table how should I organise the information in it?
3)if two tables how does my application know when to start a new table for a new month?
Aside from these questions, if anybody can suggest a better/easier way to build this, that'll be great (bearing in mind that I'm not a wizard with c# and, SQL etc)
Cheers