PDB-67 Change SQL to support ID based primary keys for catalogs

Signed-off-by: Ken Barber <ken@bob.sh>