• Have Any Queries +919677781155
  • Call : 1800 889 0145
  • info@elysiumacademy.org
  • Have Any Queries +919677781155
  • Call : 1800 889 0145
  • info@elysiumacademy.org
Logo (2)
  • About Us
    • Academy Overview
    • Mission & Vision
    • Foot Steps
    • Our Pillars
    • Gallery
    • Testimonials
      • Video Testimonials
      • Reviews
    • Our Awards
  • Tesbo Courses
      Tesbo Courses PREMIUM
      • Full Stack JS Programmer Course
      • Full Stack Core Programmer
      • Full Stack Native Programmer
      • Data Analyst CourseOFFER
      • Testing Expert CourseOFFER
      • Mobile App Developer Course
      • IT Infra Manager
      • Cloud Architect Course
      • DevOps Engineer Course
      • Digital Marketing CourseOFFER
      Slash CoursesBUDGET
      • Core C & C++ Coures
      • Core Java & Concepts Course
      • Core Python & Concepts Course OFFER
      • Core UI Development Course
      • Microsoft Office Course
      • CompTIA – Hardware A+ Course
      Classic Courses BUDGET
      • Core C & C++ Coures
      • Core Java & Concepts Course
      • Core Python & Concepts Course OFFER
      • Core MSSQL Course
      • Digital Marketing Courses
      mega-menu
  • Professional Course
      Professional Courses
      Programming Training
      • Programming Course TOP
      • Advanced Java Course
      • Advanced Python Course
      Full Stack Training
      • MERN Stack Course
      • MEAN Stack Course
      Mobile App Training
      • Android Course
      • IOS CourseOFFER
      • Flutter & Dart Course
      • React Native CourseOFFER
      Cyber Security Training
      • Hacking Defender Course
      • Security+ Course
      • Security Analyst+ Course
      • Elynux Essentials Course
      Networking Tranining
      • CCNA - Cisco Solutions
      • CCNP - Switching , Routing
      • Hardware A+ & Network N+
      DB Management Training
      • MySQL & MSSQL Course
      • Oracle DB Management
      Software Testing
      • ISTQB Course TOP
      • Automation Testing TOP
      Data Science & Analyst
      • Python for Data Science-ML
      • DA- (R,Tableau & Power BI)
      Cloud Computing Training
      • Cloud Practioner Course
      • Cloud Solution Architect Course
      • DevOps Professional Course
      • Cloud DevOps Engineer Course
      Crash Courses
      Programming Training
      • C++ Programming Course
      • Java Course OFFER
      • Python Course
      • UI Development Course
      • AngularJs Course
      • NodeJs Course
      • ReactJs Course
      • Wordpress Course
      • .Net Course TOP
      • Go Programming Course
      • Perl Programming Course
      • C# Programming CourseOFFER
      Business Management Course
      • Microsoft Office Course
      • Excel for Enterprises Course
      Testing Training
      • Selenium Java Course
      • Selenium Python Course
      Security Training
      • Hardware A+ Course
      • Cloud Associate Course
      • Azure Fundamental Course
      • Azure Administrator Course
      Digital Marketing Training
      • Digital Marketing Course
      • SMM Course TOP
      • PPC Expert Course
      • Advanced SEO Course
      • SMO Course OFFER
      DB Management Training
      • MSSQL Course
      • Core MYSQL OFFER
      • Oracle Fundamentals Course
      • Oracle DBA Course
      • Oracle PL SQL Course
      Professional Courses
      Programming Training
      • Programming Course TOP
      • Advanced Java Course
      • Advanced Python Course
      Full Stack Training
      • MERN Stack Course
      • MEAN Stack Course
      • Python Full Stack Course
      • Java Full Stack Course
      • PHP Full Stack Course
      • .Net Full Stack Course
      • JS Family Full Stack Course
      Mobile App Training
      • Android Course
      • IOS CourseOFFER
      • Flutter & Dart Course
      • React Native CourseOFFER
      Cyber Security Training
      • Hacking Defender Course
      • Security+ Course
      • Security Analyst+ Course
      • Elynux Essentials Course
      Networking Training
      • CCNA - Cisco Solutions
      • CCNP - Switching , Routing
      • Hardware A+ & Network N+
      DB Management Training
      • MySQL & MSSQL Course
      • Oracle DB Management
      Software Test Training
      • Software Test Expert Course TOP
      • Automation Testing TOP
      Data Science & Analyst
      • Python for Data Science-ML
      • DA- (R,Tableau & Power BI)
      Cloud Computing Training
      • Cloud Solution Architect Course
      • DevOps Professional Course
      • Cloud DevOps Engineer Course
      SAP Training
      • Finance & Controlling
      • Materials Management
      • Human Capital Management
      • Advanced Business App Programming
      • High-Performance Analytic Appliance
      Crash Courses
      Programming Training
      • C & C++ Programming Course
      • Java Course OFFER
      • Python Course
      • Core PHP Course
      • UI Development Course
      • AngularJs Course
      • NodeJs Course
      • ReactJs Course
      • Wordpress Course
      • .Net Course TOP
      • Go Programming Course
      • Perl Programming Course
      • C# Programming CourseOFFER
      Business Management Course
      • Microsoft Office Course
      • Excel for Enterprises Course
      Testing Training
      • Selenium Java Course
      • Selenium Python Course
      • Manual Tester - ISTQB Course
      Security Training
      • Hardware A+ Course
      • Cloud Associate Course
      • Azure Fundamental Course
      • Azure Administrator Course
      Digital Marketing Training
      • Digital Marketing Course
      • SMM Course TOP
      • PPC Expert Course
      • Advanced SEO Course
      • SMO Course OFFER
      DB Management Training
      • MSSQL Course
      • Core MYSQL OFFER
      • Oracle Fundamentals Course
      • Oracle DBA Course
      • Oracle PL SQL Course
      AI Mastery Program
      • AI Engineering For Developers
      • AI Power Digital Marketing
      • AI Mastery For Entrepreneurs Programme
  • Support
    • Placement Training
    • Career Guidance
    • Appointment Booking
    • Help Center
    • Tech Blog
    • Elysium Spark Notes
    • MicroBookShelf
    • Elysium CodeSheet
    • Interview Question
    • Download
    • Ask Elsa
    • Franchise Oppurtunity 
    • Classmate App
  • Contact Us
      • Madurai
      • Chennai - CIT Nagar
      • Tirunelveli
      • Virudhunagar
      • Perambalur
      • Trichy
      • Theni
      • Coimbatore - Hopes
      • Hosur
      • Tiruppur
      • Thoothukudi

      Contact Us

      • 227, IInd Floor, B Block, Elysium Campus, Church Rd, Anna Nagar, Madurai, Tamil Nadu 625020
      • 096777 81155, 096777 24437
      • +91 (0452) 4353702
      • info@elysiumacademy.org
      Madurai
      View More

      Contact Us

      • 12,North Road, near Nandhi Statue,CIT Nagar West, Chennai,Tamilnadu 600035
      • 9941161919
      • 089393 90929
      • chn.cit@elysiumacademy.org
      Chennai
      View More

      Contact Us

      • Castro Palace, 48/5, S Bypass Rd, Xavier Colony, Vasanth Nagar, Tirunelveli, Tamil Nadu 627005
      • 09488126688
      • tnv@elysiumacademy.org
      Tirunelveli
      View More

      Contact Us

      • 1/2A, AA Road, near Head Post Office, MGR Nagar, Anna Nagar, Virudhunagar, Tamil Nadu 626001
      • 08903390051
      • vnr@elysiumacademy.org
      Viruthunagar
      View More

      Contact Us

      • 1/2A, AA Road, near Head Post Office, MGR Nagar, Anna Nagar, Virudhunagar, Tamil Nadu 626001
      • 08903390051
      • vnr@elysiumacademy.org
      • Open 24 Hours
      Madurai
      View More

      Contact Us

      • 2nd Floor, Ponmanam Plaza, above Reliance Trends, near New Bus Stand, Thuraimangalam, Perambalur, Tamil Nadu 621212
      • +91 94422 20202
      • pbr@elysiumacademy.org
      Perambalur
      View More

      Contact Us

      • 2nd Floor, Jaishree Towers, C-142, 9A Cross Rd, above SBI Bank6th Cross East, Thillai Nagar East, West Thillai Nagar, Tennur, Tiruchirappalli, Tamil Nadu 620018
      • +91 9952887895
      • try@elysiumacademy.org
      tiruchy
      View More

      Contact Us

      • D. No.635/A, 3rd Floor, Near State Bank of India, Periyakulam Road, Theni
      • 78978 94002
      • 78978 95002
      • teni@elysiumacademy.org
      contact theni img
      View More

      Contact Us

      • 62, Suriya Complex, Gandhi Street, Thaneerpanthal Road, BR Puram, Hope College,
        Coimbatore -641 004. Landmark – Opp GRG School Ground
      • +91 96777 04758
      • +91 96777 04785
      • cbe.hopes@elysiumacademy.org
      contact cbe hopes img
      View More

      Contact Us

      • First Floor, No. 16, F/8, Hosur - Krishnagiri Rd, adjacent to Ameeria petrol bunk, Hosur, Tamil Nadu 635109
      • +91 99947 82270
      • hsr@elysiumacademy.org
      contact hosur img
      View More

      Contact Us

      • No.9/3C, Mariamman koil street, Padmavathipuram, SAP Theatre opposite, Tiruppur - 641603.
      • +91 7397391713
      • +91 7397391318
      • tup@elysiumacademy.org
      software training institutes
      View More

      Contact Us

      • 127, Ettayapuram Road, Melur Tuticorin, Tuticorin Central Police Station, Thoothukudi - 628002
      • +9193841 34008
      • +9193841 64008
      • ttk@elysiumacademy.org
      Contact -Tuticorin
      View More
  • About Us
    • Academy Overview
    • Mission & Vision
    • Foot Steps
    • Our Pillars
    • Gallery
    • Testimonials
      • Video Testimonials
      • Reviews
    • Our Awards
  • Tesbo Courses
      Tesbo Courses PREMIUM
      • Full Stack JS Programmer Course
      • Full Stack Core Programmer
      • Full Stack Native Programmer
      • Data Analyst CourseOFFER
      • Testing Expert CourseOFFER
      • Mobile App Developer Course
      • IT Infra Manager
      • Cloud Architect Course
      • DevOps Engineer Course
      • Digital Marketing CourseOFFER
      Slash CoursesBUDGET
      • Core C & C++ Coures
      • Core Java & Concepts Course
      • Core Python & Concepts Course OFFER
      • Core UI Development Course
      • Microsoft Office Course
      • CompTIA – Hardware A+ Course
      Classic Courses BUDGET
      • Core C & C++ Coures
      • Core Java & Concepts Course
      • Core Python & Concepts Course OFFER
      • Core MSSQL Course
      • Digital Marketing Courses
      mega-menu
  • Professional Course
      Professional Courses
      Programming Training
      • Programming Course TOP
      • Advanced Java Course
      • Advanced Python Course
      Full Stack Training
      • MERN Stack Course
      • MEAN Stack Course
      Mobile App Training
      • Android Course
      • IOS CourseOFFER
      • Flutter & Dart Course
      • React Native CourseOFFER
      Cyber Security Training
      • Hacking Defender Course
      • Security+ Course
      • Security Analyst+ Course
      • Elynux Essentials Course
      Networking Tranining
      • CCNA - Cisco Solutions
      • CCNP - Switching , Routing
      • Hardware A+ & Network N+
      DB Management Training
      • MySQL & MSSQL Course
      • Oracle DB Management
      Software Testing
      • ISTQB Course TOP
      • Automation Testing TOP
      Data Science & Analyst
      • Python for Data Science-ML
      • DA- (R,Tableau & Power BI)
      Cloud Computing Training
      • Cloud Practioner Course
      • Cloud Solution Architect Course
      • DevOps Professional Course
      • Cloud DevOps Engineer Course
      Crash Courses
      Programming Training
      • C++ Programming Course
      • Java Course OFFER
      • Python Course
      • UI Development Course
      • AngularJs Course
      • NodeJs Course
      • ReactJs Course
      • Wordpress Course
      • .Net Course TOP
      • Go Programming Course
      • Perl Programming Course
      • C# Programming CourseOFFER
      Business Management Course
      • Microsoft Office Course
      • Excel for Enterprises Course
      Testing Training
      • Selenium Java Course
      • Selenium Python Course
      Security Training
      • Hardware A+ Course
      • Cloud Associate Course
      • Azure Fundamental Course
      • Azure Administrator Course
      Digital Marketing Training
      • Digital Marketing Course
      • SMM Course TOP
      • PPC Expert Course
      • Advanced SEO Course
      • SMO Course OFFER
      DB Management Training
      • MSSQL Course
      • Core MYSQL OFFER
      • Oracle Fundamentals Course
      • Oracle DBA Course
      • Oracle PL SQL Course
      Professional Courses
      Programming Training
      • Programming Course TOP
      • Advanced Java Course
      • Advanced Python Course
      Full Stack Training
      • MERN Stack Course
      • MEAN Stack Course
      • Python Full Stack Course
      • Java Full Stack Course
      • PHP Full Stack Course
      • .Net Full Stack Course
      • JS Family Full Stack Course
      Mobile App Training
      • Android Course
      • IOS CourseOFFER
      • Flutter & Dart Course
      • React Native CourseOFFER
      Cyber Security Training
      • Hacking Defender Course
      • Security+ Course
      • Security Analyst+ Course
      • Elynux Essentials Course
      Networking Training
      • CCNA - Cisco Solutions
      • CCNP - Switching , Routing
      • Hardware A+ & Network N+
      DB Management Training
      • MySQL & MSSQL Course
      • Oracle DB Management
      Software Test Training
      • Software Test Expert Course TOP
      • Automation Testing TOP
      Data Science & Analyst
      • Python for Data Science-ML
      • DA- (R,Tableau & Power BI)
      Cloud Computing Training
      • Cloud Solution Architect Course
      • DevOps Professional Course
      • Cloud DevOps Engineer Course
      SAP Training
      • Finance & Controlling
      • Materials Management
      • Human Capital Management
      • Advanced Business App Programming
      • High-Performance Analytic Appliance
      Crash Courses
      Programming Training
      • C & C++ Programming Course
      • Java Course OFFER
      • Python Course
      • Core PHP Course
      • UI Development Course
      • AngularJs Course
      • NodeJs Course
      • ReactJs Course
      • Wordpress Course
      • .Net Course TOP
      • Go Programming Course
      • Perl Programming Course
      • C# Programming CourseOFFER
      Business Management Course
      • Microsoft Office Course
      • Excel for Enterprises Course
      Testing Training
      • Selenium Java Course
      • Selenium Python Course
      • Manual Tester - ISTQB Course
      Security Training
      • Hardware A+ Course
      • Cloud Associate Course
      • Azure Fundamental Course
      • Azure Administrator Course
      Digital Marketing Training
      • Digital Marketing Course
      • SMM Course TOP
      • PPC Expert Course
      • Advanced SEO Course
      • SMO Course OFFER
      DB Management Training
      • MSSQL Course
      • Core MYSQL OFFER
      • Oracle Fundamentals Course
      • Oracle DBA Course
      • Oracle PL SQL Course
      AI Mastery Program
      • AI Engineering For Developers
      • AI Power Digital Marketing
      • AI Mastery For Entrepreneurs Programme
  • Support
    • Placement Training
    • Career Guidance
    • Appointment Booking
    • Help Center
    • Tech Blog
    • Elysium Spark Notes
    • MicroBookShelf
    • Elysium CodeSheet
    • Interview Question
    • Download
    • Ask Elsa
    • Franchise Oppurtunity 
    • Classmate App
  • Contact Us
      • Madurai
      • Chennai - CIT Nagar
      • Tirunelveli
      • Virudhunagar
      • Perambalur
      • Trichy
      • Theni
      • Coimbatore - Hopes
      • Hosur
      • Tiruppur
      • Thoothukudi

      Contact Us

      • 227, IInd Floor, B Block, Elysium Campus, Church Rd, Anna Nagar, Madurai, Tamil Nadu 625020
      • 096777 81155, 096777 24437
      • +91 (0452) 4353702
      • info@elysiumacademy.org
      Madurai
      View More

      Contact Us

      • 12,North Road, near Nandhi Statue,CIT Nagar West, Chennai,Tamilnadu 600035
      • 9941161919
      • 089393 90929
      • chn.cit@elysiumacademy.org
      Chennai
      View More

      Contact Us

      • Castro Palace, 48/5, S Bypass Rd, Xavier Colony, Vasanth Nagar, Tirunelveli, Tamil Nadu 627005
      • 09488126688
      • tnv@elysiumacademy.org
      Tirunelveli
      View More

      Contact Us

      • 1/2A, AA Road, near Head Post Office, MGR Nagar, Anna Nagar, Virudhunagar, Tamil Nadu 626001
      • 08903390051
      • vnr@elysiumacademy.org
      Viruthunagar
      View More

      Contact Us

      • 1/2A, AA Road, near Head Post Office, MGR Nagar, Anna Nagar, Virudhunagar, Tamil Nadu 626001
      • 08903390051
      • vnr@elysiumacademy.org
      • Open 24 Hours
      Madurai
      View More

      Contact Us

      • 2nd Floor, Ponmanam Plaza, above Reliance Trends, near New Bus Stand, Thuraimangalam, Perambalur, Tamil Nadu 621212
      • +91 94422 20202
      • pbr@elysiumacademy.org
      Perambalur
      View More

      Contact Us

      • 2nd Floor, Jaishree Towers, C-142, 9A Cross Rd, above SBI Bank6th Cross East, Thillai Nagar East, West Thillai Nagar, Tennur, Tiruchirappalli, Tamil Nadu 620018
      • +91 9952887895
      • try@elysiumacademy.org
      tiruchy
      View More

      Contact Us

      • D. No.635/A, 3rd Floor, Near State Bank of India, Periyakulam Road, Theni
      • 78978 94002
      • 78978 95002
      • teni@elysiumacademy.org
      contact theni img
      View More

      Contact Us

      • 62, Suriya Complex, Gandhi Street, Thaneerpanthal Road, BR Puram, Hope College,
        Coimbatore -641 004. Landmark – Opp GRG School Ground
      • +91 96777 04758
      • +91 96777 04785
      • cbe.hopes@elysiumacademy.org
      contact cbe hopes img
      View More

      Contact Us

      • First Floor, No. 16, F/8, Hosur - Krishnagiri Rd, adjacent to Ameeria petrol bunk, Hosur, Tamil Nadu 635109
      • +91 99947 82270
      • hsr@elysiumacademy.org
      contact hosur img
      View More

      Contact Us

      • No.9/3C, Mariamman koil street, Padmavathipuram, SAP Theatre opposite, Tiruppur - 641603.
      • +91 7397391713
      • +91 7397391318
      • tup@elysiumacademy.org
      software training institutes
      View More

      Contact Us

      • 127, Ettayapuram Road, Melur Tuticorin, Tuticorin Central Police Station, Thoothukudi - 628002
      • +9193841 34008
      • +9193841 64008
      • ttk@elysiumacademy.org
      Contact -Tuticorin
      View More
