2
我有一個配置爲使用SQLite的Django網絡服務器。SQLite是否支持參照完整性?
在多對多的關係中(有額外的字段),Django迫使我使用關係模型來建立兩個對象之間的關係。但是我能夠在對象之間創建一個關係,這些對象在相關表中還不存在。
對於e.g:
I have table1 and table2 which are related via table12.
In table1, there is just one object called A.
In table2, there is just one object called X.
I can create a record in table12 that depict a relationship between A & Y; even though Y doesn't exist in table2.
我的關係模式已適當標記的外鍵。
還發現了一種在Django中啓用它的方法! http://stackoverflow.com/questions/6745763/enable-integrity-checking-with-sqlite-in-django – mynk