.dsy:it.
Show 150 posts per page

.dsy:it. (http://www.dsy.it/forum/)
- Basi di dati ~ comunicazione digitale (http://www.dsy.it/forum/forumdisplay.php?forumid=108)
-- Cascade o restrict? (http://www.dsy.it/forum/showthread.php?threadid=36593)


Posted by stell4r on 09-10-2008 10:28:

Cascade o restrict?

Ciao ragazzi. che voi sappiate, è possibile aggiungere questa opzione dopo che le tabelle sono state costruite? e se si, come si implementa?

ho provato con alter table ma postgre mi da errore...

grazie per il vostro aiuto :)


Posted by ildiff on 09-10-2008 15:15:

Devi eliminare il vincolo di chiave esterna con un

code:
ALTER TABLE nometabella DROP CONSTRAINT nomevincolo

e poi li ricrei con un
code:
ALTER TABLE nometabella ADD CONSTRAINT nomevincolo ....


Posted by stell4r on 09-10-2008 15:44:

ma se non li metto, rischio la bocciatura? :D

non riesco a capire se sono importanti o no ..


Posted by ildiff on 09-10-2008 15:55:

Se non gestisci correttamente le CASCADE, le NO ACTION,... sono sicure 2 cose:
1) non fai una bella figura
2) (per me) il voto ne risentirà in negativo


All times are GMT. The time now is 22:07.
Show all 4 posts from this thread on one page

Powered by: vBulletin Version 2.3.1
Copyright © Jelsoft Enterprises Limited 2000 - 2002.