Upload
dangtu
View
218
Download
0
Embed Size (px)
Citation preview
Database Programming - Section 10 Student Guide
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page i
Table of Contents
Database Programming - Section 10..............................................................................................................1 Lesson 1 - Defining NOT NULL and UNIQUE Constraints.........................................................................1 What Will I Learn? ........................................................................................................................................2 Why Learn It?................................................................................................................................................3 Tell Me / Show Me........................................................................................................................................4 Try It / Solve It ..............................................................................................................................................13 Lesson 2 - PRIMARY KEY, FOREIGN KEY, and CHECK Constraints.....................................................15 What Will I Learn? ........................................................................................................................................16 Why Learn It?................................................................................................................................................17 Tell Me / Show Me........................................................................................................................................18 Try It / Solve It ..............................................................................................................................................27 Lesson 3 - Managing Constraints ..................................................................................................................30 What Will I Learn? ........................................................................................................................................31 Why Learn It?................................................................................................................................................32 Tell Me / Show Me........................................................................................................................................33 Try It / Solve It ..............................................................................................................................................44 Lesson 4 - Practice Exercises and Review.....................................................................................................48 What Will I Learn? ........................................................................................................................................49 Why Learn It?................................................................................................................................................50 Tell Me / Show Me........................................................................................................................................51 Try It / Solve It ..............................................................................................................................................52 Lesson 5 - Practice Exercises and Quiz .........................................................................................................54 What Will I Learn? ........................................................................................................................................55 Why Learn It?................................................................................................................................................56 Tell Me / Show Me........................................................................................................................................57 Try It / Solve It ..............................................................................................................................................58
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 1
Lesson 1 - Defining NOT NULL and UNIQUE Constraints
Lesson 1 - Defining NOT NULL and UNIQUE Constraints
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 2
What Will I Learn?
What Will I Learn?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 3
Why Learn It?
Why Learn It?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 4
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 5
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 6
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 7
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 8
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 9
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 10
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 11
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 12
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 13
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 14
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 15
Lesson 2 - PRIMARY KEY, FOREIGN KEY, and CHECK Constraints
Lesson 2 - PRIMARY KEY, FOREIGN KEY, and CHECK Constraints
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 16
What Will I Learn?
What Will I Learn?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 17
Why Learn It?
Why Learn It?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 18
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 19
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 20
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 21
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 22
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 23
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 24
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 25
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 26
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 27
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 28
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 29
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 30
Lesson 3 - Managing Constraints
Lesson 3 - Managing Constraints
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 31
What Will I Learn?
What Will I Learn?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 32
Why Learn It?
Why Learn It?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 33
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 34
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 35
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 36
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 37
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 38
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 39
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 40
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 41
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 42
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 43
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 44
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 45
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 46
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 47
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 48
Lesson 4 - Practice Exercises and Review
Lesson 4 - Practice Exercises and Review
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 49
What Will I Learn?
What Will I Learn?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 50
Why Learn It?
Why Learn It?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 51
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 52
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 53
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 54
Lesson 5 - Practice Exercises and Quiz
Lesson 5 - Practice Exercises and Quiz
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 55
What Will I Learn?
What Will I Learn?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 56
Why Learn It?
Why Learn It?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 57
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 10 Page 58
Try It / Solve It
Try It / Solve It