I had the foreign key constraint concept explained to me today, after that I started rummaging though Toad and found this Constraints tab. I have a few questions. Does the source columns represent the primary keys and the destination columns the foreign keys or is it the other way around? Or does it work just plain differently? Second why is there an option to select multiple columns for both source and destination? Isn't a single source and destination column enough to slave one of the tables to the other? Or do those do something else in Toad? Lets say I have 3 tables people, pictures and stats. And I wanna constrain a column named id from people with columns named people_id in pictures and stats. In this case I should select the table people. create a new constraint for it and mark the source column as id, the destination as table pictures column people_id, than do another separate constrain for the stats table? Would this act the same way as a foreign key constraint and while I have cascading allowed, allow me to delete a line from table people and automatically deleting lines from pictures and stats as well?
↧