Primary and foreign keys in databases