Define foreign keys in MyISAM
Date: July 12, 2008 06:29AM
First off, I am a novice to databases and database programming, so please bear with me if my question seems frivolous.
I'm working on a .NET web-app fetching and inserting data from several MySQL-tables, some of which are related. (As in, for example, one table contains invoice data such as customer information, total amount, date, invoice number etc, while another table contains the actual contents of the invoice, such as product, price, invoice number, etc.) Now I am programming primarily for use with the MyISAM storage engine, because InnoDB is disabled on the primary target platform (SME Server 7.3 running Mono).
As I understand it, I cannot enforce referential integrity in the database itself when using MyISAM, so I'll have to take care of that in the application code. My question is: does it still make sense to define foreign keys etc while creating the tables so as to prepare it for future use with InnoDB, or should I in this case rely entirely upon my coding for data integrity and just be happy with the different tables being completely oblivious of each other's existence and relevance?
Thanks in advance for any responses.