My past couple of days have been filled with some very interesting code, and a problem that is something actually worthy of pulling out my computer science knowledge... The problem is one that is fairly simple:
"How do I insert data into tables dynamically so that I know all of the foreign key constraints are met."
Here are the assumptions that you know going into the problem: