List:Cluster« Previous MessageNext Message »
From:Geert Vanderkelen Date:February 8 2008 12:21pm
Subject:Re: foreign key problems
View as plain text  
Hi Nikhil,

On Feb 8, 2008, at 13:05 , nikhilh@stripped wrote:

> Hi Geert,
> Can you please send me some links which would show an exmple of how  
> it is
> done using stored routines.

I don't have anything ready, it's just putting logic in the database  
using stored procedures and/or functions. There are lots of  
possibilities with that. But it would mean that you'll not be able to  
use directly insert statements or updates.. and it will not make it  
faster, on the contrary.

-Geert

>
>> 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


-- 
Geert Vanderkelen, Senior Support Engineer
MySQL GmbH, Germany, www.mysql.com




Thread
foreign key problemsnikhilh8 Feb
  • Re: foreign key problemsJon Stephens8 Feb
    • Re: foreign key problemsGeert Vanderkelen8 Feb
Re: foreign key problemsGeert Vanderkelen8 Feb
  • Re: foreign key problemsNadav Benedek1 Aug
    • Re: foreign key problemsMARK CALLAGHAN1 Aug
    • RE: foreign key problemsAndrew Morgan2 Aug
      • Re: foreign key problemsJon Stephens2 Aug
      • RE: foreign key problemsNadav Benedek2 Aug