Oracle

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 24

Oracle

Introduction
Oracle
• Oracle is not a language
• Basically, Oracle is a company that provide
RDBMS
• What is RDBMS?
• RDBMS is a software
• What is RDBMS Software?
• Relational Database Management Software
Introduction
• An Oracle database is a collection of data treated as a unit.
• A database server is the key to solving the problems of
information management.
• In general, a server reliably manages a large amount of
data in a multiuser environment so that many users can
concurrently access the same data.
• All this is accomplished while delivering high performance.
• A database server also prevents unauthorized access and
provides efficient solutions for failure recovery.
INTRODUCTION
• Oracle Database Developer
• Responsible of creating and maintaining the
database using oracle technology stack.
• Develop new component of an application or
either convert application to run in Oracle
development environment.
Schema Definition
• Oracle database group related information
into logical structure called Schema
• The logical structure is known as schema
object.
• When you provide username and password,
you specify the schema and indicate that you
are its owner
Schema Object
• Every object in an Oracle Database belongs to only one schema, and
has a unique name with that schema.
• Some of the objects that schemas can contain are:

• Tables
• Views
• Indexes
• Sequences
• Synonyms
• Stored subprogram
• Triggers
• Packages
Database
• Database is a program to store the data
• What is data?
• It can be anything about which information is
to be stored
• Database are most widely used for businesses.
• All the Business related data is to be stored for
the purpose of making right decisions.
Database
• Example:
• Sales: A store sell two type of burgers. They
store the information about the sold burgers.
• From this data , they can guess which burger is
mostly liked by customers.
• Another Example:
• Websites: they contain all kind of data
Relational Database Management System

• RDBMS: Stands for relational database


management system.
• Most popular type of database.
• Microsoft SQL Server comes under RDBMS.
• We can store the data in a structured way
• i.e.( rows & columns)
• This makes it easy to access and locate data.
Relational Database Management System

• Tables may be related to another tables. So this


helps to run a queries at multiple tables at once.
• Example:
• Oracle
• Enterprise Database
• Other Database
• MySQL, SQL SERVER, MONGODB Open
Source
Software
• Software is a combination of Frontend And
Backend.
• Frontend: It supports the “User Interface”.
• Exp: Values seen through browsers or other
applications.
• Backend: It supports the “Database”
• Exp: values entered through UI in database.
Purpose of ORACLE
• It manage and store the data in database.
• It can modify, extract, and search the data
within database.
• We can store different data formats and we
can access them through applications (text,
numbers, image, video files)
• Stored data in a structured way so that it can
be easily accessed.
Major Tracks in Oracle
1. Oracle Developer
2. Oracle DBA
Users
• By default, oracle has two users
• System & sys
• System: we can work with system user by
default login.
• Sys: Sys is a super user.
• However, we can create our own users .
• Anyothe instances lied between these users.
Queries in ORACLE
• We can process queries in three ways
1. SQL*PLUS ( Command prompt)
2. SQL DEVELOPER ( GUI)
3. API
Categories of SQL
• DDL (DATA DEFINITION LANGUAGE)
• Create, rename alter truncate
• DML( DATA MANIPULATION LANGUAGE)
• Insert,Update ,Delete
• DCL( DATA CONTROL LANGUAGE)
• Grant , REVOKE, TRUNCATE, DROP
• TCL( TRANSACTION CONTROL LANGUAGE)
• Commit, Rollback, SAVEPOINT
• DQL(DATA QUERY LANGUAGE)
• Select
SQL
• Sql is a language that used to perform
operations on different databases.
• PL/SQL: advance version of SQL
• (it has some extra features of SQL)
• SqlPlus: is a default editor in Oracle.
Create user For Connection
• Click on New connection
• Enter any name of Connection(BTM-32)
• Enter the username (sys or system)
• Enter Password (Same as installation)
• Set Connection type (TNS)
• Set Network Alias (Orcl)
• Click on Test
• Click on connect
Detail
• TNS:TNS stands for Transparent Network
Substrate. It’s an Oracle’s proprietary
networking technology. And is used for
establishing a peer-to-peer communication
between Server and Client
• ORCL: it is a network Alias. It Associate the
service address with client.
Create New User for database
• Click on User created for connection
• Right Click on other user
• Click on create user
• Enter Username
• Enter password
• Add privillidges
CREATE TABLE
• CREATE TABLE Student (
• SID INT, Name VARCHAR(20), PHONENO
VARCHAR(12))
• Single row
• INSERT INTO Student VALUES(2,’Ali’,
‘2635635635’)
• Drop TABLE Student;
Multiple Rows
• INSERT ALL
• INTO Student (id, name) VALUES (20,
'Google')
• INTO Student (id, name) VALUES (21,
'Microsoft')
• INTO Student(id, name) VALUES (22, 'Apple')
• SELECT * FROM dual;
CREATE TABLE AS
• CREATE TABLE new_table
• AS (SELECT * FROM old_table);

• If you create the table in this way, the new


table will contain records from the existing
table.
ALTER TABLE
• ALTER TABLE customers
• ADD customer_age varchar2(50);

You might also like