I have a MySQL InnoDB table for ACH (checking account) transactions that includes, among other fields, the below: trans_id (PRIMARY KEY) cust_type routing_num status site_id payment_type auth_type trans_type trace_num
All of the above fields (except the primary key) are related to other tables that describe the customer type, transaction type, etc. or have valid values for routing number, status, etc. Should all of these be set up as foreign keys, or should some of referential integrity be done programmatically? How do you draw the line between how many foreign keys are too many, or is there no such thing? Should things like this always be handled by foreign keys instead of error checking in the program? The indexing along would seem to get fairly large in the transactions table if I set them all up as foreign keys. David Felio Software Developer Information Network of Arkansas http://www.AccessArkansas.org --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php