开发者

oracle primary_key and foreign_key

Is it possible to maintain relationship bet开发者_JAVA技巧ween two tables without primary key and foreign key

if it is possible then how?


In a multi-user environment, you won't be able to maintain integrity (no orphan for example) without either foreign keys or a full TABLE LOCK on the child table. In other words, without foreign keys, you can't have both integrity and concurrency.


Yes, but it is highly inadvisable to do so. Any other solution you adopt will either perform less well, or be unreliable, or both.


Well, you could use a unique key for the parent table, you don't necessarily need to use the primary key :)

< /facetiousness >

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