Re: can PHP give MySQL the missing relational properties?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

www.postgresql.org


Morten Gulbrandsen wrote:
Dear Mr Lerdorf,



ON DELETE SET DEFAULT is not implemented,



According to my database textbook,



The propagate (CASCADE) option for the referentiel triggered action should
be specified on the foreign key in the relation corresponding to the
multivalued attribute for both on update and on delete.



According to Heikki Tuuri :



I think triggers should come in MySQL-5.1 or 6.0. I am not sure when I
willwrite support for ON DELETE SET DEFAULT. User demand for it has not
beenthat big.

According to Mysql reference manual



7.5.5.2 FOREIGN KEY Constraints



A deviation from SQL standards: if in the parent table there are several
rows which have the same referenced key value, then InnoDB acts in foreign
key checks like the other parent rows with the same key value would not
exist. For example, if you have defined a RESTRICT type constraint, and
there is a child row with several parent rows, InnoDB does not allow the
deletion of any of those parent rows.



A deviation from SQL standards: if ON UPDATE CASCADE or ON UPDATE SET NULL
recurses to update the SAME TABLE it has already updated during the cascade,
it acts like RESTRICT. This is to prevent infinite loops resulting from
cascaded updates. A self-referential ON DELETE SET NULL, on the other hand,
works starting from 4.0.13. A self-referential ON DELETE CASCADE has always
worked.





Yours Sincerely



Morten Gulbrandsen







"Rasmus Lerdorf" <rasmus@lerdorf.com> schrieb im Newsbeitrag
Pine.LNX.4.44.0310281902580.4315-100000@thinkpad.lerdorf.com">news:Pine.LNX.4.44.0310281902580.4315-100000@thinkpad.lerdorf.com...

Your question makes very little sense to me.  PHP is not a database
obviously.  Also, MySQL has foreign keys and triggers and it can do
cascading actions.  So I don't understand what you are talking about.

-Rasmus

On Tue, 28 Oct 2003, Morten Gulbrandsen wrote:


MySQL as database for PHP,

Hello Programmers,

MySQL is performing very fast and runs rock stable under high load,
But it is not ANSI SQL compatible.

I have an interesting thread about this issue under
Newsgroups: comp.databases.theory

Subject: Re: Is mySQL a RDBMS?
This also contains SQL code incompatible to the present version of

MySQL.


My question is: can PHP give MySQL the missing relational properties?

Is it possible to remedy the limitations of MySQL concerning
FOREIGN KEYS?
Actions,
REFERENCES
and triggers

through PHP?

ON DELETE SET DEFAULT
For instance: I think could be solved through additional coding,
But what about the other missing SQL statements?


REFERENCES ON DELETE CASCADE ON UPDATE CASCADE

I feel the basic database functionality has to be
Implemented without PHP, PHP is an interface between the relational
database,
the web server and the browser and is
Not suited to code beyond the limitations of any relational database.

Is this correct ?

In other words,
has anyone succeeded in implementing an SQL RDBMS solely in PHP ?


Yours Sincerely


Morten Gulbrandsen




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/nql1nV+u8RFxEIMRAjDrAJ448X0xzq7WlVJsQ8skteGkgqVptwCeMrtj
eaneK4Cvc0l1Hzz0qa0eyHU=
=4kFP
-----END PGP SIGNATURE-----

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux