SlideShare una empresa de Scribd logo
1 de 64
Oracle Database
for Developers
Introduction to Oracle, SQL
Developer, SQL, PL/SQL, …
Svetlin Nakov
Technical Trainer
www.nakov.com
Software University
http://softuni.bg
2
 This lesson is NOT for absolute beginners
 Target audience:
 Familiar with databases (MySQL / SQL Server / other)
 Know what is table / column / relationship
 Know what is SQL and simple SQL commands
 Have basic coding skills (C# / Java / JS / other)
Target Audience
Table of Contents
1. Oracle Database Overview
2. Installing Oracle Database 12c
3. Installing SQL Developer
4. Creating DB Schemas and Tables
5. SQL Language Basics
 SELECT, INSERT, UPDATE, DELETE, …
6. PL/SQL: Procedures, Functions, Triggers
7. Accessing Oracle from C# and Java
3
Oracle Database
Overview
5
 Oracle Database
 World's leader in enterprise database systems
 Powers big organizations, e.g. the financial sector
 Designed for very large databases (exabytes of data)
 Supports everything from the DB world
 Transactions, stored procedures, big data, cloud, …
 Very expensive, for big players only
 Has a free Expression Edition – Oracle 11g XE
What is Oracle Database?
Installing Oracle 12c / 11g XE
7
Installing Oracle 12c
Typically, Oracle 12c
DB Enterprise takes
~ 10GB HDD space
8
Installing Oracle 12c – Use a Built-In User
Developers may use
"Windows Built-in Account"
for simplified setup
9
Installing Oracle 12c – Location & Password
Select a directory
without spaces,
e.g. C:oracle
Don't select "Container
database". It is too complex!
10
Installing Oracle 12c – Be Patient 
Usually it takes
20-30 minutes
11
 Oracle DB Express Edition (XE)
 Free, limited, lightweight version
 1 CPU, 1 GB RAM, 11 GB storage
 Only 11g (no 12c version)
 Installing Oracle Database XE
 Download Oracle Database XE 11g
 Install it in a folder without spaces, e.g. C:Progra~1Oracle
 Remember the admin password (for the users SYS and SYSTEM)
Alternative: Oracle Express Edition (XE)
Use Oracle XE
for slower
computers
12
 OracleServiceORCL / OracleServiceXE
 The Oracle database engine for the "ORCL" / "XE" instance (SID)
 The core of the Oracle database
 OracleOraDB12Home1TNSListener / OracleXETNSListener
 Connects Oracle database with client applications (TNS service)
 Listens on TCP port 1521 (TNS listener)
 Enterprise Manager (EM) console – https://localhost:5500/em
 Application Express Web interface (APEX) – http://localhost:8080
Oracle Database Services and Ports
Install Oracle 12c Database
Live Exercise in Class (Lab)
Oracle SQL Developer
Installing and Using SQL Developer
15
 Oracle SQL Developer is free GUI tool for managing Oracle databases:
SQL queries, edit table data, edit DB schema, write code, debug, …
Oracle SQL Developer
Oracle 12c Enterprise comes with
pre-installed SQL Developer 3.2
(old version, not recommended)
16
1. Download Oracle SQL Developer 4.1 from
http://oracle.com/technetwork/developer-tools/sql-developer
2. Extract the ZIP archive in some folder, e.g.
C:oraclesqldeveloper
3. Run sqldeveloper.exe
4. Choose your JDK location
5. Create a start menu shortcut
6. Enjoy 
Installing Oracle SQL Developer
17
Connecting to Oracle with SQL Developer
Use "ORCL" or "XE"
as SID (System ID)
18
Executing SQL Commands
19
 User SYS
 Holds the system schema SYS and data dictionary (DB metadata)
 Has a DBA role
 Includes most database system privileges, e.g. "create user"
 Has a SYSDBA privilege – can start / stop / create / recover DB
 User SYSTEM
 Has a DBA role – can administer the DB, e.g. create / drop users
 No SYSDBA privilege
Users SYS and SYSTEM in Oracle DB
20
Unlocking the "HR" User (Schema)
21
Connecting with the "HR" User
22
View / Edit Data in the "HR" Shema
Install Oracle SQL Developer
and Access the "HR" Schema
Live Exercise in Class (Lab)
Creating DB Schemas and Tables
Creating Users, Tables, Relationships, Etc.
25
 Oracle runs single database with multiple users
 MS SQL Server and MySQL have many databases
 "User (schema) in Oracle" == "Database" in MSSQL and MySQL
 Creating a new user (schema) and give typical privileges:
Creating a New User (Schema) in Oracle
CREATE USER maria IDENTIFIED BY "password123";
GRANT CREATE SESSION, CREATE TABLE, CREATE VIEW,
CREATE PROCEDURE, CREATE SEQUENCE, CREATE TRIGGER,
UNLIMITED TABLESPACE TO maria;
26
 Users in Oracle may have certain privileges
 CREATE SESSION – allows the users to connect to DB
 CREATE TABLE / CREATE VIEW / CREATE PROCEDURE / …
 UNLIMITED TABLESPACE – unlimited storage quota (0 by default)
 SYSDBA – start / stop / edit / backup the entire database
 Users in Oracle may have certain roles
 DBA – database administrator (full DB access)
 CONNECT + RESOURCE – login + create / edit tables and DB objects
User Privileges and Roles in Oracle
27
Creating a New User in SQL Developer
Granting "DBA" role
is easy but might be
a security risk
28
Creating Tables in SQL Developer: COUNTRIES
29
 NUMBER(precision, scale) – a number, e.g. 12345
 precision – total number of digits
 scale – number of digits to the right of the decimal point
 VARCHAR2(length) – sequence of characters (up to 4000)
 NVARCHAR2(length) – sequence of Unicode characters
 DATE – date and time, e.g. "18-June-2015 20:30:07"
 BLOB – binary large object (e.g. PDF document or JPEG image)
 CLOB – character large object (e.g. HTML document)
Oracle Data Types
30
 Oracle database has some specifics
 One database with many users (schemas)
 Each user has its own schema (tables and other DB objects)
 Use UPPERCASE for all identifiers
 Otherwise you should use the quoted syntax, e.g. "My Table"
 No auto-increment columns until version 12c
 Use a SEQUENCE + TRIGGER for auto-increment in Oracle 11g / 10g
 In Oracle NULL is the same like "" (empty string)
 This causes many problems!
Beware: Oracle has Specifics!
31
Editing Table Data in SQL Developer
32
Creating Tables in SQL Developer: TOWNS
33
Creating Relationships in SQL Developer
First save the "TOWNS"
table, then edit it to add
the foreign key constraint
34
View E/R Diagram
35
Foreign Key Constraint Violation
36
Creating E/R Diagram with Data Modeler
Creating DB Schema "Maria" Holding
Countries and Towns (One to Many)
Live Exercise in Class (Lab)
SQL Language – Basics
Basics SQL Commands: SELECT, INSERT,
UPDATE, DELETE, CREATE, ALTER, DROP
SELECT *
FROM COUNTRIES
WHERE COUNTRY_ID = 'UK'
SELECT
c.COUNTRY_NAME AS COUNTRY,
r.REGION_NAME AS REGION
FROM COUNTRIES c
JOIN REGIONS r ON
c.REGION_ID = r.REGION_ID
39
 SELECT
 WHERE (filtering)
 JOIN (joining tables)
 GROUP BY (grouping)
 INSERT
 UPDATE
 DELETE
SQL Language
SELECT
d.DEPARTMENT_NAME AS DEPT,
COUNT(e.EMPLOYEE_ID) AS EMP_COUNT
FROM
DEPARTMENTS d JOIN EMPLOYEES e ON
e.DEPARTMENT_ID = d.DEPARTMENT_ID
GROUP BY
d.DEPARTMENT_ID, d.DEPARTMENT_NAME
HAVING
COUNT(e.EMPLOYEE_ID) >= 5
ORDER BY
EMP_COUNT DESC
40
 In Oracle, we have the "HR" schema, coming as example
 The "HR" schema holds:
 Employees
 Jobs
 Departments
 Locations (addresses)
 Countries
 To use it, unlock the "HR" user and change its password
The HR Sample Schema
41
 SELECT
 WHERE
 ORDER BY
SQL: SELECT, WHERE, ORDER BY
SELECT * FROM COUNTRIES
SELECT COUNTRY_ID, REGION_ID
FROM COUNTRIES
SELECT * FROM COUNTRIES
WHERE COUNTRY_ID = 'UK'
SELECT * FROM COUNTRIES
WHERE COUNTRY_ID LIKE 'C%'
OR COUNTRY_NAME LIKE 'Un%'
SELECT * FROM COUNTRIES
ORDER BY COUNTRY_NAME
SELECT * FROM COUNTRIES
ORDER BY COUNTRY_ID DESC
FETCH NEXT 3 ROWS ONLY
42
 Join COUNTRIES with REGIONS tables in SQL SELECT
SQL: Join Tables
SELECT *
FROM COUNTRIES JOIN REGIONS
ON COUNTRIES.REGION_ID =
REGIONS.REGION_ID
SELECT c.COUNTRY_NAME AS COUNTRY,
r.REGION_NAME AS REGION
FROM COUNTRIES c JOIN REGIONS r
ON c.REGION_ID = r.REGION_ID
43
 Insert a new department
SQL: INSERT
INSERT INTO DEPARTMENTS(
DEPARTMENT_ID,
DEPARTMENT_NAME,
LOCATION_ID)
VALUES (
DEPARTMENTS_SEQ.nextval,
'Brazil Sales',
2800 /* Sao Paulo, Brazil */)
Primary key is
populated by a
SEQUENCE
44
 Update existing department  change name + commit
 Update existing employee  change hire date + rollback
SQL: UPDATE
UPDATE EMPLOYEES SET HIRE_DATE = '2-Jan-2001'
WHERE EXTRACT(YEAR FROM HIRE_DATE) = 2001;
ROLLBACK; -- Discard (cancel) pending changes
UPDATE DEPARTMENTS
SET DEPARTMENT_NAME = 'Brazil Sales and Marketing'
WHERE DEPARTMENT_NAME = 'Brazil Sales'
COMMIT; -- Save pending changes
45
 Delete existing department + commit
 Delete all locations in Italy + rollback
SQL: DELETE
DELETE FROM DEPARTMENTS
WHERE DEPARTMENT_ID = 320;
COMMIT; -- Save pending changes
DELETE FROM LOCATIONS
WHERE COUNTRY_ID =
(SELECT COUNTRY_ID FROM COUNTRIES
WHERE COUNTRY_NAME = 'Italy');
ROLLBACK; -- Discard (cancel) pending changes
SQL Commands
Live Exercise (Lab)
1. Write SQL SELECT to find all locations in towns starting with 'S'.
2. Write SQL INSERT to create a new job (id 'SW_DEV', title 'Software
Developer', salary range 10000 … 50000).
3. Write SQL UPDATE to change the job title 'Software Developer' to
'Software Engineer' and max salary to 75000.
4. Write SQL DELETE to remove the job title 'Software Engineer'.
5. Write a SQL SELECT to find all job titles and the number of
employees for each job title. Use GROUP BY JOB_ID.
More exercises: http://www.srikanthtechnologies.com/oracle/dec9/hrqueries.html
The PL/SQL Language
Programming Logic in the Database
48
 PL/SQL extends the SQL language in Oracle DB
 Blocks (declare / begin / exception / end)
 Variables, types, assignments
 Conditional statements (if-then-else)
 Loops (for, while, do…while)
 Cursors (loops over query results)
 Exceptions handling
 Stored procedures, functions, triggers, packages
PL/SQL Overview
49
PL/SQL – Example
SET SERVEROUTPUT ON
DECLARE
e_id EMPLOYEES.EMPLOYEE_ID%TYPE;
e_fname EMPLOYEES.FIRST_NAME%TYPE;
e_lname EMPLOYEES.LAST_NAME%TYPE;
CURSOR e_employees IS
SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME
FROM EMPLOYEES;
result CLOB;
BEGIN
result := NULL;
OPEN e_employees;
Goal of this PL/SQL program:
Collect the employee data into a
single string (comma separated)
50
PL/SQL – Example (2)
LOOP
FETCH e_employees INTO e_id, e_fname, e_lname;
EXIT WHEN e_employees%NOTFOUND;
IF result IS NOT NULL THEN
result := result || ', ';
END IF;
result := result || e_id || ' (' ||
e_fname || ' ' || e_lname || ')';
END LOOP;
CLOSE e_employees;
DBMS_OUTPUT.PUT_LINE(result);
END;
51
PL/SQL: Interchange Salaries – Example
CREATE OR REPLACE PROCEDURE exchange_salaries(
emp1_id NUMBER, emp2_id NUMBER)
IS
old_emp1_salary EMPLOYEES.SALARY%TYPE;
BEGIN
SELECT SALARY INTO old_emp1_salary
FROM EMPLOYEES WHERE EMPLOYEE_ID = emp1_id;
UPDATE EMPLOYEES SET SALARY =
(SELECT SALARY FROM EMPLOYEES WHERE EMPLOYEE_ID = emp2_id)
WHERE employee_id = emp1_id;
UPDATE EMPLOYEES SET SALARY = old_emp1_salary
WHERE EMPLOYEE_ID = emp2_id;
COMMIT;
END; CALL exchange_salaries(204, 206);
Accessing Oracle DB from Java
Using the Oracle JDBC Driver
Connection
Statement
ResultSet
Oracle DB
setInt(…)
setDate(…)
setString(…)
53
Setup a Maven-Based Java Project
<project …>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
pom.xml
Create a Maven project and
specify Java 8 compilation mode
(by default Maven uses Java 5)
54
Reference the Oracle JDBC Drivers Library
<repositories>
<!-- Repository for ORACLE ojdbc7 (unofficial) -->
<repository> <id>codelds</id>
<url>https://code.lds.org/nexus/content/groups/main-repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
<version>12.1.0.2</version>
</dependency>
</dependencies>
pom.xml
Add an unofficial Maven repository
holding the Oracle JDBC drivers
Reference the latest OJDBC
library (12.1 for Java 7+)
55
List All Employees from the HR Schema
public static void main(String[] args) throws Exception {
Class.forName("oracle.jdbc.driver.OracleDriver");
try (Connection dbConnection = DriverManager.getConnection(
"jdbc:oracle:thin:@localhost:1521:orcl", "hr", "hr")) {
Statement stmp = dbConnection.createStatement();
ResultSet rs = stmp.executeQuery("SELECT * FROM EMPLOYEES");
while (rs.next()) {
int id = rs.getInt("EMPLOYEE_ID");
String firstName = rs.getString("FIRST_NAME");
String lastName = rs.getString("LAST_NAME");
System.out.println(id + ": " + firstName + " " + lastName);
}
}
}
Accessing Oracle DB from C#
Using the Oracle Data Provider for .NET
OracleConnection
OracleCommand
OracleDataReader
Oracle DB
OracleParameter
OracleParameter
OracleParameter
57
Reference the Oracle Data Provider from NuGet
58
Configure the Data Source in App.config
<oracle.manageddataaccess.client>
<version number="*">
<dataSource alias="orcl" descriptor=
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)
(HOST=localhost)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=ORCL))) "/>
</version>
</oracle.manageddataaccess.client>
App.config
59
List All Employees from the HR Schema
using (var dbCon = new OracleConnection(
"Data Source=orcl; User Id=hr; Password=hr"))
{
dbCon.Open();
var cmd = new OracleCommand("SELECT * FROM EMPLOYEES", dbCon);
var reader = cmd.ExecuteReader();
while (reader.Read())
{
int id = (int) reader["EMPLOYEE_ID"];
string firstName = (string) reader["FIRST_NAME"];
string lastName = (string) reader["LAST_NAME"];
Console.WriteLine(id + ": " + firstName + " " + lastName);
}
}
Accessing Oracle from Java and C#
Live Exercise (Lab)
61
 Oracle is world's leading RDBMS
 Powerful, but complex
 Oracle SQL Developer
 DB GUI tool for developers
 SQL language
 SELECT, INSERT, UPDATE, DELETE
 PL/SQL – variables, conditions, loops, cursors, …
 Accessing from Java – use the Oracle JDBC drivers
 Accessing from C# – use the .NET Data Provider for Oracle
