add functionality to write note information to the database