Implemented AddNode db function