Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 6 Creating.

Similar presentations


Presentation on theme: "1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 6 Creating."— Presentation transcript:

1 1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 6 Creating Databases with Oracle Using SQL Raymond Frost – John Day – Craig Van Slyke

2 2 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Oracle Data Types Exhibit 6-1: Data Types Available in Oracle

3 3 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Skydiving Member Database Table Design Exhibit 6-2: Design and Data for the Skydiving Club Member Database

4 4 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Skydiving Member Data Exhibit 6-2: Design and Data for the Skydiving Club Member Database

5 5 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Sky_Member Database Script Exhibit 6-3: Script File for the Sky_Member Database

6 6 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Logging Into Oracle Exhibit 6-4: iSQL*Plus Login Screen Source: Used by permission of Oracle

7 7 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 iSQL*Plus Work Screen Exhibit 6-5: iSQL*Plus Work Screen Source: Used by permission of Oracle

8 8 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Executing a Script in iSQL*Plus Exhibit 6-6: Script File Executed in Work Screen Source: Used by permission of Oracle

9 9 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Arcade Database Table Design Exhibit 6-7: Create the Arcade Database

10 10 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Arcade Database with Data Exhibit 6-7: Create the Arcade Database

11 11 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Exhibit 6-8: Script File for the ARCADE Database Arcade Database Script

12 12 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Exhibit 6-9: Design of ENROLLMENT Database Enrollment Database Script

13 13 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Enrollment Data Exhibit 6-9: Design of ENROLLMENT Database

14 14 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Enrollment Data Exhibit 6-9: Design of ENROLLMENT Database

15 15 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Enrollment Data Exhibit 6-9: Design of ENROLLMENT Database

16 16 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Enrollment Data Exhibit 6-9: Design of ENROLLMENT Database

17 17 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Enrollment Data Exhibit 6-9: Design of ENROLLMENT Database

18 18 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Dropping and Creating Tables Exhibit 6-10: Order for Dropping and Creating Tables Tables must be dropped in the opposite order from which they were created.

19 19 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Exhibit 6-11: Script File to Create the Enroll Database Enroll Database Script: Part 1

20 20 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Enroll Database Script: Part 2 Exhibit 6-11: Script File to Create the Enroll Database

21 21 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Troubleshooting Exhibit 6-12: Reserved Words May Not Be Used as Field Names Reserved words cannot be used as field names.

22 22 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Troubleshooting Exhibit 6-13: Including a Comma after the Last Field Name Do not include a comma after the last field in the list.

23 23 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Troubleshooting Exhibit 6-14: Omitting Commas in the Create Table Statement Commas cannot be omitted in the field list.

24 24 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Troubleshooting Exhibit 6-15: Extra Comma in Column List There should not be a comma at the end of the field list.

25 25 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Troubleshooting Exhibit 6-16: Extra Comma in Value List There should not be a comma at the end of the value list.

26 26 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Troubleshooting Exhibit 6-17: Referential Integrity Violation Values in foreign key fields must match the corresponding primary key value.

27 27 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Practice Exercise 1 Exhibit 6-18: Hospital Database Design

28 28 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Practice Exercise 1 Exhibit 6-19: Hospital Database Data

29 29 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Practice Exercise 2 Exhibit 6-20: Acme Database Design

30 30 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Exhibit 6-21: Acme Database Data Practice Exercise 2

31 31 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Practice Exercise 3 Exhibit 6-22: Amazon Database Design

32 32 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 Exhibit 6-23: Amazon Database Data Practice Exercise 3


Download ppt "1 Database Design and Development: A Visual Approach © 2006 Prentice Hall Chapter 6 DATABASE DESIGN AND DEVELOPMENT: A VISUAL APPROACH Chapter 6 Creating."

Similar presentations


Ads by Google