I have a compound primary key in my parent table that is composed of two fields.
In my child table I have a foreign key that corresponds to one of the two fields that form the compound primary key in the parent table. I want to create a relationship between the parent and child tables in which i join one field in my child table to the corresponding field in my parent table. However, the Data Modeler is forcing me to provide a corresponding field in my child table for BOTH of the fields in my primary table that make up the compound join. Can this be adjusted? Please help. Thank you.
This is the DDL being generated by Toad DM.
ALTER TABLE “cutoff_inventory_item” ADD CONSTRAINT “Relationship2” FOREIGN KEY (“cutoff_dt”, “cutoff_dt”) REFERENCES “cutoff_deal_item” (“cutoff_dt”, “deal_item_id”)
This is the DDL I ultimately want. Note that there is no join for deal_item_id.
ALTER TABLE “cutoff_inventory_item” ADD CONSTRAINT “Relationship2” FOREIGN KEY (“cutoff_dt”) REFERENCES “cutoff_deal_item” (“cutoff_dt”)
Message was edited by: HLHL