Updated database create/update functional