SlideShare a Scribd company logo
ORACLE ARCHITECTURE
Overview
Presented By
Kelly Technologies
www.kellytechno.com
ORACLE TERMS
 Schema – logical collection of user’s objects
 Tablespace – logical space used for storage
 Datafile – physical file used for storage
 Extent – group of contiguous blocks
 Block – unit of physical storage
www.kellytechno.com
ORACLE
ARCHITECTURE
 database vs. instance
Parameter files*
Control files**
Data files
Redo Log files
System Global Area (SGA)
Background Processes
Disk Memory
Database Instance
* Parameter files include the init<SID>.ora and config<SID>.ora files. These
are used to set options for the database.
** Control files contain information about the db in binary form. They can be
backed up to a text file however.
www.kellytechno.com
ORACLE VS. ACCESS AND MYSQL
 Access
 One .mdb file contains all objects
 Limited roles/permissions
 MySQL
 Three files per table
 Permissions based on user, database, and host
 Oracle
 Many files
 Many roles/permissions possible
www.kellytechno.com
THE ORACLE DATA
DICTIONARY
 Collection of tables and views that show the
inner workings and structure of the db
 “static” data dictionary views
 owned by SYS
 created by catalog.sql script at db creation
 contain DDL info
 dynamic data dictionary views
 also referred to as V$ views
 based on virtual tables (X$ tables)
 provide info about the instance
www.kellytechno.com
MORE DATA DICTIONARY
Create table samples (
ID number(3) primary key,
Type varchar2(5),
Constraint type_ck check (type in (‘photo’,’swatch’))
…);
1. Samples table created in user’s schema
2. Primary key index created in user’s schema (SYS_C984620)
3. Data dictionary is also updated, with rows being inserted into
tables underlying the following data dictionary views:
User_objects
User_constraints
User_cons_columns
And lots more…
www.kellytechno.com
ORACLE ODDS AND
ENDS
 Dual table
 % - the SQL wildcard
 inserting apostrophes
 Case sensitive string matching
INSERT INTO emp (name) VALUES (‘O’’Neill);
UPDATE emp
SET ename=UPPER(ename) WHERE ename='O''Neill';
SELECT 1+1*400 FROM DUAL;
SELECT ename FROM emp WHERE ename like ‘%neil%’;
www.kellytechno.com
SYSDATE
 Sysdate returns current system date AND time
 use trunc function to remove time piece
Example:
select to_char (adate, ‘dd-mon-yy hh24:mi:ss’)
TO_CHAR(ADATE, ‘DD-MON-YY:HH24:MI:SS’)
17-feb-00 23:41:50
select adate from samples where trunc(adate)=‘17-feb-00’;
ADATE
17-FEB-00
www.kellytechno.com
ROWID
 ROWID is an internal number Oracle uses to
uniquely identify each row
 NOT a primary key! Is the actual location of a
row on a disk. Very efficient for retrieval.
 Format specifies block, row, and file (and object
in 8)
Oracle 7: BBBBBBB.RRRR.FFFFF
Oracle 8: OOOOOO.FFF.BBBBBB.RRR
 Called pseudo-column since can be selected
www.kellytechno.com
OUTER JOINS IN ORACLE
 Add (+) to table where nulls are acceptable
SELECT *
FROM emp, dept
WHERE emp.deptno(+)=dept.id;
www.kellytechno.com
ORACLE SQL FUNCTIONS
 Upper(), lower()
 Substr(), replace(), rtrim(), concat()
 Length()
 Floor(), sqrt(), min(), max(), stddev()
 Add_months(), months_between(),
last_day()
 To_date(), to_char(), to_lob()
www.kellytechno.com
MORE FUNCTIONS
 nvl()
 If NULL, return this instead…
Nvl(lastname,’Anonymous’)
 decode()
 Sort of like an If/Then statement…
Decode(gender,0,’Male’,1,’Female’,’Unknown’)
www.kellytechno.com
ORACLE ERROR MESSAGES
 Divided into groups by first three letters (e.g.
ORA or TNS)
 Number gives more information about error
 Several messages may be related to only one
problem
 oerr facility
www.kellytechno.com
CONSTRAINTS
 Primary key
 Foreign key
 Unique, not null
 Check
 Name your constraints
 User constraints, user_cons_columns
