Added database call
Added code to check for existing id
Added code to check for existing id
Added code to check for existing id
Added code to check for existing id