1、data integrity:app code ,db trigger, integrity constraint 优先级增高
2、constraints type: not null,unique,primary key,foreign key,check
3、unique: allow null value foreign key:allow null value
4、primary key: alter table (enable|disable) (novalidate|validate) primary key
5、pk immediate每条语句后检查, deferralbe生成nounique索引,在commit时统一检查约束
SET CONSTRAINTS ALL DEFERRED;
SET CONSTRAINT XXX DEFERRED;
6、子表外键应建索引,增加并发性
7、导数据的时候 2步:enable novalidate,enable validate
8、exceptions to table
数据字典:
dba_constraints
dba_cons_column
本文详细介绍了数据库中的完整性约束概念,包括not null、unique、primary key、foreign key等约束类型的使用方法,并探讨了如何通过设置deferred来提高并发性能,以及在数据导入过程中如何合理运用这些约束。
1万+

被折叠的 条评论
为什么被折叠?