Database

Oracle Fundamental

  • October 3, 2024
  • Com 0
Oracle-Fundamental

1. Oracle Database Overview

Oracle Database is structured into physical and logical components that store data securely while ensuring data integrity, concurrency, and availability.
Key Concepts

  • Instance: An instance is the collection of memory structures and processes that manage the database. Each instance has a unique System Global Area (SGA) and background processes.
  • Database: A database is a collection of physical files that store data.
  • Tablespace: A tablespace is a logical storage unit that contains one or more datafiles.
  • Schema: A schema is a collection of database objects, such as tables, views, indexes, and procedures, owned by a user.
  • Datafile: A datafile is a physical file on the disk that contains the actual data stored in tables.
  • Redo Logs: Redo logs record all changes made to the database, ensuring recoverability.
  • Control File: A control file contains information about the structure of the database, including the database name and the locations of datafiles and redo logs.

2. SQL Fundamentals

Structured Query Language (SQL) is the standard language for interacting with relational databases. SQL commands can be broadly categorized into Data Definition Language (DDL), Data Manipulation Language (DML), Data Query Language (DQL), and Data Control Language (DCL).
Data Definition Language (DDL)
DDL commands are used to define, modify, and delete database objects such as tables, views, and indexes.
CREATE TABLE:
The CREATE TABLE statement is used to create a new table.