Summary
?
Oracle Database for Developers
https://softuni.bg/courses/software-technologies
License
 This course (slides, examples, demos, videos, homework, etc.)
is licensed under the "Creative Commons Attribution-
NonCommercial-ShareAlike 4.0 International" license
63
Free Trainings @ Software University
 Software University Foundation – softuni.org
 Software University – High-Quality Education,
Profession and Job for Software Developers
 softuni.bg
 Software University @ Facebook
 facebook.com/SoftwareUniversity
 Software University @ YouTube
 youtube.com/SoftwareUniversity
 Software University Forums – forum.softuni.bg

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Jdbc
JdbcJdbc
Jdbc
 
Session06 handling xml data
Session06  handling xml dataSession06  handling xml data
Session06 handling xml data
 
An introduction into Spring Data
An introduction into Spring DataAn introduction into Spring Data
An introduction into Spring Data
 
2001: JNDI Its all in the Context
2001:  JNDI Its all in the Context2001:  JNDI Its all in the Context
2001: JNDI Its all in the Context
 
Java Programming - 08 java threading
Java Programming - 08 java threadingJava Programming - 08 java threading
Java Programming - 08 java threading
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
 
JNDI
JNDIJNDI
JNDI
 
Spring data presentation
Spring data presentationSpring data presentation
Spring data presentation
 
