Presentation is loading. Please wait.

Presentation is loading. Please wait.

8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects.

Similar presentations


Presentation on theme: "8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects."— Presentation transcript:

1 8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects

2 8-2 Copyright © 2005, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Create and modify database tables View data in the database Create additional database objects Load data into tables

3 8-3 Copyright © 2005, Oracle. All rights reserved. What Is a Schema? HR schema HR user owns

4 8-4 Copyright © 2005, Oracle. All rights reserved. Schemas Schemas created as part of the database creation process include: SYS SYSTEM Sample schemas

5 8-5 Copyright © 2005, Oracle. All rights reserved. Full Notes Page

6 8-6 Copyright © 2005, Oracle. All rights reserved. Accessing Schema Objects Click a link to access the schema objects.

7 8-7 Copyright © 2005, Oracle. All rights reserved. Specifying Data Types in Tables Common data types: CHAR : Fixed-length character data with length in bytes DATE : Valid date range from January 1, 4712 B.C., to December 31, 9999 A.D. NUMBER : Number having precision p and scale s VARCHAR2 : Variable-length character string with maximum length in bytes or characters

8 8-8 Copyright © 2005, Oracle. All rights reserved. Creating and Modifying Tables Specify the table name and schema. Specify the column names, data types, and lengths.

9 8-9 Copyright © 2005, Oracle. All rights reserved. Full Notes Page

10 8-10 Copyright © 2005, Oracle. All rights reserved. Understanding Data Integrity

11 8-11 Copyright © 2005, Oracle. All rights reserved. Full Notes Page

12 8-12 Copyright © 2005, Oracle. All rights reserved. Defining Constraints

13 8-13 Copyright © 2005, Oracle. All rights reserved. Viewing the Attributes of a Table

14 8-14 Copyright © 2005, Oracle. All rights reserved. Viewing the Contents of a Table

15 8-15 Copyright © 2005, Oracle. All rights reserved. Dropping a Table When you drop a table: The table definition is removed from the data dictionary All rows of the table are removed All indexes defined on the table are removed

16 8-16 Copyright © 2005, Oracle. All rights reserved. Managing Indexes An index: Provides faster access to the rows in a table Is automatically used for data access Is physically independent of the table Is automatically maintained when the table is updated Index entry points to row in table

17 8-17 Copyright © 2005, Oracle. All rights reserved. Creating and Dropping Indexes

18 8-18 Copyright © 2005, Oracle. All rights reserved. Managing Views A view is a customized presentation of data from a table or other view. Views do not contain data.

19 8-19 Copyright © 2005, Oracle. All rights reserved. Managing Database-Resident Program Units Use Enterprise Manager to manage the following types of database-resident program units: Packages Package bodies Stand-alone subprograms –Procedures –Functions Database triggers

20 8-20 Copyright © 2005, Oracle. All rights reserved. Using Enterprise Manager to Manage Database-Resident Program Units Click a link to access the program units.

21 8-21 Copyright © 2005, Oracle. All rights reserved. Managing Access to Schema Objects SELECT FROM table GRANT object privileges INSERT UPDATE DELETE EXECUTE

22 8-22 Copyright © 2005, Oracle. All rights reserved. Loading Data

23 8-23 Copyright © 2005, Oracle. All rights reserved. Full Notes Page

24 8-24 Copyright © 2005, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Create and modify tables Define constraints View the attributes of a table View the contents of a table Create indexes and views Load data into tables

25 8-25 Copyright © 2005, Oracle. All rights reserved. Practice 8: Overview This practice covers the following topics: Creating a table Defining constraints Creating an index Granting object privileges to a role Loading data

26 8-26 Copyright © 2005, Oracle. All rights reserved.


Download ppt "8 Copyright © 2005, Oracle. All rights reserved. Managing Schema Objects."

Similar presentations


Ads by Google