added database insertions for edit building