Jndi
JndiJndi
Jndi
 
Validating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentationValidating JSON -- Percona Live 2021 presentation
Validating JSON -- Percona Live 2021 presentation
 
Executing Sql Commands
Executing Sql CommandsExecuting Sql Commands
Executing Sql Commands
 
Database programming
Database programmingDatabase programming
Database programming
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And Xml
 
JDBC
JDBCJDBC
JDBC
 
Jndi (1)
Jndi (1)Jndi (1)
Jndi (1)
 
Slickdemo
SlickdemoSlickdemo
Slickdemo
 
Java OOP Programming language (Part 3) - Class and Object
Java OOP Programming language (Part 3) - Class and ObjectJava OOP Programming language (Part 3) - Class and Object
Java OOP Programming language (Part 3) - Class and Object
 
IKH331-07-java-rmi
IKH331-07-java-rmiIKH331-07-java-rmi
IKH331-07-java-rmi
 
JAXP
JAXPJAXP
JAXP
 
Xml parsers
Xml parsersXml parsers
Xml parsers
 

Destacado

Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentationsameerraaj
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfDatabase & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfInSync2011
 
บทที่ 4
บทที่  4บทที่  4
บทที่ 4nunzaza
 
Automated Testing vs. Manual Testing
Automated Testing vs. Manual TestingAutomated Testing vs. Manual Testing
Automated Testing vs. Manual TestingPakorn Weecharungsan
 
