1. DATABASE
• A database is an organized collection of structured data stored
• Electronically in a computer system.
1
2. ORACLE DATABASE FEATURE
• Oracle database allows you to quickly and safely store and retrieve data.
BENEFITS
• It is a cross platform. It can run on various hardware across OS.
• Oracle database has its networking stack that allows application from
different platforms to communicate with the oracle database smoothly. For
example, application running on windows can connect to the oracle
database running on the Unix.
• ACID-complaint – Oracle is acid-complaint database that helps to maintain
data integrity(unique data) and reliability.
2
3. • Logical data structure – Oracle uses the logical data structure to store data so that you can interact
with the database without knowing the data is stored physically.
• Partitioning – is a high-performance feature that allows you to divide a large table into different
pieces and store each piece across storage devices.
• Memory caching – the memory caching architecture allows you to scale up a very large database that
still can perform at a high speed.
• Data Dictionary is a set of internal tables and views that support administer Oracle Database more
effectively.
• Backup and recovery – ensure the integrity of the data in case of system failure. Oracle includes a
powerful tool called Recovery Manager (RMAN) – allows DBA to perform cold, hot, and incremental
database backups and point-in-time recoveries.
• Clustering – Oracle Real Application Clusters (RAC) – Oracle enables high availability that enables the
system is up and running without interruption of services in case one or more server in a cluster fails.
3
4. DATABASE
• To create a database we use
create database “database name”;
• To use any particular database we use
use “database name”;
• To delete a database we use
drop database “database name”;
4
5. CONSTRAINTS
Constrains are used to specify rules for data in table
• Not null
Not null constraint ensures that a column cannot have a null value.
• Default
Default constraints sets a default value for a column where no value is specified.
• Unique
Unique constraints ensures that all the value in a column are different.
• Primary key
Primary key constraints uniquely identifies each record in a table. It is a combination of not null and
unique constraints.
5
6. CREATE A TABLE
• To create a table we use some syntax
create table “table name”(
column1,
Column2,
Etc.
Primary key(column name)
);
There must be only one primary key in a table
6
7. INSERT DATA
• To insert data we use
Insert into “table name”
Values(value1,value2,……….,value k ) `respectively`
7
8. SELECT STATEMENT
We use select to get data from a table
Syntax
Select column1,column2,column k
from “table name”;
Note : we use * to get all the data, for example,
Select * from employee;
8
9. SELECT DISTINCT STATEMENT
We use select distinct where there is duplicate value to find out
distinct values we use select distinct.
Syntax
Select distinct column1 from “table name”
i.e. which values are repeated.
9
10. WHERE CLAUSE
Where clause is used to extract records which satisfy a condition.(i.e. filter)
Syntax
Select column1,column2,……..,etc.
From “table name” where “condition(column1= ‘value’ ”;
From “table name” where “condition(column1< ‘value’ ”;
From “table name” where “condition(column1> ‘value’ ”;
OPERATORS
• AND
AND operator displays records if all the condition separated by AND are true.
Syntax
Select column1,column2,……..,etc.
From “table name” where “condition(column1> ‘value’ and column2 = “value” and column3 = “value” ”;
10
11. OPERATOR
• OR
OR operator displays records if any of condition separated by OR are true.
Syntax
Select column1,column2,……..,etc
From “table name” where “condition(column1> ‘value’ and column2 = “value” and column3 = “value” ”;
• Not
NOT operator displays records if the condition is not true.
Syntax
Select column1,column2,……..,etc
From “table name” where not “condition(column1> ‘value’ )”;
11
12. OPERATOR
• LIKE
Like operator is used to extract records where a particular pattern is present
These are in two type of wild character
% - Represent zero, one or more character
_ - Represent a single character(basically for number)
Syntax
Select column1,column2,……..,etc.
From “table name” where column1 like “any character”%;
12
13. OPERATOR
• Between
Between operator is used to select values within a given range.
Syntax
Select column1,column2,……..,etc.
From “table name” where column1 between “value1” and
“value2”;
13