Sunteți pe pagina 1din 10

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

has a

Gautami (brijeshgautami57@gmailฺcom)

license to use this Student Guideฺ

non-transferable

Brijesh

M/sฺSeed Infotech Ltdฺ

Guideฺ non-transferable Brijesh M/sฺSeed Infotech Ltdฺ Table Descriptions Copyright © 2014, Oracle and/or its

Table Descriptions

Brijesh M/sฺSeed Infotech Ltdฺ Table Descriptions Copyright © 2014, Oracle and/or its affiliates. All rights

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

has a

Gautami (brijeshgautami57@gmailฺcom)

license to use this Student Guideฺ

non-transferable

Brijesh

Schema Description

M/sฺSeed Infotech Ltdฺ

Overall Description

The Oracle Database sample schemas portray a sample company that operates worldwide to fill orders for several different products. The company has three divisions:

Human Resources: Tracks information about employees and facilities

Order Entry: Tracks product inventories and sales through various channels

Sales History: Tracks business statistics to facilitate business decisions

Each of these divisions is represented by a schema. In this course, you have access to the objects in all the schemas. However, the emphasis of the examples, demonstrations, and practices is on the Human Resources (HR) schema.

All scripts necessary to create the sample schemas reside in the $ORACLE_HOME/demo/schema/ folder.

Human Resources ( HR )

This is the schema that is used in this course. In the Human Resource (HR) records, each

employee has an identification number, email address, job identification code, salary, and

manager. Some employees earn commissions in addition to their salary.

The company also tracks information about the jobs within the organization. Each job has an

identification code, job title, and a minimum and maximum salary range for the job. Some

employees have been with the company for a long time and have held different positions

within the company. When an employee resigns, the duration the employee was working for,

the job identification number, and the department are recorded.

The sample company is regionally diverse, so it tracks the locations of its warehouses and

departments. Each employee is assigned to a department, and each department is identified

either by a unique department number or a short name. Each department is associated with

one location, and each location has a full address that includes the street name, postal code,

city, state or province, and the country code.

In places where the departments and warehouses are located, the company records details

such as the country name, currency symbol, currency name, and the region where the country

is located geographically.

Oracle Database 12 c : SQL Workshop I

A - 2

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

has a

Gautami (brijeshgautami57@gmailฺcom)

license to use this Student Guideฺ

non-transferable

Brijesh

M/sฺSeed Infotech Ltdฺ

HR Entity Relationship Diagram

HR DEPARTMENTS department_id department_name manager_id location_id JOB_HISTORY employee_id EMPLOYEES start_date
HR
DEPARTMENTS
department_id
department_name
manager_id
location_id
JOB_HISTORY
employee_id
EMPLOYEES
start_date
end_date
employee_id
first_name
job_id
last_name
department_id
email
phone_number
hire_date
job_id
JOBS
salary
job_id
commission_pct
job_title
manager_id
min_salary
department_id
max_salary

LOCATIONS

location_id

street_address

postal_code

city

state_province

street_address postal_code city state_province COUNTRIES country_id country_name region_id Oracle

COUNTRIES

country_id

country_name

region_id

city state_province COUNTRIES country_id country_name region_id Oracle Database 12 c : SQL Workshop I A -
city state_province COUNTRIES country_id country_name region_id Oracle Database 12 c : SQL Workshop I A -

Oracle Database 12 c : SQL Workshop I

A - 3

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

has a

Gautami (brijeshgautami57@gmailฺcom)

license to use this Student Guideฺ

non-transferable

Brijesh

M/sฺSeed Infotech Ltdฺ

Human Resources (HR) Table Descriptions

DESCRIBE countries

Human Resources (HR) Table Descriptions DESCRIBE countries SELECT * FROM countries Oracle Database 12 c :

SELECT * FROM countries

(HR) Table Descriptions DESCRIBE countries SELECT * FROM countries Oracle Database 12 c : SQL Workshop

Oracle Database 12 c : SQL Workshop I

A - 4

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Gautami (brijeshgautami57@gmailฺcom)

license to use this Student Guideฺ

non-transferable

Brijesh

DESCRIBE departments

M/sฺSeed Infotech Ltdฺ

Brijesh DESCRIBE departments M/sฺSeed Infotech Ltdฺ SELECT * FROM departments has a Oracle Database 12 c

SELECT * FROM departments

has a
has a

Oracle Database 12 c : SQL Workshop I

A - 5

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

has a

Gautami (brijeshgautami57@gmailฺcom)

M/sฺSeed Infotech Ltdฺ

DESCRIBE employees

M/sฺSeed Infotech Ltdฺ DESCRIBE employees SELECT * FROM employees Brijesh non-transferable license

SELECT * FROM employees

Brijesh non-transferable license to use this Student Guideฺ
Brijesh
non-transferable
license to use this Student Guideฺ

.

.

.

Oracle Database 12 c : SQL Workshop I

A - 6

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Gautami (brijeshgautami57@gmailฺcom)

non-transferable

Brijesh

DESCRIBE job_history

M/sฺSeed Infotech Ltdฺ

Brijesh DESCRIBE job_history M/sฺSeed Infotech Ltdฺ SELECT * FROM job_history has a license to use this

SELECT * FROM job_history

has a license to use this Student Guideฺ
has a
license to use this Student Guideฺ

Oracle Database 12 c : SQL Workshop I

A - 7

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

has a

Gautami (brijeshgautami57@gmailฺcom)

license to use this Student Guideฺ

non-transferable

Brijesh

DESCRIBE jobs

M/sฺSeed Infotech Ltdฺ

Brijesh DESCRIBE jobs M/sฺSeed Infotech Ltdฺ SELECT * FROM jobs Oracle Database 12 c : SQL

SELECT * FROM jobs

Brijesh DESCRIBE jobs M/sฺSeed Infotech Ltdฺ SELECT * FROM jobs Oracle Database 12 c : SQL

Oracle Database 12 c : SQL Workshop I

A - 8

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

Gautami (brijeshgautami57@gmailฺcom)

license to use this Student Guideฺ

non-transferable

Brijesh

M/sฺSeed Infotech Ltdฺ

DESCRIBE locations

Brijesh M/sฺSeed Infotech Ltdฺ DESCRIBE locations SELECT * FROM locations has a Oracle Database 12 c

SELECT * FROM locations

has a
has a

Oracle Database 12 c : SQL Workshop I

A - 9

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2014, Oracle and/or its affiliatesฺ

has a

Gautami (brijeshgautami57@gmailฺcom)

license to use this Student Guideฺ

non-transferable

Brijesh

DESCRIBE regions

M/sฺSeed Infotech Ltdฺ

Brijesh DESCRIBE regions M/sฺSeed Infotech Ltdฺ SELECT * FROM regions Oracle Database 12 c : SQL

SELECT * FROM regions

Brijesh DESCRIBE regions M/sฺSeed Infotech Ltdฺ SELECT * FROM regions Oracle Database 12 c : SQL

Oracle Database 12 c : SQL Workshop I

A - 10