Adds data to the database