Finished work on database