testComposition function

Check the existence of a record in the database