An Oracle database may include sample schemas, which are a set of interlinked schemas that enable Oracle documentation and Oracle instructional materials to illustrate common database tasks.
The hr sample schema contains information about employees, departments and locations, work histories, and so on. The following illustration depicts an entity-relationship diagram of the tables in hr. Most examples in this manual use objects from this schema.
Figure 2-3 HR Schema
Description of “Figure 2-3 HR Schema”
See also
Oracle Database Sample Schemas to learn how to install the sample schemas
Overview of Tables
A table is the basic unit of data organization in an Oracle database.
A table describes an entity, which is something of significance about which information must be recorded. For example, an employee could be an entity.
Oracle Database tables fall into the following basic categories:
- Relational tablesRelational tables have simple columns and are the most common table type. Example 2-1 shows a
CREATE TABLEstatement for a relational table. - Object tablesThe columns correspond to the top-level attributes of an object type. See “Overview of Object Tables”.
You can create a relational table with the following organizational characteristics:
- A heap-organized table does not store rows in any particular order. The
CREATE TABLEstatement creates a heap-organized table by default. - An index-organized table orders rows according to the primary key values. For some applications, index-organized tables enhance performance and use disk space more efficiently. See “Overview of Index-Organized Tables”.
- An external table is a read-only table whose metadata is stored in the database but whose data is stored outside the database. See “Overview of External Tables”.
A table is either permanent or temporary. A permanent table definition and data persist across sessions. A temporary table definition persists in the same way as a permanent table definition, but the data exists only for the duration of a transaction or session. Temporary tables are useful in applications where a result set must be held temporarily, perhaps because the result is constructed by running multiple operations.
This topic contains the following topics:
- Columns
- Rows
- Example: CREATE TABLE and ALTER TABLE Statements
- Oracle Data Types
- Integrity Constraints
- Table Storage
- Table Compression
Leave a Reply