- financeEntityID (PK)
FinanceEntity table has rows like :
- payment method
each of these are tables and their respective PKs are foreign keys in StudentFinance represented by entityID. These tables have FK constraints to other tables. The problem is when I try to add a row to StudentFinance I get a number of 'Foreign key constraint conflicts with other tables'. Point to note that most of these tables are empty at the moment. How can this be resolved and where should i start inserting rows first? Thanks.
The problem is when I try to add a row to StudentFinance I get a number of 'Foreign key constraint conflicts with other tables'.
You will first have to populate the referenced tables with the values you will be using.
If You will use FinanceEntityA, you will first have to add FinanceEntityA to the FinanceEntity table.
If You will use Student 'John', you will first have to add Student 'John' to the Student table.
And so on...
This is a recursive process: When you want to add Student 'John' to the Student table, you may need to supply his place of birth, so you may first have to populate the Villages table before you will be able to add 'John'.
With kind regards . . . . . SQL Server 2000/2005/2012
Grabel's Law: 2 is not equal to 3 -- not even for very large values of 2. Pat Phelan's Law: 2 very definitely CAN equal 3 -- in at least two programming languages
Thanks for your reply and sorry for the confusion wim. Here is part of the database diagram. I've added just the finance section. I'm using VWD 2008 and exporting diagrams is quite a pain. I hope you will get the diagram properly there. Just click on it and zoom. Thanks.