CREATE TABLE test (
id NUMBER(2),
col2 VARCHAR2(2),
col3 VARCHAR2(3),
CONSTRAINT test_pk PRIMARY KEY(id),
CONSTRAINT col3_ck CHECK (col3 IN
('yes','no'))
);
www.kellytechno.com
SELECT
user_constraints.constraint_name name,
constraint_type type,
user_constraints.search_condition
FROM user_constraints, user_cons_columns
WHERE
user_constraints.table_name=user_cons_columns.table_name
AND user_constraints.constraint_name=user_cons_columns.constraint_name
AND user_constraints.owner=user_cons_columns.owner
AND user_constraints.table_name=‘TEST’;
NAME T SEARCH_CONDITION
--------------- - -------------------------
COL3_CK C col3 IN ('yes','no')
TEST_PK P
www.kellytechno.com
CONSTRAINTS
 Oracle naming of constraints is NOT intuitive!
 enabling and disabling
disable constraint constraint_name;
 the EXCEPTIONS table
 run utlexcpt.sql to create EXCEPTIONS table then
 alter SQL statement:
SQL_query EXCEPTIONS into EXCEPTIONS;
www.kellytechno.com
MORE OBJECTS
 Sequences
creating the sequence
create sequence CustomerID increment by 1
start with 1000;
selecting from the sequence
insert into customer (name, contact, ID)
values (‘TManage’,’Kristin
Chaffin’,CustomerID.NextVal);
 CurrVal is used after NextVal for related inserts
 Synonyms
provide location and owner transparency
Can be public or private
www.kellytechno.com
PL/SQL -
TRIGGERS
 Executed on insert, update, delete
 Use to enforce business logic that can’t be
coded through referential integrity or
constraints
 Types of triggers
row level (use FOR EACH ROW clause)
statement level (default)
Before and After triggers
 Referencing old and new values
www.kellytechno.com
TRIGGER EXAMPLE
SQL> desc all_triggers;
Name Null? Type
------------------------------- -------- ----
OWNER VARCHAR2(30)
TRIGGER_NAME VARCHAR2(30)
TRIGGER_TYPE VARCHAR2(16)
TRIGGERING_EVENT VARCHAR2(75)
TABLE_OWNER VARCHAR2(30)
BASE_OBJECT_TYPE VARCHAR2(16)
TABLE_NAME VARCHAR2(30)
COLUMN_NAME VARCHAR2(4000)
REFERENCING_NAMES VARCHAR2(128)
WHEN_CLAUSE VARCHAR2(4000)
STATUS VARCHAR2(8)
DESCRIPTION VARCHAR2(4000)
ACTION_TYPE VARCHAR2(11)
TRIGGER_BODY LONG
www.kellytechno.com
TRIGGER EXAMPLE (CONT.)
SQL> select trigger_name from all_triggers where owner='SCOTT';
TRIGGER_NAME
------------------------------
AFTER_INS_UPD_ON_EMP
set lines 120
col trigger_name format a20
col triggering_event format a18
col table_name format a10
col description format a26
col trigger_body format a35
select trigger_name, trigger_type, triggering_event,
table_name, status, description, trigger_body
from all_triggers
where trigger_name='AFTER_INS_UPD_ON_EMP';
www.kellytechno.com
TRIGGER EXAMPLE (CONT.)
SQL> /
TRIGGER_NAME TRIGGER_TYPE TRIGGERING_EVENT TABLE_NAME STATUS DESCRIPTION
-------------------- ---------------- ------------------ ---------- -------- -----------------------
TRIGGER_BODY
-----------------------------------
AFTER_INS_UPD_ON_EMP BEFORE EACH ROW INSERT OR UPDATE EMP ENABLED
scott.after_ins_upd_on_emp
before insert or update
on scott.emp
for each row
begin
:new.ename := upper(:new.ename);
end;
The above trigger was created with the following statement:
create or replace trigger scott.after_ins_upd_on_emp
before insert or update on scott.emp
for each row
begin
:new.ename := upper(:new.ename);
end;
www.kellytechno.com
REMEMBER THOSE
VIEWS?
 Query USER_TRIGGERS to get trigger info
 Query USER_SOURCE to get source of
procedure, function, package, or package body
 Query USER_ERRORS to get error information
(or use show errors)
col name format a15
col text format a40
select name, type, text
from user_errors
order by name, type, sequence;
 Query USER_OBJECT to get status info
www.kellytechno.com
UNDERSTANDING INDEXES
 Index overhead