Copy Code Copied Use a different Browser

CREATE TABLE employees (
    employee_id NUMBER PRIMARY KEY,
    first_name  VARCHAR2(50),
    last_name   VARCHAR2(50),
    hire_date   DATE,
    salary      NUMBER
);
ALTER TABLE:
The ALTER TABLE statement modifies an existing table (add columns, modify column types, drop columns).
Copy Code Copied Use a different Browser

-- Add a column
ALTER TABLE employees ADD (email VARCHAR2(100));
-- Modify a column
ALTER TABLE employees MODIFY (salary NUMBER(10, 2));
-- Drop a column
ALTER TABLE employees DROP COLUMN email;
DROP TABLE:
The DROP TABLE statement deletes a table and its data from the database.
Copy Code Copied Use a different Browser

DROP TABLE employees;
TRUNCATE TABLE:
The TRUNCATE TABLE statement removes all rows from a table but preserves its structure.
Copy Code Copied Use a different Browser

TRUNCATE TABLE employees;
Data Manipulation Language (DML):
DML commands are used to insert, update, delete, and merge data in the database.
INSERT INTO:
The INSERT INTO statement adds new rows to a table.
Copy Code Copied Use a different Browser

INSERT INTO employees (employee_id, first_name, last_name, hire_date, salary)
VALUES (1, 'John', 'Doe', SYSDATE, 60000);
UPDATE:
The UPDATE statement modifies existing data in a table.
Copy Code Copied Use a different Browser

