Turn off referential integrity in Derby? is it possible?

半城伤御伤魂 提交于 2019-12-11 02:07:41

问题


Is there a setting in derby, for example an sql query ala "SET DATABASE REFERENTIAL INTEGRITY FALSE" where i can turn on and off referential integrity?


回答1:


According to this post on the mailing list (from 2006) it is not possible:

http://www.mail-archive.com/derby-user@db.apache.org/msg05345.html

I couldn't find anything in the manual either.

And the list of jdbc parameters has nothing, too.




回答2:


If you have a constraint that you don't wish to enforce, you can use DROP CONSTRAINT to drop it.

I frequently drop a constraint for a period of time while I am re-structuring my database, then re-add the constraint subsequently when I have the new data arranged as I want it.



来源:https://stackoverflow.com/questions/9159287/turn-off-referential-integrity-in-derby-is-it-possible

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!