impact on inserts, updates and deletes
batch inserts can be slowed by indexes - may want to
drop, then recreate
rebuilding indexes
 Use indexes when query will return less than 5%
of rows in a large table
 Determining what to index
All primary and foreign keys
Examine SQL and index heavily hit, selective columns
(columns often found in where clauses)
www.kellytechno.com
WHAT NOT TO INDEX…
PREFERABLY
 columns that are constantly updated
 columns that contain a lot of null values
 columns that have a poor distribution of data
 Examples:
 yes/no
 true/false
 male/female
www.kellytechno.com
THANK
YOU
www.kellytechno.com

More Related Content

What's hot

DBMS information in detail || Dbms (lab) ppt
DBMS information in detail || Dbms (lab) pptDBMS information in detail || Dbms (lab) ppt
DBMS information in detail || Dbms (lab) ppt
gourav kottawar
 
Oracle: DDL
Oracle: DDLOracle: DDL
Oracle: DDL
DataminingTools Inc
 
Oracle: DML
Oracle: DMLOracle: DML
Oracle: DML
DataminingTools Inc
 
Assg2 b 19121033-converted
Assg2 b 19121033-convertedAssg2 b 19121033-converted
Assg2 b 19121033-converted
SUSHANTPHALKE2
 
8. sql
8. sql8. sql
8. sql
khoahuy82
 
dbms lab manual
dbms lab manualdbms lab manual
dbms lab manual
stalinjothi
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsAshwin Dinoriya
 
Dbms lab Manual
Dbms lab ManualDbms lab Manual
Dbms lab Manual
Vivek Kumar Sinha
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
Alex Zaballa
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commandsBelle Wx
 
Mysql quick guide
Mysql quick guideMysql quick guide
Mysql quick guide
Sundaralingam Puvikanth
 
Advanced tips of dbms statas
Advanced tips of dbms statasAdvanced tips of dbms statas
Advanced tips of dbms statasLouis liu
 
MYSQL
MYSQLMYSQL
MYSQLARJUN
 
SQLite in Adobe AIR
SQLite in Adobe AIRSQLite in Adobe AIR
SQLite in Adobe AIRPeter Elst
 
Ijetr012023
Ijetr012023Ijetr012023
Ijetr012023
ER Publication.org
 
SQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate TableSQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate Table
1keydata
 
Lab1 select statement
Lab1 select statementLab1 select statement
Lab1 select statement
Balqees Al.Mubarak
 

What's hot (20)

DBMS information in detail || Dbms (lab) ppt
DBMS information in detail || Dbms (lab) pptDBMS information in detail || Dbms (lab) ppt
DBMS information in detail || Dbms (lab) ppt
 
Sql queries
Sql queriesSql queries
Sql queries
 
Oracle: DDL
Oracle: DDLOracle: DDL
Oracle: DDL
 
Oracle: DML
Oracle: DMLOracle: DML
Oracle: DML
 
Mysql Ppt
Mysql PptMysql Ppt
Mysql Ppt
 
Assg2 b 19121033-converted
Assg2 b 19121033-convertedAssg2 b 19121033-converted
Assg2 b 19121033-converted
 
8. sql
8. sql8. sql
8. sql
 
dbms lab manual
dbms lab manualdbms lab manual
dbms lab manual
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and Joins
 
Dbms lab Manual
Dbms lab ManualDbms lab Manual
Dbms lab Manual
 
Oracle Data Redaction
Oracle Data RedactionOracle Data Redaction
Oracle Data Redaction
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
 
Mysql quick guide
Mysql quick guideMysql quick guide
Mysql quick guide
 
Ddl commands
Ddl commandsDdl commands
Ddl commands
 
Advanced tips of dbms statas
Advanced tips of dbms statasAdvanced tips of dbms statas
Advanced tips of dbms statas
 
MYSQL
MYSQLMYSQL
MYSQL
 
SQLite in Adobe AIR
SQLite in Adobe AIRSQLite in Adobe AIR
SQLite in Adobe AIR
 
Ijetr012023
Ijetr012023Ijetr012023
Ijetr012023
 
SQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate TableSQL Tutorial - How To Create, Drop, and Truncate Table
SQL Tutorial - How To Create, Drop, and Truncate Table
 
Lab1 select statement
Lab1 select statementLab1 select statement
Lab1 select statement
 

Similar to Oracle training in hyderabad