UPDATE employees
SET salary = 70000
WHERE employee_id = 1;
DELETE:
The DELETE statement removes rows from a table.
Copy Code Copied Use a different Browser

DELETE FROM employees
WHERE employee_id = 1;
MERGE:
The MERGE statement is used to perform an “upsert” operation, which means either updating an existing row or inserting a new row if it doesn’t exist.
Copy Code Copied Use a different Browser

MERGE INTO employees e
USING (SELECT 1 AS employee_id FROM dual) d
ON (e.employee_id = d.employee_id)
WHEN MATCHED THEN
    UPDATE SET salary = 75000
WHEN NOT MATCHED THEN
    INSERT (employee_id, first_name, last_name, hire_date, salary)
    VALUES (1, 'John', 'Doe', SYSDATE, 60000);
Data Query Language (DQL):
The SELECT statement is used to query data from one or more tables.
Basic SELECT Query:
Copy Code Copied Use a different Browser

SELECT first_name, last_name, salary
FROM employees
WHERE salary > 50000;
JOINs:
JOIN statements are used to combine rows from two or more tables based on related columns.

  • INNER JOIN: Returns rows that have matching values in both tables.
Copy Code Copied Use a different Browser

SELECT e.first_name, e.last_name, d.department_name
FROM employees e
INNER JOIN departments d ON e.department_id = d.department_id;
  • LEFT JOIN (OUTER JOIN): Returns all rows from the left table and matching rows from the right table.
