title: Storing daily data in a mongoDB database using Parse
body: <p>What would be the best way to store daily health related data (height, weight, calories burned, hours of sleep) in a Parse (MongoDB) database?   The user will update their health data up to 10-15 times a day and I am unsure how to track their data in real time without having to create a new record every time they update only a certain piece of information. Currently I have a User class and a HealthProfile class, which contains basic information about height, weight, etc. </p>
  
  <p>I could collect the data over the course of the day and then save it in the database at night however this will not work for database driven charts I want to display.</p>
  
  <p>Data Interaction will be as follows: throughout the day a user inputs how much exercise they did, food they ate, etc. and the app will display a line/bar chart showing their progress/calories burned (or other health figures) for the day, week, and month. It will also include things like blood pressure and other measurements and I want to be able to store all of these things for a user and allow them to view their history, as well as input new data, at any time. It is a similar concept to how Apple's Health app works.</p>
  
  <p>I will need to make sure the user's data is always persisted in a database so if they login on their phone or the website, their data is always up to date, so writes to the database will need to be upon user input and reads will take place any time the user view a chart or figure.</p>