Documente Academic
Documente Profesional
Documente Cultură
Manageability
High availability
Performance
Security
Information integration
Manageability
High availability
Performance
Security
Information integration
Electronic
Filing cabinet Database
spreadsheet
Oracle
server
… …
Model of
Entity model of
system
client’s model
in client’s
mind
Table model
of entity model Oracle
server
Tables on disk
EMPLOYEE DEPARTMENT
assigned to
#* number #* number
* name * name
o job title composed of o location
• Scenario:
– “. . . Assign one or more employees to a
department . . .”
– “. . . Some departments do not yet have assigned employees
. . .”
EMPLOYEE DEPARTMENT
#* number assigned to
#* number
* name * name
o job title composed of o location
…
Primary key Foreign key Primary key
SELECT
INSERT
UPDATE Data manipulation language (DML)
DELETE
MERGE
CREATE
ALTER
DROP Data definition language (DDL)
RENAME
TRUNCATE
COMMENT
COMMIT
ROLLBACK Transaction control
SAVEPOINT
In this course:
• Primarily use Oracle SQL Developer, Release 1.2
• Use SQL*Plus:
– In case you do not have access to Oracle SQL Developer
– Or when any command does not work in Oracle SQL
Developer
SQL Developer
• Developed in Java
• Supports Windows, Linux, and Mac OS X platforms
• Default connectivity by using the JDBC Thin driver
• Does not require an installer
– Unzip the downloaded Oracle SQL Developer kit and double-
click sqldeveloper.exe to start Oracle SQL Developer.
• Connects to any Oracle Database, version 9.2.0.1 and later
• Freely downloadable from the following link:
– http://www.oracle.com/technology/products/database/sql_dev
eloper/index.html
• Needs JDK 1.5 installed on your system, which can be
downloaded from the following link:
– http://java.sun.com/javase/downloads/index_jdk5.jsp
Enter SQL
Statements.
Results are
shown here.
1 2 4 6 8 9
5 7
3
F9 F5
F5
F9
Before
formatting
After
formatting
2
3
Provide the
location of the
sqlplus.exe
file only for
the first time
you invoke
SQL*Plus.
DEPARTMENTS LOCATIONS
department_id location_id
department_name street_address
manager_id postal_code
location_id city
state_province
country_id
JOB_HISTORY
employee_id
start_date
EMPLOYEES
employee_id
end_date
first_name
job_id
last_name COUNTRIES
department_id email country_id
phone_number country_name
hire_date region_id
job_id
salary
commission_pct
JOBS manager_id
job_id department_id
job_title
min_salary
REGIONS
max_salary region_id
region_name
EMPLOYEES
DEPARTMENTS JOB_GRADES