Saving data related functions

This sub-topic contains all of the functions that relate to saving data into the database.