12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4
uzzal basak
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
John Kanagaraj
 
SQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update featureSQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update feature
Frans Jongma
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
More than 12 More things about Oracle Database 12c
More than 12 More things about Oracle Database 12cMore than 12 More things about Oracle Database 12c
More than 12 More things about Oracle Database 12c
Guatemala User Group
 
Wait Events 10g
Wait Events 10gWait Events 10g
Wait Events 10gsagai
 
Sql
SqlSql
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq lsInSync Conference
 
Oracle notes
Oracle notesOracle notes
Oracle notes
Prashant Dadmode
 
Oracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILMOracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILM
Monowar Mukul
 
SQLQueries
SQLQueriesSQLQueries
SQLQueries
karunakar81987
 
Oracle Database 12c Application Development
Oracle Database 12c Application DevelopmentOracle Database 12c Application Development
Oracle Database 12c Application Development
Saurabh K. Gupta
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
Alex Zaballa
 
Dynamic websites lec3
Dynamic websites lec3Dynamic websites lec3
Dynamic websites lec3
Belal Arfa
 

Similar to Oracle training in hyderabad (20)

12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
 
SQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update featureSQL/MX 3.6 Select for update feature
SQL/MX 3.6 Select for update feature
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
More than 12 More things about Oracle Database 12c
More than 12 More things about Oracle Database 12cMore than 12 More things about Oracle Database 12c
More than 12 More things about Oracle Database 12c
 
Wait Events 10g
Wait Events 10gWait Events 10g
Wait Events 10g
 
Sql
SqlSql
Sql
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
 
Oracle notes
Oracle notesOracle notes
Oracle notes
 
Oracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILMOracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILM
 
Less04 Instance
Less04 InstanceLess04 Instance
Less04 Instance
 
Sql
SqlSql
Sql
 
SQLQueries
SQLQueriesSQLQueries
SQLQueries
 
Oracle Database 12c Application Development
Oracle Database 12c Application DevelopmentOracle Database 12c Application Development
Oracle Database 12c Application Development
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should Know
 
Sql subquery
Sql subquerySql subquery
Sql subquery
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
Dynamic websites lec3
Dynamic websites lec3Dynamic websites lec3
Dynamic websites lec3
 

More from Kelly Technologies

Hadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesHadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologies
Kelly Technologies
 
Hadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologiesHadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologies
Kelly Technologies
 
Hadoop training-in-hyderabad
Hadoop training-in-hyderabadHadoop training-in-hyderabad
Hadoop training-in-hyderabad
Kelly Technologies
 
Data science training institute in hyderabad
Data science training institute in hyderabadData science training institute in hyderabad
Data science training institute in hyderabad
Kelly Technologies
 
Data science institutes in hyderabad
Data science institutes in hyderabadData science institutes in hyderabad
Data science institutes in hyderabad
Kelly Technologies
 
Data science training in hyderabad
Data science training in hyderabadData science training in hyderabad
Data science training in hyderabad
Kelly Technologies
 
Hadoop training institute in hyderabad
Hadoop training institute in hyderabadHadoop training institute in hyderabad
Hadoop training institute in hyderabad
Kelly Technologies
 
Hadoop institutes in hyderabad
Hadoop institutes in hyderabadHadoop institutes in hyderabad
Hadoop institutes in hyderabad
Kelly Technologies
 
Hadoop training in hyderabad-kellytechnologies
Hadoop training in hyderabad-kellytechnologiesHadoop training in hyderabad-kellytechnologies
Hadoop training in hyderabad-kellytechnologies
Kelly Technologies
 
Sas training in hyderabad
Sas training in hyderabadSas training in hyderabad
Sas training in hyderabad
Kelly Technologies
 
Websphere mb training in hyderabad
Websphere mb training in hyderabadWebsphere mb training in hyderabad
Websphere mb training in hyderabad
Kelly Technologies
 
Hadoop institutes-in-bangalore
Hadoop institutes-in-bangaloreHadoop institutes-in-bangalore
Hadoop institutes-in-bangalore
Kelly Technologies
 
Oracle training-institutes-in-hyderabad
Oracle training-institutes-in-hyderabadOracle training-institutes-in-hyderabad
Oracle training-institutes-in-hyderabad
Kelly Technologies
 
Hadoop training institutes in bangalore
Hadoop training institutes in bangaloreHadoop training institutes in bangalore
Hadoop training institutes in bangalore
Kelly Technologies
 
