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 >
精彩评论