database code uncompleted