Hadoop training institute in bangalore
Hadoop training institute in bangaloreHadoop training institute in bangalore
Hadoop training institute in bangalore
Kelly Technologies
 
Tableau training in bangalore
Tableau training in bangaloreTableau training in bangalore
Tableau training in bangalore
Kelly Technologies
 
Salesforce crm-training-in-bangalore
Salesforce crm-training-in-bangaloreSalesforce crm-training-in-bangalore
Salesforce crm-training-in-bangaloreKelly Technologies
 
Qlikview training in hyderabad
Qlikview training in hyderabadQlikview training in hyderabad
Qlikview training in hyderabad
Kelly Technologies
 
Spark training-in-bangalore
Spark training-in-bangaloreSpark training-in-bangalore
Spark training-in-bangalore
Kelly Technologies
 
Project Management Planning training in hyderabad
Project Management Planning training in hyderabadProject Management Planning training in hyderabad
Project Management Planning training in hyderabad
Kelly Technologies
 

More from Kelly Technologies (20)

Hadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesHadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologies
 
Hadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologiesHadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologies
 
Hadoop training-in-hyderabad
Hadoop training-in-hyderabadHadoop training-in-hyderabad
Hadoop training-in-hyderabad
 
Data science training institute in hyderabad
Data science training institute in hyderabadData science training institute in hyderabad
Data science training institute in hyderabad
 
Data science institutes in hyderabad
Data science institutes in hyderabadData science institutes in hyderabad
Data science institutes in hyderabad
 
Data science training in hyderabad
Data science training in hyderabadData science training in hyderabad
Data science training in hyderabad
 
Hadoop training institute in hyderabad
Hadoop training institute in hyderabadHadoop training institute in hyderabad
Hadoop training institute in hyderabad
 
Hadoop institutes in hyderabad
Hadoop institutes in hyderabadHadoop institutes in hyderabad
Hadoop institutes in hyderabad
 
Hadoop training in hyderabad-kellytechnologies
Hadoop training in hyderabad-kellytechnologiesHadoop training in hyderabad-kellytechnologies
Hadoop training in hyderabad-kellytechnologies
 
Sas training in hyderabad
Sas training in hyderabadSas training in hyderabad
Sas training in hyderabad
 
Websphere mb training in hyderabad
Websphere mb training in hyderabadWebsphere mb training in hyderabad
Websphere mb training in hyderabad
 
Hadoop institutes-in-bangalore
Hadoop institutes-in-bangaloreHadoop institutes-in-bangalore
Hadoop institutes-in-bangalore
 
Oracle training-institutes-in-hyderabad
Oracle training-institutes-in-hyderabadOracle training-institutes-in-hyderabad
Oracle training-institutes-in-hyderabad
 
Hadoop training institutes in bangalore
Hadoop training institutes in bangaloreHadoop training institutes in bangalore
Hadoop training institutes in bangalore
 
Hadoop training institute in bangalore
Hadoop training institute in bangaloreHadoop training institute in bangalore
Hadoop training institute in bangalore
 
Tableau training in bangalore
Tableau training in bangaloreTableau training in bangalore
Tableau training in bangalore
 
Salesforce crm-training-in-bangalore
Salesforce crm-training-in-bangaloreSalesforce crm-training-in-bangalore
Salesforce crm-training-in-bangalore
 
Qlikview training in hyderabad
Qlikview training in hyderabadQlikview training in hyderabad
Qlikview training in hyderabad
 
Spark training-in-bangalore
Spark training-in-bangaloreSpark training-in-bangalore
Spark training-in-bangalore
 
Project Management Planning training in hyderabad
Project Management Planning training in hyderabadProject Management Planning training in hyderabad
Project Management Planning training in hyderabad
 

Recently uploaded

RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
goswamiyash170123
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 

Recently uploaded (20)

RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdfMASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
MASS MEDIA STUDIES-835-CLASS XI Resource Material.pdf
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 

