SQL key question

Foreign keys do not require mapping to unique indices or primary keys. If they did we'd be screwed on n:m mappings, forcing the database to do a brute-force lookup in the intermediary table with no help from an index.
 
why then when i create an a record in a table that has two foreign keys, it doesent allow it unless i have values for the foreign key fields that realte to each of the other tables?
 
Aside from a DBMS-specific issue, you probably also might have a unique index on one of those fields, a PK restriction, or a non-null restriction on a field. There's a lot of stuff these things hide behind GUIs and -isms.
 
Back
Top