1 / 52
文档名称:

第五部分 完整性和安全性.ppt

格式:ppt   页数:52
下载后只包含 1 个 PPT 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

第五部分 完整性和安全性.ppt

上传人:中国课件站 2011/10/11 文件大小:0 KB

下载得到文件列表

第五部分 完整性和安全性.ppt

文档介绍

文档介绍:Chapter 6: Integrity and Security (完整性与安全性)
Domain Constraints(域约束)
Referential Integrity(参照完整性)
Assertions(断言)
Triggers(触发器)
Security(安全性)
Authorization (授权)
Authorization in SQL(SQL中的授权)
Domain Constraints
Integrity constraints guard against accidental damage to the database, by ensuring that authorized changes to the database do not result in a loss of data consistency.
Domain constraints are the most elementary form of integrity constraint.
They test values inserted in the database, and test queries to ensure that parisons make sense.
New domains can be created from existing data types
. create domain Dollars numeric(12, 2) create domain Pounds numeric(12,2)
We cannot assign pare a value of type Dollars to a value of type Pounds.
However, we can convert type as below (cast as Pounds)
Domain Constraints (Cont.)
The check clause in SQL permits domains to be restricted:
Use check clause to ensure that an hourly-wage domain allows only values greater than a specified value.
create domain hourly-wage numeric(5,2) constraint value-test check(value > = )
The domain has a constraint that ensures that the hourly-wage is greater than
The clause constraint value-test is optional; useful to indicate which constraint an update violated.
Can plex conditions in domain check
create domain AccountType char(10) constraint account-type-test check (value in (‘Checking’, ‘Saving’))
check (branch-name in (select branch-name from branch))
Referential Integrity
Ensures that a value that appears in one relation for a given set of attributes also appears for a certain set of attributes in another relation.
Example: If “Perryridge” is a branch name appearing in one of the tuples in the account relation, then there exists a tuple in the branch relation for branch “Perryridge”.
Formal Definition
Let r1(R1) and r2(R2) be relations with primary keys K1 and K2 respectively.
The subset  of R2 is a foreign key referencing K1 in relation r1, if for every t2 in r

最近更新

上门送教服务建议书 6页

高考英语作文冲刺备考建议书 5页

高效课堂管理策略建议书 5页

高效节能评估建议书 5页

高效给水管材选购建议书 5页

高层一封信建议书 5页

高三学子建议书 6页

餐饮成本控制与管理建议书 5页

飞机乘务管理建议书 5页

预防诈骗建议书 6页

心理护理在恐惧症治疗中的作用 37页

2024年清河县招教考试备考题库附答案解析(必.. 31页

2024年湖北文理学院理工学院马克思主义基本原.. 12页

2024年湖南工艺美术职业学院马克思主义基本原.. 13页

2024年濮阳石油化工职业技术学院马克思主义基.. 13页

2024年玉龙县招教考试备考题库含答案解析(必.. 30页

2024年电白县招教考试备考题库及答案解析(必.. 30页

2024年石城县招教考试备考题库及答案解析(必.. 31页

2024年米林县幼儿园教师招教考试备考题库含答.. 31页

2024年罗源县招教考试备考题库含答案解析(夺.. 31页

2024年苏州大学应用技术学院马克思主义基本原.. 12页

2024年萨嘎县幼儿园教师招教考试备考题库及答.. 31页

2024年襄阳职业技术学院马克思主义基本原理概.. 12页

2024年西安财经大学马克思主义基本原理概论期.. 13页

2024年贵州护理职业技术学院马克思主义基本原.. 12页

2024年越西县招教考试备考题库含答案解析(夺.. 30页

2024年运城幼儿师范高等专科学校马克思主义基.. 12页

2024年那曲县招教考试备考题库含答案解析(夺.. 30页

2024年郴州职业技术学院马克思主义基本原理概.. 13页

2024年重庆电子科技职业大学马克思主义基本原.. 13页