บทที่ 10
บทที่ 10บทที่ 10
บทที่ 10nunzaza
 
Intro oracle10gexpress
Intro oracle10gexpressIntro oracle10gexpress
Intro oracle10gexpressjatin Sareen
 
Step By Step How To Install Oracle XE
Step By Step How To Install Oracle XEStep By Step How To Install Oracle XE
Step By Step How To Install Oracle XEAchmad Solichin
 
Tutorial Instalisasi Oracle 10g dan Setting User
Tutorial Instalisasi Oracle 10g dan Setting UserTutorial Instalisasi Oracle 10g dan Setting User
Tutorial Instalisasi Oracle 10g dan Setting UserImam Halim Mursyidin
 
IBM Informix Database SQL Set operators and ANSI Hash Join
IBM Informix Database SQL Set operators and ANSI Hash JoinIBM Informix Database SQL Set operators and ANSI Hash Join
IBM Informix Database SQL Set operators and ANSI Hash JoinAjay Gupte
 
Chapter 6 system development
Chapter 6 system developmentChapter 6 system development
Chapter 6 system developmentPa'rig Prig
 
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?Pichaya Morimoto
 
Oracle intro to designer abridged
Oracle intro to designer abridgedOracle intro to designer abridged
Oracle intro to designer abridgedFITSFSd
 
Sql server ___________ (advance sql)
Sql server  ___________  (advance sql)Sql server  ___________  (advance sql)
Sql server ___________ (advance sql)Ehtisham Ali
 
Oracle Database 11g: Learn and Master PL/SQL | Course Outline
Oracle Database 11g: Learn and Master PL/SQL | Course OutlineOracle Database 11g: Learn and Master PL/SQL | Course Outline
Oracle Database 11g: Learn and Master PL/SQL | Course OutlineDwight Cummings
 

Destacado (20)

Database management system presentation
Database management system presentationDatabase management system presentation
Database management system presentation
 
Ms excel 2007
Ms excel 2007Ms excel 2007
Ms excel 2007
 
สถาปัตยกรรม
สถาปัตยกรรมสถาปัตยกรรม
สถาปัตยกรรม
 
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdfDatabase & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
Database & Technology 1 _ Tom Kyte _ Efficient PL SQL - Why and How to Use.pdf
 
Lesson 1 intro2_db
Lesson 1 intro2_dbLesson 1 intro2_db
Lesson 1 intro2_db
 
Sdlc
SdlcSdlc
Sdlc
 
บทที่ 4
บทที่  4บทที่  4
บทที่ 4
 
e-Commerce
e-Commercee-Commerce
e-Commerce
 
Automated Testing vs. Manual Testing
Automated Testing vs. Manual TestingAutomated Testing vs. Manual Testing
Automated Testing vs. Manual Testing
 
บทที่ 10
บทที่ 10บทที่ 10
บทที่ 10
 
Intro oracle10gexpress
Intro oracle10gexpressIntro oracle10gexpress
Intro oracle10gexpress
 
Step By Step How To Install Oracle XE
Step By Step How To Install Oracle XEStep By Step How To Install Oracle XE
Step By Step How To Install Oracle XE
 
Intro to Application Express
Intro to Application ExpressIntro to Application Express
Intro to Application Express
 
Tutorial Instalisasi Oracle 10g dan Setting User
Tutorial Instalisasi Oracle 10g dan Setting UserTutorial Instalisasi Oracle 10g dan Setting User
Tutorial Instalisasi Oracle 10g dan Setting User
 
IBM Informix Database SQL Set operators and ANSI Hash Join
IBM Informix Database SQL Set operators and ANSI Hash JoinIBM Informix Database SQL Set operators and ANSI Hash Join
IBM Informix Database SQL Set operators and ANSI Hash Join
 
Chapter 6 system development
Chapter 6 system developmentChapter 6 system development
Chapter 6 system development
 
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
CTF คืออะไร เรียนแฮก? ลองแฮก? แข่งแฮก?
 
Oracle intro to designer abridged
Oracle intro to designer abridgedOracle intro to designer abridged
Oracle intro to designer abridged
 
Sql server ___________ (advance sql)
Sql server  ___________  (advance sql)Sql server  ___________  (advance sql)
Sql server ___________ (advance sql)
 
Oracle Database 11g: Learn and Master PL/SQL | Course Outline
Oracle Database 11g: Learn and Master PL/SQL | Course OutlineOracle Database 11g: Learn and Master PL/SQL | Course Outline
Oracle Database 11g: Learn and Master PL/SQL | Course Outline
 

Similar a Oracle 10g

Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsAlex Zaballa
 
Homework help on oracle
Homework help on oracleHomework help on oracle
Homework help on oracleSteve Nash
 
Introduction to Threading in .Net
Introduction to Threading in .NetIntroduction to Threading in .Net
Introduction to Threading in .Netwebhostingguy
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...Alex Zaballa
 
SQL_SERVER_BASIC_1_Training.pptx
SQL_SERVER_BASIC_1_Training.pptxSQL_SERVER_BASIC_1_Training.pptx
SQL_SERVER_BASIC_1_Training.pptxKashifManzoorMeo
 
Introduction to Oracle Database.pptx
Introduction to Oracle Database.pptxIntroduction to Oracle Database.pptx
Introduction to Oracle Database.pptxSiddhantBhardwaj26
 
SQL_SERVER_BASIC_1_Training.pptx
SQL_SERVER_BASIC_1_Training.pptxSQL_SERVER_BASIC_1_Training.pptx
SQL_SERVER_BASIC_1_Training.pptxQuyVo27
 
从 Oracle 合并到 my sql npr 实例分析
从 Oracle 合并到 my sql   npr 实例分析从 Oracle 合并到 my sql   npr 实例分析
从 Oracle 合并到 my sql npr 实例分析YUCHENG HU
 
