On Feb 8, 2008, at 12:33 , Jon Stephens wrote:
> nikhilh@stripped wrote:
>> Hi, I know that Foreign key cannot be implemented in NDBCLUSTER
>> storage engine but i need a solution which would allow us to
>> implement the foreign key constraint in our tables. One solution is
>> to write Triggers but we cannot afford to write triggers as it will
>> affect the performance. Please let me know if there is any other
>> solution to implement foreign keys in my tables which use NDBCLUSTER
>> storage engine. Thankyou.
> I think the only other way would be to enforce the FKs
> programmatically in the application. However, this is probably less
> efficient (and certainly more bother to maintain) than using the
> triggers-based solution offered in the DevZone article.
> Perhaps someone else can suggest a better way to do this, but I
> don't know of any myself.
Maybe stored routines. But if you want performance, you just make sure
your application does it right. Any constraint anywhere will make it
slower of course.
Geert Vanderkelen, Senior Support Engineer
MySQL GmbH, Germany, www.mysql.com