MySQL Forums
Forum List  »  MyISAM

Define foreign keys in MyISAM
Posted by: A B
Date: July 12, 2008 06:29AM

Hi all,

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.

Options: ReplyQuote

Written By
Define foreign keys in MyISAM
July 12, 2008 06:29AM
August 30, 2008 12:59AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.