title: Database design for tracking progress over time
body: <p>I have a seemingly simple problem, but I can't quite figure out a solution. I am creating a database design to store goals. The goals are updated manually, and I need an entry each time the goal is updated. For Example:</p>
  
  <p>Lose 10 pounds:</p>
  
  <p>Day 1: lost 1 pound.
  Day 3: lost 2 pounds.
  day 7: lost 7 pounds.</p>
  
  <p>And then once the total of the pounds reaches the goal amount, that goal is completed. Here is my design so far, but I am seeing some issues with it:</p>
  
  <p><strong>Goals Table:</strong></p>
  
  <p>GoalId - int - PK</p>
  
  <p>UserId = int - FK</p>
  
  <p>GoalTypeId = int - FK</p>
  
  <p>Title - string</p>
  
  <p><strong>Progress Table:</strong></p>
  
  <p>ProgressId - int - PK</p>
  
  <p>GoalId - int - FK</p>
  
  <p>IntervalX - string?</p>
  
  <p>IntervalY - string?</p>
  
  <p>GoalAmount - String?</p>
  
  <p>Is this the best way to track this? Has anyone seen a base schema out there I can build off of to accomplish this? </p>
  
  <p>Another thought I had was maybe use this design for all my raw data, and rely on stored procedure and views to present the data in the way I want it? </p>
  
  <p>EDIT: </p>
  
  <p>Sorry, I will elaborate a bit. Interval X and Y are going to be what the interval values are on a graph. So if X = 1 and Y = 10 then the x axis will go 1,2,3,... and Y will go 10,20,30,... (This is something else entirely I need to figure out the best way to implement, but that's on the backburner for now)</p>
  
  <p>Types of goals are tricky since there are many I would like to do. They will need to be a bunch of different data types:</p>
  
  <p>Examples of goals:</p>
  
  <p>Read daily - boolean</p>
  
  <p>lose 10 pound - int or float</p>
  
  <p>save $5000 - money or float</p>
  
  <p>hit sales quota - float</p>
  
  <p>Learn a new language - string? (not sure the best way to track this one)</p>
  
  <p>And so on.. Hope this helps clarify a bit</p>