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