Hi I had parent table which has ID and some other columns and a child table which have many values based on this ID(foreign Key). I wanted to create the table with a Primary Key which is sequence and this Parent table ID as Foreign Key but later I found I had one more Foreign Key EMPID which on combination provides uniqueness. Even for retrieval and batch update i can simply use the combination of these two FKs. So do I still need to use the sequence generator
keeping in mind DB performance or just drop the Primary Column.
Hi I had parent table which has ID and some other columns and a
Share
If you are sure you will NEVER EVER need or want to reference that sequence-generated key (and that no other objects will ever reference that ID), then it should be safe to remove it, as long as you can gaurantee that your combination of foreign keys will always provide a unique combination.
If you do notice performance problems, you may want to index the columns that are foreign keys (that will now, in combination, act as a primary key) to improve performance on querying those columns.