Saving points in the database