Copy Code Copied Use a different Browser

SELECT e.first_name, e.last_name, d.department_name
FROM employees e
LEFT JOIN departments d ON e.department_id = d.department_id;
  • CROSS JOIN: Returns the Cartesian product of both tables (i.e., all possible combinations of rows).
Copy Code Copied Use a different Browser

SELECT e.first_name, d.department_name
FROM employees e
CROSS JOIN departments d;
GROUP BY and HAVING:
The GROUP BY clause groups rows with the same values into summary rows, and the HAVING clause filters groups based on conditions.
Copy Code Copied Use a different Browser

SELECT department_id, AVG(salary)
FROM employees
GROUP BY department_id
HAVING AVG(salary) > 50000;
ORDER BY:
The ORDER BY clause is used to sort query results.
Copy Code Copied Use a different Browser

SELECT first_name, last_name, salary
FROM employees
ORDER BY salary DESC;
Data Control Language (DCL):
DCL commands manage access to the database, allowing administrators to grant and revoke privileges.
GRANT:
The GRANT statement is used to give a user or role access rights to the database.
Copy Code Copied Use a different Browser

GRANT SELECT, INSERT ON employees TO user1;
REVOKE:
The REVOKE statement is used to remove previously granted access rights.
Copy Code Copied Use a different Browser

