How do I store large volumes or data points using Drupal ( temperature and humidity points ) I'm trying to use Drupal as a headless API, and so far I'm having good results. One of the things I'm collecting is a Temperature and Humidity data. Thus far I've created an entity that can hold the data points, but now that I'm really thinking about it, this is not the most efficient way of doing this, a new entity has to be created for each datapoint. I've contemplated separating off this part of the api, but then I loose all of the Drupal functionality. Is there a better way to store large sets of data points using Drupal? Perhaps I can group the data points within a single field as a JSON string? I'm using D7
This is a large topic, so I will just mention some points and you can make the rest.

You will need a module, so you must have a .info, .module and in your case a .install file.

In the .module file:


Implement hook_field_info to tell Drupal about your custom field. Here is an example of how to use hook_field_info.
You must also introduce a widget and a formatter for your field. The widget is what appears in forms when you want to get data from user, and the formatter outputs data in proper way in view modes.
You need to notify Drupal about these items existence, hook_field_widget_info and hook_field_formatter_info will do the job for you.
After that you must make your widget, hook_field_widget_form is the proper hook here and hook_field_formatter_view will handle your field view.
Another thing is a zero function for your field - this function tells Drupal if the user has not filled or passed any data to your widget, hook_field_is_empty is implemented for that and it is required, else after form submission your users will face an error.
hook_field_validate can also be used to validate the data which is entered.


At this point we are done with the .module file,  but we still have on more step to go: the .install file.


Here we define a place for data to be stored in DB, hook_field_schema will do the job for you. 


After this point you are all done.