Re: [PHP-DB] re:database tables relations advice

[email protected] ("Bastien Koert")
Newsgroups php.db
Message-ID <[email protected]>
On Fri, Nov 28, 2008 at 5:52 PM, Fergus Gibson <[email protected]> wrote:

> On Thu, Nov 27, 2008 at 11:19 AM, Bastien Koert <[email protected]> wrote:
> > 2. It is possible to use the application to handle the keys instead of
> the
> > database, it involves more work around key checking / validation before
> > creating or updating records, but it can be done if the INNODB table type
> is
> > not accessible to you for some reason.
>
> Yes, but generally foreign key constraints are preferable.  The
> database server is compiled in native code, so it'll be much faster at
> handling this issue; and it may avoid the necessity of your script
> submitting multiple queries to resolve the foreign key issues.  A
> bigger issue though is that the implementation of foreign key
> constraints on the server will have been exhaustively tested.
> Reinventing the wheel in your own PHP code may introduce bugs that
> cause loss or damage to your data.
>

Correct, I was merely offering an alternative if the INNODB / FK constraints
are not available. I have to do that with ASP code that I maintain, but its
a real bitch to manage

-- 

Bastien

Cat, the other other white meat
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.