REVOKE INSERT ON employees FROM user1;

3. PL/SQL Programming

PL/SQL (Procedural Language/Structured Query Language) is Oracle’s procedural extension to SQL, allowing you to write complex logic and control structures within the database.
PL/SQL Block Structure:
A PL/SQL block consists of three sections:

  1. DECLARE: Optional section for defining variables, constants, and cursors.
  2. BEGIN: The main executable section where SQL and procedural statements are written.
  3. EXCEPTION: Optional section for handling exceptions (errors).
  4. END: Marks the end of the block.
Copy Code Copied Use a different Browser

DECLARE
    v_salary NUMBER(10, 2);
BEGIN
    SELECT salary INTO v_salary FROM employees WHERE employee_id = 1;
    DBMS_OUTPUT.PUT_LINE('Salary: ' || v_salary);
EXCEPTION
    WHEN NO_DATA_FOUND THEN
        DBMS_OUTPUT.PUT_LINE('No employee found.');
END;
/
Control Structures:
IF-THEN-ELSE:
The IF-THEN-ELSE control structure is used for conditional branching.
Copy Code Copied Use a different Browser

IF v_salary > 50000 THEN
    DBMS_OUTPUT.PUT_LINE('High salary');
ELSE
    DBMS_OUTPUT.PUT_LINE('Low salary');
END IF;
LOOP Statements:
PL/SQL supports different types of loops: LOOP, WHILE, and FOR.

  • Basic LOOP:
Copy Code Copied Use a different Browser

LOOP
    DBMS_OUTPUT.PUT_LINE('This is a loop');
    EXIT; -- Exits the loop
END LOOP;
  • WHILE LOOP:
Copy Code Copied Use a different Browser

WHILE v_salary > 50000 LOOP
    DBMS_OUTPUT.PUT_LINE('Salary is high');
    v_salary := v_salary - 5000; -- Decrement salary
END LOOP;
  • FOR LOOP:
Copy Code Copied Use a different Browser

FOR i IN 1..10 LOOP
    DBMS_OUTPUT.PUT_LINE('Iteration ' || i);
END LOOP;
Cursors:
Cursors are used to retrieve and manipulate rows returned by a query.
Explicit Cursors:
An explicit cursor is defined and controlled by the programmer.
Copy Code Copied Use a different Browser

DECLARE
    CURSOR emp_cursor IS SELECT first_name, salary FROM employees;
    v_first_name employees.first_name%TYPE;
    v_salary employees.salary%TYPE;
BEGIN
    OPEN emp_cursor;
    LOOP
        FETCH emp_cursor INTO v_first_name, v_salary;
        EXIT WHEN emp_cursor%NOTFOUND;
        DBMS_OUTPUT.PUT_LINE(v_first_name || ': ' || v_salary);
    END LOOP;
    CLOSE emp_cursor;
END;
/
Implicit Cursors:
An implicit cursor is automatically created for SELECT statements that return a single row.
Copy Code Copied Use a different Browser

BEGIN
    SELECT salary INTO v_salary FROM employees WHERE employee_id = 1;
    DBMS_OUTPUT.PUT_LINE('Salary: ' || v_salary);
END;
Exception Handling:
PL/SQL provides mechanisms for handling exceptions (runtime errors).
Predefined Exceptions:
Oracle provides several predefined exceptions for common errors, such as NO_DATA_FOUND, TOO_MANY_ROWS, and ZERO_DIVIDE.
Copy Code Copied Use a different Browser

BEGIN
    SELECT salary INTO v_salary FROM employees WHERE employee_id = 1;
EXCEPTION
    WHEN NO_DATA_FOUND THEN
        DBMS_OUTPUT.PUT_LINE('No employee found.');
    WHEN TOO_MANY_ROWS THEN
        DBMS_OUTPUT.PUT_LINE('Multiple rows found.');
END;
User-Defined Exceptions:
You can define your own exceptions for custom error handling.
Copy Code Copied Use a different Browser

DECLARE
    e_salary_too_high EXCEPTION;
BEGIN
    IF v_salary > 100000 THEN
        RAISE e_salary_too_high;
    END IF;
EXCEPTION
    WHEN e_salary_too_high THEN
        DBMS_OUTPUT.PUT_LINE('Salary is too high.');
END;

4. Oracle Database Administration

Users and Roles:
Oracle provides a robust system for managing users and their access rights through roles.
Creating Users:
The CREATE USER statement is used to create a new user account in the database.

Copy Code Copied Use a different Browser

CREATE USER john IDENTIFIED BY password
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp;
Granting Privileges:
Use the GRANT statement to give a user access to system or object privileges.
Copy Code Copied Use a different Browser

GRANT CONNECT, RESOURCE TO john;
GRANT SELECT, INSERT ON employees TO john;
Creating Roles:
Roles simplify the management of user privileges by grouping them together.
Copy Code Copied Use a different Browser