New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005Govind Raj
 
Generating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerGenerating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerRob van den Berg
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersTobias Koprowski
 
MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 CourseMarcus Davage
 
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?CPD INDIA
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015Alex Zaballa
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shellIvan Ma
 
Practicas oracle10g
Practicas oracle10gPracticas oracle10g
Practicas oracle10grehoscript
 

Similar a Oracle 10g (20)

Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAsOracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c  - New Features for Developers and DBAsOracle Database 12c  - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
 
Homework help on oracle
Homework help on oracleHomework help on oracle
Homework help on oracle
 
Introduction to Threading in .Net
Introduction to Threading in .NetIntroduction to Threading in .Net
Introduction to Threading in .Net
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
SQL_SERVER_BASIC_1_Training.pptx
SQL_SERVER_BASIC_1_Training.pptxSQL_SERVER_BASIC_1_Training.pptx
SQL_SERVER_BASIC_1_Training.pptx
 
Introduction to Oracle Database.pptx
Introduction to Oracle Database.pptxIntroduction to Oracle Database.pptx
Introduction to Oracle Database.pptx
 
SQL_SERVER_BASIC_1_Training.pptx
SQL_SERVER_BASIC_1_Training.pptxSQL_SERVER_BASIC_1_Training.pptx
SQL_SERVER_BASIC_1_Training.pptx
 
从 Oracle 合并到 my sql npr 实例分析
从 Oracle 合并到 my sql   npr 实例分析从 Oracle 合并到 my sql   npr 实例分析
从 Oracle 合并到 my sql npr 实例分析
 
User Group3009
User Group3009User Group3009
User Group3009
 
Sq lite module5
Sq lite module5Sq lite module5
Sq lite module5
 
New features of sql server 2005
New features of sql server 2005New features of sql server 2005
New features of sql server 2005
 
Generating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerGenerating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data Modeler
 
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginnersSQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
SQLSaturday#290_Kiev_AdHocMaintenancePlansForBeginners
 
MDI Training DB2 Course
MDI Training DB2 CourseMDI Training DB2 Course
MDI Training DB2 Course
 
What is SQL Server?
What is SQL Server?What is SQL Server?
What is SQL Server?
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
 
20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell20201106 hk-py con-mysql-shell
20201106 hk-py con-mysql-shell
 
Practicas oracle10g
Practicas oracle10gPracticas oracle10g
Practicas oracle10g
 

Más de Svetlin Nakov

BG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учителиBG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учителиSvetlin Nakov
 
Programming World in 2024
Programming World in 2024Programming World in 2024
Programming World in 2024Svetlin Nakov
 
AI Tools for Business and Startups
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and StartupsSvetlin Nakov
 
AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)Svetlin Nakov
 
AI Tools for Entrepreneurs
AI Tools for EntrepreneursAI Tools for Entrepreneurs
AI Tools for EntrepreneursSvetlin Nakov
 
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023Svetlin Nakov
 
AI Tools for Business and Personal Life
AI Tools for Business and Personal LifeAI Tools for Business and Personal Life
AI Tools for Business and Personal LifeSvetlin Nakov
 
Дипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин НаковДипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин НаковSvetlin Nakov
 
Дипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООПДипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООПSvetlin Nakov
 
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТСвободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТSvetlin Nakov
 
AI and the Professions of the Future
AI and the Professions of the FutureAI and the Professions of the Future
AI and the Professions of the FutureSvetlin Nakov
 
Programming Languages Trends for 2023
Programming Languages Trends for 2023Programming Languages Trends for 2023
Programming Languages Trends for 2023Svetlin Nakov
 
IT Professions and How to Become a Developer
IT Professions and How to Become a DeveloperIT Professions and How to Become a Developer
IT Professions and How to Become a DeveloperSvetlin Nakov
 
GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)Svetlin Nakov
 
IT Professions and Their Future
IT Professions and Their FutureIT Professions and Their Future
IT Professions and Their FutureSvetlin Nakov
 
How to Become a QA Engineer and Start a Job
How to Become a QA Engineer and Start a JobHow to Become a QA Engineer and Start a Job
How to Become a QA Engineer and Start a JobSvetlin Nakov
 
Призвание и цели: моята рецепта
Призвание и цели: моята рецептаПризвание и цели: моята рецепта
Призвание и цели: моята рецептаSvetlin Nakov
 
What Mongolian IT Industry Can Learn from Bulgaria?
What Mongolian IT Industry Can Learn from Bulgaria?What Mongolian IT Industry Can Learn from Bulgaria?
What Mongolian IT Industry Can Learn from Bulgaria?Svetlin Nakov
 
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)Svetlin Nakov
 
Blockchain and DeFi Overview (Nakov, Sept 2021)
Blockchain and DeFi Overview (Nakov, Sept 2021)Blockchain and DeFi Overview (Nakov, Sept 2021)
Blockchain and DeFi Overview (Nakov, Sept 2021)Svetlin Nakov
 

Más de Svetlin Nakov (20)

BG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учителиBG-IT-Edu: отворено учебно съдържание за ИТ учители
BG-IT-Edu: отворено учебно съдържание за ИТ учители
 
Programming World in 2024
Programming World in 2024Programming World in 2024
Programming World in 2024
 
AI Tools for Business and Startups
AI Tools for Business and StartupsAI Tools for Business and Startups
AI Tools for Business and Startups
 
AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)AI Tools for Scientists - Nakov (Oct 2023)
AI Tools for Scientists - Nakov (Oct 2023)
 
AI Tools for Entrepreneurs
AI Tools for EntrepreneursAI Tools for Entrepreneurs
AI Tools for Entrepreneurs
 
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
Bulgarian Tech Industry - Nakov at Dev.BG All in One Conference 2023
 
AI Tools for Business and Personal Life
AI Tools for Business and Personal LifeAI Tools for Business and Personal Life
AI Tools for Business and Personal Life
 
Дипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин НаковДипломна работа: учебно съдържание по ООП - Светлин Наков
Дипломна работа: учебно съдържание по ООП - Светлин Наков
 
Дипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООПДипломна работа: учебно съдържание по ООП
Дипломна работа: учебно съдържание по ООП
 
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТСвободно ИТ учебно съдържание за учители по програмиране и ИТ
Свободно ИТ учебно съдържание за учители по програмиране и ИТ
 
AI and the Professions of the Future
AI and the Professions of the FutureAI and the Professions of the Future
AI and the Professions of the Future
 
Programming Languages Trends for 2023
Programming Languages Trends for 2023Programming Languages Trends for 2023
Programming Languages Trends for 2023
 
IT Professions and How to Become a Developer
IT Professions and How to Become a DeveloperIT Professions and How to Become a Developer
IT Professions and How to Become a Developer
 
GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)GitHub Actions (Nakov at RuseConf, Sept 2022)
GitHub Actions (Nakov at RuseConf, Sept 2022)
 
IT Professions and Their Future
IT Professions and Their FutureIT Professions and Their Future
IT Professions and Their Future
 
How to Become a QA Engineer and Start a Job
How to Become a QA Engineer and Start a JobHow to Become a QA Engineer and Start a Job
How to Become a QA Engineer and Start a Job
 
Призвание и цели: моята рецепта
Призвание и цели: моята рецептаПризвание и цели: моята рецепта
Призвание и цели: моята рецепта
 
What Mongolian IT Industry Can Learn from Bulgaria?
What Mongolian IT Industry Can Learn from Bulgaria?What Mongolian IT Industry Can Learn from Bulgaria?
What Mongolian IT Industry Can Learn from Bulgaria?
 
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
How to Become a Software Developer - Nakov in Mongolia (Oct 2022)
 
Blockchain and DeFi Overview (Nakov, Sept 2021)
Blockchain and DeFi Overview (Nakov, Sept 2021)Blockchain and DeFi Overview (Nakov, Sept 2021)
Blockchain and DeFi Overview (Nakov, Sept 2021)
 

Último

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 

