Checking primary key of application