CREATE ROLE hr_role;
GRANT SELECT, INSERT, UPDATE ON employees TO hr_role;
GRANT hr_role TO john;
Tablespaces and Storage Management:
Tablespaces allow you to organize data storage in Oracle databases.
Creating a Tablespace:
Copy Code Copied Use a different Browser

CREATE TABLESPACE data_ts
DATAFILE '/u01/app/oracle/oradata/mydb/data01.dbf' SIZE 100M;
Altering a Tablespace:
To resize or add datafiles to an existing tablespace:
Copy Code Copied Use a different Browser

ALTER DATABASE DATAFILE '/u01/app/oracle/oradata/mydb/data01.dbf' RESIZE 200M;
Backup and Recovery:
Backups with RMAN (Recovery Manager):
RMAN is Oracle’s tool for performing backups and recoveries.

  • Full Backup:
Copy Code Copied Use a different Browser

RMAN> BACKUP DATABASE;
  • Incremental Backup:
Copy Code Copied Use a different Browser

RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE;
Recovery from Backup:

  • Recover the Database:
Copy Code Copied Use a different Browser

RMAN> RESTORE DATABASE;
RMAN> RECOVER DATABASE;
Performance Tuning:
Oracle provides several tools and techniques for monitoring and tuning database performance.
Using EXPLAIN PLAN:
The EXPLAIN PLAN statement shows the execution plan for a SQL query.
Copy Code Copied Use a different Browser

EXPLAIN PLAN FOR
SELECT first_name, last_name FROM employees WHERE salary > 50000;
SELECT * FROM table(DBMS_XPLAN.DISPLAY);
Indexing:
Indexes improve query performance by allowing the database to find rows more efficiently.

  • Creating an Index:
Copy Code Copied Use a different Browser

CREATE INDEX idx_salary ON employees(salary);
  • Rebuilding an Index:
Copy Code Copied Use a different Browser

ALTER INDEX idx_salary REBUILD;

5. Oracle Advanced Features

Partitioning:
Partitioning divides large tables into smaller, more manageable pieces, improving performance and manageability.
Creating a Partitioned Table:

Copy Code Copied Use a different Browser

CREATE TABLE sales (
    sale_id NUMBER,
    sale_date DATE,
    amount NUMBER
)
PARTITION BY RANGE (sale_date) (
    PARTITION p1 VALUES LESS THAN (TO_DATE('01-JAN-2022', 'DD-MON-YYYY')),
    PARTITION p2 VALUES LESS THAN (TO_DATE('01-JAN-2023', 'DD-MON-YYYY'))
);
Materialized Views:
Materialized views store the results of a query, making it faster to retrieve precomputed data.
Creating a Materialized View:
Copy Code Copied Use a different Browser

CREATE MATERIALIZED VIEW emp_sales_mv
AS SELECT e.first_name, e.last_name, s.amount
FROM employees e, sales s
WHERE e.employee_id = s.employee_id;
Oracle Data Pump:
Oracle Data Pump is used for high-speed data export and import.
Exporting Data:
Copy Code Copied Use a different Browser

expdp john/password DIRECTORY=dpump_dir1 DUMPFILE=john.dmp SCHEMAS=john;
Importing Data:
Copy Code Copied Use a different Browser

impdp john/password DIRECTORY=dpump_dir1 DUMPFILE=john.dmp SCHEMAS=john;

6. Conclusion

Oracle Database is a robust, scalable, and feature-rich RDBMS that is essential for enterprise-level applications. This Elysium Spark Note has covered Oracle fundamentals, including SQL, PL/SQL, database administration, and advanced features like partitioning and materialized views. By mastering these key concepts and tools, you’ll be able to manage Oracle databases effectively, optimize performance, and ensure data integrity and security.

Download Elysium Spark Note

Search

Latest Post

Thumb
Top 10 BCA Value Added Courses for
04 Jul, 2026
Thumb
Full Stack Development Course for B.Sc CS
04 Jul, 2026
Thumb
Value Added Courses for B.Sc CS Students:
03 Jul, 2026

Categories

  • ai training
  • Android
  • AWS Training and Certification
  • Azure & Microsoft Technologies
  • Azure Certification
  • azure devops
  • Azure DevOps training in Madurai
  • Azure Services
  • B.Sc Computer Science
  • Bachelor of Computer Application
  • Back End Development
  • Big Data Hadoop Training
  • big data revolution
  • Blog Post
  • C Online Course
  • C++ Programming
  • C++ Programming Course
  • Campus on Drive
  • Career Guidance Program
  • Career Opportunities
  • CCNA Certification
  • Cisco Training
  • Cloud Computing
  • Cloud Course
  • Cloud Courses Online
  • coaching classes near me
  • Coding Bootcamps & Courses
  • Computer Courses
  • Computer Engineering
  • Computer Hardware
  • Computer programming courses
  • Content Management Systems
  • Course
  • Cyber Security Course
  • Data Analyst Training course
  • Data Analytics Courses
  • Data Science & Analytics
  • Data science course
  • Database
  • Database Management
  • DevOps & Automation
  • Digital Advertising
  • Digital marketing academy
  • Digital Marketing Course
  • Digital marketing course online
  • Digital Marketing Strategies
  • Education & Learning
  • Education Training
  • Elysium Spark Note
  • Full Stack Developer Course
  • Go programming certification
  • Hacking Course
  • Hacking Defender Training Course
  • Hardware & Infrastructure
  • ISTQB Certification
  • IT Certifications
  • IT Networking Education
  • IT Training
  • IT Training Institute
  • Java Course
  • JavaScript Frameworks
  • Job Oriented Online Courses
  • Machine Learning
  • MEAN Stack Expert Training Course
  • MERN Stack Expert Training Course
  • Microsoft Access Training
  • Mobile App Development Courses
  • Networking & IT
  • Networking and Security
  • Networking Fundamentals
  • New Courses
  • Online Courses
  • Online Marketing Courses
  • Oracle Certification
  • Others
  • PPC Strategies
  • Productivity Software
  • Professional Certification Courses
  • Programming & Development
  • Programming Courses
  • Programming Courses
  • Programming Languages
  • Python Programming
  • Python Programming Course
  • React Programming
  • ReactJs Training Course
  • Selenium
  • Selenium computer training
  • Selenium Training
  • SEO Strategies
  • SEO Tools and Software
  • Social Media Marketing
  • Social media marketing course
  • Social Media Strategy
  • Software Development
  • Software Testing
  • Software testing Course Online
  • Software Training
  • Software Training Institute
  • SQL Training
  • Technology
  • Technology & IT Solutions
  • UI/UX Design
  • Uncategorized
  • User Experience (UX)
  • Web Automation
  • Web Designing Course
  • Web Development
  • Website Development
blog_card

Tags

100% job assurance courses advanced digital marketing course advanced Python course Android App Developer Android applications course Android Training aws certification Best Data science courses Best Data Science Courses Online with Certificates best data science institutes in Madurai Best full stack developer course Best full stack development training courses Best Java Course and Certification best Java courses Best Python Training and Certification Course Best Software Training Institutes Big Data Analytics Big Data Analytics training center Big Data Training career guidance career in Data Science cloud computing Data Science Best Institute elysium academy Ethical Hacking Course Excel Tips full stack course full stack developer full stack developer course fees full stack python developer full stack web development courses IT Training java course with certification Java Frameworks JavaScript Machine Learning Course Network Security Course Python certification course Python Developers Career Python Training and Certification Course training in Madurai training institute Video Training Course Web Development Course workshop
shape
shape-10
shape
EAPL

Unlock New Career Opportunities with an Accredited Certification from Elysium Academy

Get started now
Logo (2)

Elysium Academy provides students with highly effective coaching classes, delivered through immersive classroom sessions and the best teaching methodologies designed to yield valuable results. We take great pride in our identity and are honored to be a part of your business journey.

Icon-facebook Icon-linkedin2 Icon-instagram Pinterest X-twitter Icon-youtube

Company

  • About Us
  • Mission & Vission
  • Blog
  • Reviews
  • Environment Policy
  • Payment Method
  • Our Awards
  • Franchise Oppurtunity
  • Ask Elsa

Student Zone

  • Become an instructor
  • Video Reviews
  • Placed Students
  • Interview Questions
  • Appointment Booking
  • Career Guidance
  • Placement Training
  • Download
  • Help Center
Logo (2)

Elysium Academy provides students with highly effective coaching classes, delivered through immersive classroom sessions and the best teaching methodologies designed to yield valuable results. We take great pride in our identity and are honored to be a part of your business journey.

At Elysium Academy, we deliver high-impact coaching through immersive classroom experiences and advanced teaching methodologies tailored for measurable success. We take immense pride in our unique identity and are privileged to partner with you on your path to professional excellence.

Icon-facebook Icon-linkedin2 Icon-instagram Pinterest X-twitter Icon-youtube

Company

  • About Us
  • Mission & Vission
  • Blog
  • Reviews
  • Environment Policy
  • Payment Method
  • Our Awards
  • Franchise Oppurtunity
  • Ask Elsa

Student Zone

  • Become an instructor
  • Video Reviews
  • Placed Students
  • Interview Questions
  • Appointment Booking
  • Career Guidance
  • Placement Training
  • Download
  • Help Center

Our Branch Locations

  • Elysium Academy - Madurai , Anna Nagar
  • Chennai, CIT Nagar
  • Tirunelveli, Xavier Colony
  • Perambalur, Near New Bus Stand
  • Trichy,Thillainagar
  • Virudhunagar, Anna Nagar
  • Theni , NRT Nagar
  • Coimbatore - Hopes
  • Hosur
  • Tiruppur
  • Thoothukudi

Copyright © Elysium Academy | A Part of Elysium Groups

  • Cookie Policy
  • Terms & Condition
  • Terms of Use
  • Privacy Policy
Logo (2)