Originally posted by Cheenath Ajay:
Dear All,
I am not strong in Database concepts,
I am having two tables,
User and Salary
In User table UserID is my primary key and in Salary table UserID and Salary_Date are composite keys. How can i set UserId as foreign key in Salary table? Can i use cascade on delete through Salry mapping file?
Please help me out if it is possible or please let me know where i did wrong?
Thanks in Advance,
Cheenath.
My preference would be for Salary to have a non-composite key. Don't include SALARY_DATE as part of the key.
USER_ID can be foreign key in SALARY: