Save loaded data to database