INTRODUCTION TO ORACLE AND SQL
UNIT-4
S. Vasuki, M.C.A.,
Assistant Professor,
Department of Computer Science
Sri Sarada Niketan College of Science for Women,
Karur.
Introduction to
Oracle
Oracle is a comprehensive database management system that provides
powerful tools for storing, managing, and retrieving data. It is widely used
by organizations of all sizes to manage their critical data.
Data Definition Language (DDL)
1 Defining Data Structures
DDL commands are used to
create, modify, and delete
database objects such as tables,
indexes, and views.
2 Schema Design
DDL allows you to specify the data
types, constraints, and
relationships of database objects.
3 Database Structure
DDL commands define the
fundamental structure and
organization of your database.
Data Manipulation Language (DML)
Manipulating Data
DML commands allow you to insert,
update, and delete data within existing
database tables.
Data Management
DML commands provide the means to
maintain the accuracy and consistency
of data within the database.
Data Integrity
DML commands help ensure that data
changes are properly recorded and
maintained.
Data Control Language
(DCL)
Controlling Access
DCL commands provide
mechanisms to grant and
revoke user privileges and
permissions.
Security and
Authorization
DCL commands help protect
data from unauthorized access
and modification.
Data Integrity
DCL ensures only authorized users can perform specific actions within
the database.
Introduction to SQL Queries
1 Retrieving Information
SQL queries enable users to retrieve specific data from a
database based on various criteria.
2 Data Filtering
SQL queries allow for filtering data based on conditions,
ensuring that only relevant data is retrieved.
3 Data Analysis
SQL queries provide a powerful tool for analyzing data and
extracting meaningful insights.
CREATE, ALTER, DROP, RENAME,
TRUNCATE Statements
CREATE Used to create new database objects,
such as tables, indexes, and views.
ALTER Used to modify the structure or
definition of existing database objects.
DROP Used to delete database objects
permanently.
RENAME Used to change the name of an
existing database object.
TRUNCATE Used to delete all rows from a table
while preserving its structure.
SELECT Statement
Data Selection
The SELECT statement is the
fundamental building block of SQL
queries.
Retrieving Columns
The SELECT clause specifies which
columns to retrieve from the database.
Filtering and Sorting
The WHERE, GROUP BY, and ORDER BY
clauses allow you to filter and sort the
retrieved data.
Retrieving Data
Data Sources
Data can be retrieved from various database tables, views, and other data sources.
SQL Queries
SQL queries are used to specify the criteria for retrieving data from the database.
Results
The results of SQL queries can be displayed in various formats, such as tables or
graphs.
Restricting Data
1 Filtering Criteria
The WHERE clause allows
you to specify conditions to
filter data based on specific
values.
2 Comparison
Operators
Use comparison operators
like =, <, >, <=, >=, and != to
filter data based on specific
values.
3 Logical Operators
Logical operators like AND, OR, and NOT combine multiple
conditions to refine the filtering criteria.
Sorting Data
1 Data Organization
The ORDER BY clause allows you
to sort the retrieved data in
ascending or descending order.
2 Column Selection
Specify the column(s) to sort the
data based on.
3 Sorting Direction
Use ASC (ascending) or DESC
(descending) to specify the
desired sorting order.

Unit 4 Introduction to Oracle and Sql.pptx

  • 1.
    INTRODUCTION TO ORACLEAND SQL UNIT-4 S. Vasuki, M.C.A., Assistant Professor, Department of Computer Science Sri Sarada Niketan College of Science for Women, Karur.
  • 2.
    Introduction to Oracle Oracle isa comprehensive database management system that provides powerful tools for storing, managing, and retrieving data. It is widely used by organizations of all sizes to manage their critical data.
  • 3.
    Data Definition Language(DDL) 1 Defining Data Structures DDL commands are used to create, modify, and delete database objects such as tables, indexes, and views. 2 Schema Design DDL allows you to specify the data types, constraints, and relationships of database objects. 3 Database Structure DDL commands define the fundamental structure and organization of your database.
  • 4.
    Data Manipulation Language(DML) Manipulating Data DML commands allow you to insert, update, and delete data within existing database tables. Data Management DML commands provide the means to maintain the accuracy and consistency of data within the database. Data Integrity DML commands help ensure that data changes are properly recorded and maintained.
  • 5.
    Data Control Language (DCL) ControllingAccess DCL commands provide mechanisms to grant and revoke user privileges and permissions. Security and Authorization DCL commands help protect data from unauthorized access and modification. Data Integrity DCL ensures only authorized users can perform specific actions within the database.
  • 6.
    Introduction to SQLQueries 1 Retrieving Information SQL queries enable users to retrieve specific data from a database based on various criteria. 2 Data Filtering SQL queries allow for filtering data based on conditions, ensuring that only relevant data is retrieved. 3 Data Analysis SQL queries provide a powerful tool for analyzing data and extracting meaningful insights.
  • 7.
    CREATE, ALTER, DROP,RENAME, TRUNCATE Statements CREATE Used to create new database objects, such as tables, indexes, and views. ALTER Used to modify the structure or definition of existing database objects. DROP Used to delete database objects permanently. RENAME Used to change the name of an existing database object. TRUNCATE Used to delete all rows from a table while preserving its structure.
  • 8.
    SELECT Statement Data Selection TheSELECT statement is the fundamental building block of SQL queries. Retrieving Columns The SELECT clause specifies which columns to retrieve from the database. Filtering and Sorting The WHERE, GROUP BY, and ORDER BY clauses allow you to filter and sort the retrieved data.
  • 9.
    Retrieving Data Data Sources Datacan be retrieved from various database tables, views, and other data sources. SQL Queries SQL queries are used to specify the criteria for retrieving data from the database. Results The results of SQL queries can be displayed in various formats, such as tables or graphs.
  • 10.
    Restricting Data 1 FilteringCriteria The WHERE clause allows you to specify conditions to filter data based on specific values. 2 Comparison Operators Use comparison operators like =, <, >, <=, >=, and != to filter data based on specific values. 3 Logical Operators Logical operators like AND, OR, and NOT combine multiple conditions to refine the filtering criteria.
  • 11.
    Sorting Data 1 DataOrganization The ORDER BY clause allows you to sort the retrieved data in ascending or descending order. 2 Column Selection Specify the column(s) to sort the data based on. 3 Sorting Direction Use ASC (ascending) or DESC (descending) to specify the desired sorting order.