范式一:字段不可再分
user表:
age_sex 可以分成 age ,sex 字段。 这就不符合第一范式
范式二: 在第一范式的基础上,字段完全依赖于主键,而不是组合依赖
假定选课关系表为select_course(学号, 姓名, 年龄, 课程名称, 成绩, 学分),
关键字为组合关键字(学号, 课程名称),因为存在如下决定关系:(学号, 课程名称) → (姓名, 年龄, 成绩, 学分)
这个数据库表不满足第二范式,因为存在如下决定关系:
(课程名称) → (学分)
(学号) → (姓名, 年龄)
即存在组合关键字中的字段决定非关键字的情况
范式三:消除传递依赖
学生表student(学号,姓名,年龄,性别,系别,系办地址、系办电话)
学号-->姓名,年龄,性别
学号--> 系别 --> 系办地址、系办电话 也依赖于学号