Último (20)

Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Oracle 10g

  • 1. Oracle Database for Developers Introduction to Oracle, SQL Developer, SQL, PL/SQL, … Svetlin Nakov Technical Trainer www.nakov.com Software University http://softuni.bg
  • 2. 2  This lesson is NOT for absolute beginners  Target audience:  Familiar with databases (MySQL / SQL Server / other)  Know what is table / column / relationship  Know what is SQL and simple SQL commands  Have basic coding skills (C# / Java / JS / other) Target Audience
  • 3. Table of Contents 1. Oracle Database Overview 2. Installing Oracle Database 12c 3. Installing SQL Developer 4. Creating DB Schemas and Tables 5. SQL Language Basics  SELECT, INSERT, UPDATE, DELETE, … 6. PL/SQL: Procedures, Functions, Triggers 7. Accessing Oracle from C# and Java 3
  • 5. 5  Oracle Database  World's leader in enterprise database systems  Powers big organizations, e.g. the financial sector  Designed for very large databases (exabytes of data)  Supports everything from the DB world  Transactions, stored procedures, big data, cloud, …  Very expensive, for big players only  Has a free Expression Edition – Oracle 11g XE What is Oracle Database?
  • 7. 7 Installing Oracle 12c Typically, Oracle 12c DB Enterprise takes ~ 10GB HDD space
  • 8. 8 Installing Oracle 12c – Use a Built-In User Developers may use "Windows Built-in Account" for simplified setup
  • 9. 9 Installing Oracle 12c – Location & Password Select a directory without spaces, e.g. C:oracle Don't select "Container database". It is too complex!
  • 10. 10 Installing Oracle 12c – Be Patient  Usually it takes 20-30 minutes
  • 11. 11  Oracle DB Express Edition (XE)  Free, limited, lightweight version  1 CPU, 1 GB RAM, 11 GB storage  Only 11g (no 12c version)  Installing Oracle Database XE  Download Oracle Database XE 11g  Install it in a folder without spaces, e.g. C:Progra~1Oracle  Remember the admin password (for the users SYS and SYSTEM) Alternative: Oracle Express Edition (XE) Use Oracle XE for slower computers
  • 12. 12  OracleServiceORCL / OracleServiceXE  The Oracle database engine for the "ORCL" / "XE" instance (SID)  The core of the Oracle database  OracleOraDB12Home1TNSListener / OracleXETNSListener  Connects Oracle database with client applications (TNS service)  Listens on TCP port 1521 (TNS listener)  Enterprise Manager (EM) console – https://localhost:5500/em  Application Express Web interface (APEX) – http://localhost:8080 Oracle Database Services and Ports
  • 13. Install Oracle 12c Database Live Exercise in Class (Lab)
  • 14. Oracle SQL Developer Installing and Using SQL Developer
  • 15. 15  Oracle SQL Developer is free GUI tool for managing Oracle databases: SQL queries, edit table data, edit DB schema, write code, debug, … Oracle SQL Developer Oracle 12c Enterprise comes with pre-installed SQL Developer 3.2 (old version, not recommended)
  • 16. 16 1. Download Oracle SQL Developer 4.1 from http://oracle.com/technetwork/developer-tools/sql-developer 2. Extract the ZIP archive in some folder, e.g. C:oraclesqldeveloper 3. Run sqldeveloper.exe 4. Choose your JDK location 5. Create a start menu shortcut 6. Enjoy  Installing Oracle SQL Developer
  • 17. 17 Connecting to Oracle with SQL Developer Use "ORCL" or "XE" as SID (System ID)
  • 19. 19  User SYS  Holds the system schema SYS and data dictionary (DB metadata)  Has a DBA role  Includes most database system privileges, e.g. "create user"  Has a SYSDBA privilege – can start / stop / create / recover DB  User SYSTEM  Has a DBA role – can administer the DB, e.g. create / drop users  No SYSDBA privilege Users SYS and SYSTEM in Oracle DB
  • 20. 20 Unlocking the "HR" User (Schema)
  • 22. 22 View / Edit Data in the "HR" Shema
  • 23. Install Oracle SQL Developer and Access the "HR" Schema Live Exercise in Class (Lab)
  • 24. Creating DB Schemas and Tables Creating Users, Tables, Relationships, Etc.
  • 25. 25  Oracle runs single database with multiple users  MS SQL Server and MySQL have many databases  "User (schema) in Oracle" == "Database" in MSSQL and MySQL  Creating a new user (schema) and give typical privileges: Creating a New User (Schema) in Oracle CREATE USER maria IDENTIFIED BY "password123"; GRANT CREATE SESSION, CREATE TABLE, CREATE VIEW, CREATE PROCEDURE, CREATE SEQUENCE, CREATE TRIGGER, UNLIMITED TABLESPACE TO maria;
  • 26. 26  Users in Oracle may have certain privileges  CREATE SESSION – allows the users to connect to DB  CREATE TABLE / CREATE VIEW / CREATE PROCEDURE / …  UNLIMITED TABLESPACE – unlimited storage quota (0 by default)  SYSDBA – start / stop / edit / backup the entire database  Users in Oracle may have certain roles  DBA – database administrator (full DB access)  CONNECT + RESOURCE – login + create / edit tables and DB objects User Privileges and Roles in Oracle
  • 27. 27 Creating a New User in SQL Developer Granting "DBA" role is easy but might be a security risk
  • 28. 28 Creating Tables in SQL Developer: COUNTRIES
  • 29. 29  NUMBER(precision, scale) – a number, e.g. 12345  precision – total number of digits  scale – number of digits to the right of the decimal point  VARCHAR2(length) – sequence of characters (up to 4000)  NVARCHAR2(length) – sequence of Unicode characters  DATE – date and time, e.g. "18-June-2015 20:30:07"  BLOB – binary large object (e.g. PDF document or JPEG image)  CLOB – character large object (e.g. HTML document) Oracle Data Types
  • 30. 30  Oracle database has some specifics  One database with many users (schemas)  Each user has its own schema (tables and other DB objects)  Use UPPERCASE for all identifiers  Otherwise you should use the quoted syntax, e.g. "My Table"  No auto-increment columns until version 12c  Use a SEQUENCE + TRIGGER for auto-increment in Oracle 11g / 10g  In Oracle NULL is the same like "" (empty string)  This causes many problems! Beware: Oracle has Specifics!
  • 31. 31 Editing Table Data in SQL Developer
  • 32. 32 Creating Tables in SQL Developer: TOWNS
  • 33. 33 Creating Relationships in SQL Developer First save the "TOWNS" table, then edit it to add the foreign key constraint
  • 36. 36 Creating E/R Diagram with Data Modeler
  • 37. Creating DB Schema "Maria" Holding Countries and Towns (One to Many) Live Exercise in Class (Lab)
  • 38. SQL Language – Basics Basics SQL Commands: SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP SELECT * FROM COUNTRIES WHERE COUNTRY_ID = 'UK' SELECT c.COUNTRY_NAME AS COUNTRY, r.REGION_NAME AS REGION FROM COUNTRIES c JOIN REGIONS r ON c.REGION_ID = r.REGION_ID
  • 39. 39  SELECT  WHERE (filtering)  JOIN (joining tables)  GROUP BY (grouping)  INSERT  UPDATE  DELETE SQL Language SELECT d.DEPARTMENT_NAME AS DEPT, COUNT(e.EMPLOYEE_ID) AS EMP_COUNT FROM DEPARTMENTS d JOIN EMPLOYEES e ON e.DEPARTMENT_ID = d.DEPARTMENT_ID GROUP BY d.DEPARTMENT_ID, d.DEPARTMENT_NAME HAVING COUNT(e.EMPLOYEE_ID) >= 5 ORDER BY EMP_COUNT DESC
  • 40. 40  In Oracle, we have the "HR" schema, coming as example  The "HR" schema holds:  Employees  Jobs  Departments  Locations (addresses)  Countries  To use it, unlock the "HR" user and change its password The HR Sample Schema
  • 41. 41  SELECT  WHERE  ORDER BY SQL: SELECT, WHERE, ORDER BY SELECT * FROM COUNTRIES SELECT COUNTRY_ID, REGION_ID FROM COUNTRIES SELECT * FROM COUNTRIES WHERE COUNTRY_ID = 'UK' SELECT * FROM COUNTRIES WHERE COUNTRY_ID LIKE 'C%' OR COUNTRY_NAME LIKE 'Un%' SELECT * FROM COUNTRIES ORDER BY COUNTRY_NAME SELECT * FROM COUNTRIES ORDER BY COUNTRY_ID DESC FETCH NEXT 3 ROWS ONLY
  • 42. 42  Join COUNTRIES with REGIONS tables in SQL SELECT SQL: Join Tables SELECT * FROM COUNTRIES JOIN REGIONS ON COUNTRIES.REGION_ID = REGIONS.REGION_ID SELECT c.COUNTRY_NAME AS COUNTRY, r.REGION_NAME AS REGION FROM COUNTRIES c JOIN REGIONS r ON c.REGION_ID = r.REGION_ID
  • 43. 43  Insert a new department SQL: INSERT INSERT INTO DEPARTMENTS( DEPARTMENT_ID, DEPARTMENT_NAME, LOCATION_ID) VALUES ( DEPARTMENTS_SEQ.nextval, 'Brazil Sales', 2800 /* Sao Paulo, Brazil */) Primary key is populated by a SEQUENCE
  • 44. 44  Update existing department  change name + commit  Update existing employee  change hire date + rollback SQL: UPDATE UPDATE EMPLOYEES SET HIRE_DATE = '2-Jan-2001' WHERE EXTRACT(YEAR FROM HIRE_DATE) = 2001; ROLLBACK; -- Discard (cancel) pending changes UPDATE DEPARTMENTS SET DEPARTMENT_NAME = 'Brazil Sales and Marketing' WHERE DEPARTMENT_NAME = 'Brazil Sales' COMMIT; -- Save pending changes
  • 45. 45  Delete existing department + commit  Delete all locations in Italy + rollback SQL: DELETE DELETE FROM DEPARTMENTS WHERE DEPARTMENT_ID = 320; COMMIT; -- Save pending changes DELETE FROM LOCATIONS WHERE COUNTRY_ID = (SELECT COUNTRY_ID FROM COUNTRIES WHERE COUNTRY_NAME = 'Italy'); ROLLBACK; -- Discard (cancel) pending changes
  • 46. SQL Commands Live Exercise (Lab) 1. Write SQL SELECT to find all locations in towns starting with 'S'. 2. Write SQL INSERT to create a new job (id 'SW_DEV', title 'Software Developer', salary range 10000 … 50000). 3. Write SQL UPDATE to change the job title 'Software Developer' to 'Software Engineer' and max salary to 75000. 4. Write SQL DELETE to remove the job title 'Software Engineer'. 5. Write a SQL SELECT to find all job titles and the number of employees for each job title. Use GROUP BY JOB_ID. More exercises: http://www.srikanthtechnologies.com/oracle/dec9/hrqueries.html
  • 47. The PL/SQL Language Programming Logic in the Database
  • 48. 48  PL/SQL extends the SQL language in Oracle DB  Blocks (declare / begin / exception / end)  Variables, types, assignments  Conditional statements (if-then-else)  Loops (for, while, do…while)  Cursors (loops over query results)  Exceptions handling  Stored procedures, functions, triggers, packages PL/SQL Overview
  • 49. 49 PL/SQL – Example SET SERVEROUTPUT ON DECLARE e_id EMPLOYEES.EMPLOYEE_ID%TYPE; e_fname EMPLOYEES.FIRST_NAME%TYPE; e_lname EMPLOYEES.LAST_NAME%TYPE; CURSOR e_employees IS SELECT EMPLOYEE_ID, FIRST_NAME, LAST_NAME FROM EMPLOYEES; result CLOB; BEGIN result := NULL; OPEN e_employees; Goal of this PL/SQL program: Collect the employee data into a single string (comma separated)
  • 50. 50 PL/SQL – Example (2) LOOP FETCH e_employees INTO e_id, e_fname, e_lname; EXIT WHEN e_employees%NOTFOUND; IF result IS NOT NULL THEN result := result || ', '; END IF; result := result || e_id || ' (' || e_fname || ' ' || e_lname || ')'; END LOOP; CLOSE e_employees; DBMS_OUTPUT.PUT_LINE(result); END;
  • 51. 51 PL/SQL: Interchange Salaries – Example CREATE OR REPLACE PROCEDURE exchange_salaries( emp1_id NUMBER, emp2_id NUMBER) IS old_emp1_salary EMPLOYEES.SALARY%TYPE; BEGIN SELECT SALARY INTO old_emp1_salary FROM EMPLOYEES WHERE EMPLOYEE_ID = emp1_id; UPDATE EMPLOYEES SET SALARY = (SELECT SALARY FROM EMPLOYEES WHERE EMPLOYEE_ID = emp2_id) WHERE employee_id = emp1_id; UPDATE EMPLOYEES SET SALARY = old_emp1_salary WHERE EMPLOYEE_ID = emp2_id; COMMIT; END; CALL exchange_salaries(204, 206);
  • 52. Accessing Oracle DB from Java Using the Oracle JDBC Driver Connection Statement ResultSet Oracle DB setInt(…) setDate(…) setString(…)
  • 53. 53 Setup a Maven-Based Java Project <project …> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> </plugins> </build> </project> pom.xml Create a Maven project and specify Java 8 compilation mode (by default Maven uses Java 5)
  • 54. 54 Reference the Oracle JDBC Drivers Library <repositories> <!-- Repository for ORACLE ojdbc7 (unofficial) --> <repository> <id>codelds</id> <url>https://code.lds.org/nexus/content/groups/main-repo</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc7</artifactId> <version>12.1.0.2</version> </dependency> </dependencies> pom.xml Add an unofficial Maven repository holding the Oracle JDBC drivers Reference the latest OJDBC library (12.1 for Java 7+)
  • 55. 55 List All Employees from the HR Schema public static void main(String[] args) throws Exception { Class.forName("oracle.jdbc.driver.OracleDriver"); try (Connection dbConnection = DriverManager.getConnection( "jdbc:oracle:thin:@localhost:1521:orcl", "hr", "hr")) { Statement stmp = dbConnection.createStatement(); ResultSet rs = stmp.executeQuery("SELECT * FROM EMPLOYEES"); while (rs.next()) { int id = rs.getInt("EMPLOYEE_ID"); String firstName = rs.getString("FIRST_NAME"); String lastName = rs.getString("LAST_NAME"); System.out.println(id + ": " + firstName + " " + lastName); } } }
  • 56. Accessing Oracle DB from C# Using the Oracle Data Provider for .NET OracleConnection OracleCommand OracleDataReader Oracle DB OracleParameter OracleParameter OracleParameter
  • 57. 57 Reference the Oracle Data Provider from NuGet
  • 58. 58 Configure the Data Source in App.config <oracle.manageddataaccess.client> <version number="*"> <dataSource alias="orcl" descriptor= "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=localhost)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=ORCL))) "/> </version> </oracle.manageddataaccess.client> App.config
  • 59. 59 List All Employees from the HR Schema using (var dbCon = new OracleConnection( "Data Source=orcl; User Id=hr; Password=hr")) { dbCon.Open(); var cmd = new OracleCommand("SELECT * FROM EMPLOYEES", dbCon); var reader = cmd.ExecuteReader(); while (reader.Read()) { int id = (int) reader["EMPLOYEE_ID"]; string firstName = (string) reader["FIRST_NAME"]; string lastName = (string) reader["LAST_NAME"]; Console.WriteLine(id + ": " + firstName + " " + lastName); } }
  • 60. Accessing Oracle from Java and C# Live Exercise (Lab)
  • 61. 61  Oracle is world's leading RDBMS  Powerful, but complex  Oracle SQL Developer  DB GUI tool for developers  SQL language  SELECT, INSERT, UPDATE, DELETE  PL/SQL – variables, conditions, loops, cursors, …  Accessing from Java – use the Oracle JDBC drivers  Accessing from C# – use the .NET Data Provider for Oracle Summary
  • 62. ? Oracle Database for Developers https://softuni.bg/courses/software-technologies
  • 63. License  This course (slides, examples, demos, videos, homework, etc.) is licensed under the "Creative Commons Attribution- NonCommercial-ShareAlike 4.0 International" license 63
  • 64. Free Trainings @ Software University  Software University Foundation – softuni.org  Software University – High-Quality Education, Profession and Job for Software Developers  softuni.bg  Software University @ Facebook  facebook.com/SoftwareUniversity  Software University @ YouTube  youtube.com/SoftwareUniversity  Software University Forums – forum.softuni.bg