Oracle training in hyderabad

  • 1. ORACLE ARCHITECTURE Overview Presented By Kelly Technologies www.kellytechno.com
  • 2. ORACLE TERMS  Schema – logical collection of user’s objects  Tablespace – logical space used for storage  Datafile – physical file used for storage  Extent – group of contiguous blocks  Block – unit of physical storage www.kellytechno.com
  • 3. ORACLE ARCHITECTURE  database vs. instance Parameter files* Control files** Data files Redo Log files System Global Area (SGA) Background Processes Disk Memory Database Instance * Parameter files include the init<SID>.ora and config<SID>.ora files. These are used to set options for the database. ** Control files contain information about the db in binary form. They can be backed up to a text file however. www.kellytechno.com
  • 4. ORACLE VS. ACCESS AND MYSQL  Access  One .mdb file contains all objects  Limited roles/permissions  MySQL  Three files per table  Permissions based on user, database, and host  Oracle  Many files  Many roles/permissions possible www.kellytechno.com
  • 5. THE ORACLE DATA DICTIONARY  Collection of tables and views that show the inner workings and structure of the db  “static” data dictionary views  owned by SYS  created by catalog.sql script at db creation  contain DDL info  dynamic data dictionary views  also referred to as V$ views  based on virtual tables (X$ tables)  provide info about the instance www.kellytechno.com
  • 6. MORE DATA DICTIONARY Create table samples ( ID number(3) primary key, Type varchar2(5), Constraint type_ck check (type in (‘photo’,’swatch’)) …); 1. Samples table created in user’s schema 2. Primary key index created in user’s schema (SYS_C984620) 3. Data dictionary is also updated, with rows being inserted into tables underlying the following data dictionary views: User_objects User_constraints User_cons_columns And lots more… www.kellytechno.com
  • 7. ORACLE ODDS AND ENDS  Dual table  % - the SQL wildcard  inserting apostrophes  Case sensitive string matching INSERT INTO emp (name) VALUES (‘O’’Neill); UPDATE emp SET ename=UPPER(ename) WHERE ename='O''Neill'; SELECT 1+1*400 FROM DUAL; SELECT ename FROM emp WHERE ename like ‘%neil%’; www.kellytechno.com
  • 8. SYSDATE  Sysdate returns current system date AND time  use trunc function to remove time piece Example: select to_char (adate, ‘dd-mon-yy hh24:mi:ss’) TO_CHAR(ADATE, ‘DD-MON-YY:HH24:MI:SS’) 17-feb-00 23:41:50 select adate from samples where trunc(adate)=‘17-feb-00’; ADATE 17-FEB-00 www.kellytechno.com
  • 9. ROWID  ROWID is an internal number Oracle uses to uniquely identify each row  NOT a primary key! Is the actual location of a row on a disk. Very efficient for retrieval.  Format specifies block, row, and file (and object in 8) Oracle 7: BBBBBBB.RRRR.FFFFF Oracle 8: OOOOOO.FFF.BBBBBB.RRR  Called pseudo-column since can be selected www.kellytechno.com
  • 10. OUTER JOINS IN ORACLE  Add (+) to table where nulls are acceptable SELECT * FROM emp, dept WHERE emp.deptno(+)=dept.id; www.kellytechno.com
  • 11. ORACLE SQL FUNCTIONS  Upper(), lower()  Substr(), replace(), rtrim(), concat()  Length()  Floor(), sqrt(), min(), max(), stddev()  Add_months(), months_between(), last_day()  To_date(), to_char(), to_lob() www.kellytechno.com
  • 12. MORE FUNCTIONS  nvl()  If NULL, return this instead… Nvl(lastname,’Anonymous’)  decode()  Sort of like an If/Then statement… Decode(gender,0,’Male’,1,’Female’,’Unknown’) www.kellytechno.com
  • 13. ORACLE ERROR MESSAGES  Divided into groups by first three letters (e.g. ORA or TNS)  Number gives more information about error  Several messages may be related to only one problem  oerr facility www.kellytechno.com
  • 14. CONSTRAINTS  Primary key  Foreign key  Unique, not null  Check  Name your constraints  User constraints, user_cons_columns CREATE TABLE test ( id NUMBER(2), col2 VARCHAR2(2), col3 VARCHAR2(3), CONSTRAINT test_pk PRIMARY KEY(id), CONSTRAINT col3_ck CHECK (col3 IN ('yes','no')) ); www.kellytechno.com
  • 15. SELECT user_constraints.constraint_name name, constraint_type type, user_constraints.search_condition FROM user_constraints, user_cons_columns WHERE user_constraints.table_name=user_cons_columns.table_name AND user_constraints.constraint_name=user_cons_columns.constraint_name AND user_constraints.owner=user_cons_columns.owner AND user_constraints.table_name=‘TEST’; NAME T SEARCH_CONDITION --------------- - ------------------------- COL3_CK C col3 IN ('yes','no') TEST_PK P www.kellytechno.com
  • 16. CONSTRAINTS  Oracle naming of constraints is NOT intuitive!  enabling and disabling disable constraint constraint_name;  the EXCEPTIONS table  run utlexcpt.sql to create EXCEPTIONS table then  alter SQL statement: SQL_query EXCEPTIONS into EXCEPTIONS; www.kellytechno.com
  • 17. MORE OBJECTS  Sequences creating the sequence create sequence CustomerID increment by 1 start with 1000; selecting from the sequence insert into customer (name, contact, ID) values (‘TManage’,’Kristin Chaffin’,CustomerID.NextVal);  CurrVal is used after NextVal for related inserts  Synonyms provide location and owner transparency Can be public or private www.kellytechno.com
  • 18. PL/SQL - TRIGGERS  Executed on insert, update, delete  Use to enforce business logic that can’t be coded through referential integrity or constraints  Types of triggers row level (use FOR EACH ROW clause) statement level (default) Before and After triggers  Referencing old and new values www.kellytechno.com
  • 19. TRIGGER EXAMPLE SQL> desc all_triggers; Name Null? Type ------------------------------- -------- ---- OWNER VARCHAR2(30) TRIGGER_NAME VARCHAR2(30) TRIGGER_TYPE VARCHAR2(16) TRIGGERING_EVENT VARCHAR2(75) TABLE_OWNER VARCHAR2(30) BASE_OBJECT_TYPE VARCHAR2(16) TABLE_NAME VARCHAR2(30) COLUMN_NAME VARCHAR2(4000) REFERENCING_NAMES VARCHAR2(128) WHEN_CLAUSE VARCHAR2(4000) STATUS VARCHAR2(8) DESCRIPTION VARCHAR2(4000) ACTION_TYPE VARCHAR2(11) TRIGGER_BODY LONG www.kellytechno.com
  • 20. TRIGGER EXAMPLE (CONT.) SQL> select trigger_name from all_triggers where owner='SCOTT'; TRIGGER_NAME ------------------------------ AFTER_INS_UPD_ON_EMP set lines 120 col trigger_name format a20 col triggering_event format a18 col table_name format a10 col description format a26 col trigger_body format a35 select trigger_name, trigger_type, triggering_event, table_name, status, description, trigger_body from all_triggers where trigger_name='AFTER_INS_UPD_ON_EMP'; www.kellytechno.com
  • 21. TRIGGER EXAMPLE (CONT.) SQL> / TRIGGER_NAME TRIGGER_TYPE TRIGGERING_EVENT TABLE_NAME STATUS DESCRIPTION -------------------- ---------------- ------------------ ---------- -------- ----------------------- TRIGGER_BODY ----------------------------------- AFTER_INS_UPD_ON_EMP BEFORE EACH ROW INSERT OR UPDATE EMP ENABLED scott.after_ins_upd_on_emp before insert or update on scott.emp for each row begin :new.ename := upper(:new.ename); end; The above trigger was created with the following statement: create or replace trigger scott.after_ins_upd_on_emp before insert or update on scott.emp for each row begin :new.ename := upper(:new.ename); end; www.kellytechno.com
  • 22. REMEMBER THOSE VIEWS?  Query USER_TRIGGERS to get trigger info  Query USER_SOURCE to get source of procedure, function, package, or package body  Query USER_ERRORS to get error information (or use show errors) col name format a15 col text format a40 select name, type, text from user_errors order by name, type, sequence;  Query USER_OBJECT to get status info www.kellytechno.com
  • 23. UNDERSTANDING INDEXES  Index overhead impact on inserts, updates and deletes batch inserts can be slowed by indexes - may want to drop, then recreate rebuilding indexes  Use indexes when query will return less than 5% of rows in a large table  Determining what to index All primary and foreign keys Examine SQL and index heavily hit, selective columns (columns often found in where clauses) www.kellytechno.com
  • 24. WHAT NOT TO INDEX… PREFERABLY  columns that are constantly updated  columns that contain a lot of null values  columns that have a poor distribution of data  Examples:  yes/no  true/false  male/female www.kellytechno.com

Editor's Notes

  1. What constraints do *YOU* have in your schema? @h:\..\chaffin\shared\scripts\utlexcpt.sql