What do you mean by database
‘rehitecture of database’ management
System Including siren le
DR batabase Management system (DBMS) is 2
“itabace ft provide an iterace for ste 10
interact nith he taace ang ensure tat da
nm nto several components
‘an be 4 commandiine terface,» graph
Sevinterface (Gl) ora neonsare intrace
{Query Proesor The query pacessornterprets
‘ucts submited by ust and converts ther
ito 4st of strctne thatthe DBMS can
of the ENS. It 1s responsible for stong,
‘etievng ane upesting ct inthe étabase
ted,
Buller Manager The buffer manager te
Sporion of memory wed cache ala pages
ftomtheask
ie syste The fle sytem is the undying
Bedi
Data Dictonary The data ctionay ie
Bcup and Recovery Manager: The baaup and
recovery manager responsible for ceetng
tates
Wat ae the various kinds of performance
feport avaiable In the oracle. database
management system mention the name
Inova Database Managerent system (85),
‘hate ae several kines of performance reports
Giabare
[tomate Workload Repostory ANA Repos:
peso of me
Detomate Ostabace Diagrontc Monto (ADD
ofthe database stance and deny potential
peifomance bttnecke
Detve Sesion History (ASH. Reports ASK
‘atonsin the database stance
SOL Tuning Aas Reports OL Tuning Advisor
reports analre SQ. satements th ave
provde tecormenditions for eptining thet
perfomance
Ghosen by the eatabese optimize for SOL
tuning tol tat colts performance sass
ftom the catabase over 2 period of time
eluding Ch usage memory wage, VO
Statics and SL staterent performance.
Oracle DENS abo supports various thier)
performance monitoring tools hat provide
‘Whats DML? Explain all the SML command
Dm sands fo Data Manipulation Language. is
2 subset of SOL Gtrotwred Query Language)
delete and reveve data em database table,
SELECT The SELECT statement ured retreve
conaitens ame
SELECT ert name, ast name FROM employees
‘WsERe ceparment d= 10,
ronsof dato atablebaample
INSERT "INTO. employer emeyee i
‘VALUES (101, eho, Dee! 20),
UPaTe The VOOATE: statement Is uted to
acy ening data atabe ape:
:enploye id= 10, s
The DELETE aatementiuedo rernove
MESGE The MERGE ratementic uted to perform
row ii des not ent or vpaating CH does
best Brample
ON employee = 102
department = 40 -
lemplyee i fut.nane, st nae,
fepartmenie)
YALUES (102 Jane, Smo 0
fincton ame .
ALL my. storeeprocedret
ted te dspay the execution plan for» SOL
Sateen thot actualy erecting TNS can
alo" optmze the petiormance ofthe
EXeLAI PLAN FOR SELECT * FROM employees
WHE department Jd =20
Wat i swe? Wate an importance of
vienna databace ea virualablehaticbated
2 Saves qty that can be wed #5 2 bh
fbreqvent queer
encaputing them eto sale
fstoundestand ent Tas can improve De
feosaby and maining ty You aaaoase
Secu: Views canbe used t esti aces to
eran clans o tonsa tables et
‘bsractin vies provide a aye of abstraction
ove the underng tables. TAs means thet yu
Cinehangethe sructures thundering aber
Perfomance: Views" ean improve ety
perfomance by precomputing sna ering the
reead of running come aves
repeatealy
Ditalntegtye Views canbe used enforce data
integrity constants by ing he ears ot
roms bal ean bemodied tough he vie
Code Rewsabliy” Views can’ be wed to
fneapsuste commonly used queries, making
pplication
Explain the rol of database administrator.
LA atabase Adminsratr (OB plays cuca
Sem fon erganzaton Thee responsbiies
ince
to the onjanaatn’s fegurements and best
‘rganzations neegs, ensuring. effclency,
eset adda intent
Gatabate from Unauthorized access, ate
beaches and othe secarty test Thine
creypion
Baewup: and Recovery: They develop and
Iavrare ave natural dase or ther date
loeincert
meets periormance goals This nudes ting
{quis nae and ter atsbars obec
‘moniter the database system for performance
Tues ears and other ess that ay mpac
rebut
ASM sands for Automate storage Management,
Bradedstibaieses
(Capable of ASM nl:
the management of diabise storage by
abaracing the physial storage Gevices and
‘Automate Dik Reblancing: ASM automatically
tedtnbuter date scar al valle in 3
tptal perormance andrea
Niroring ane Striping ASM supports miroring
(Galo 1} ane sping (RAID 0} of eat Aes,
perormance
Metemati Fault Ostection ana Repair ASM
Felocating ato other det the dak group,
‘ering ita aatabily an ela
Wemloadharcensies improving
Derormance by reding contention and
eptimirng VO operons
\Wte DDL command for following
‘Change table product to productorg
fold of product org table valu of status
field should always (00, 04 ane 63)
Create backup able of ales
prodictors ,
hee status CHECK aus (0,21; 09
[CCREATE TABLE sales backup AS SELECT" FROM
‘aes
‘CONSTRAINT clause. Fer example, you have a
‘hece constran name creck sats on the
[ALTER TABLE producto SABLE CONSTRAINTWire the command to add new redo group
youcas we thefllowing SOL commana
IUGR DATABASE” ADD LOGFLE” GROUP
Sgrous_numbers fered log Al's!
“Gederjog eo) “ree, log le 39) SE
in command
, ,
rede fle3> ar the put tthe edo og
‘ze> sth siz of each edo fle.
Size 100m, you would se the followeg
pabvtoledoogs log) SE 100% 7
Trop a Tedo log OUR, you can use the
fetowng S01 carimana
eof number>s
Forerample a dapredolog group youwouls
component of AWR report
[Av AvtomaicWerllowsReposton reports
fallcion of performance saistes im Orde
The main components fn AR eprt incude
Snapshet Internation. Ths secton proves
‘he snapshot interval
Ontabare Statice There statites Include
the number af prea eags a wes, CPU
‘ne and pases
the databare instance sucha bur cache Nt
‘2 rary cae it aia eetonary cache
‘evens that consumed the mest database time,
Aetpng oer performance betlenecs
Sal Sites Ths vecton prove ntrmaton
bout he top SOL salerent bases on various
metic, sch a8 CPU tine butler gets, and ie
wee
Winat do you mean by parte! instance
recovery?
Real Applenion Chistes (RAC) that alos
ilps ietances to sutaneosly perferm
ash recovery on ferent pars of & singe
perfor crash recovery to bing the database
Bacto consent sate Ina RAC eneonment
sing poral processing which can sgneandy
reduce the orl recovery tne
‘ich group managed by aspecrc stance Exch
redo log ies. As each instance completes Is
recovery asks ean are pocesing set
the. pafemance and. sanity of recovery
‘operons nAC enonmens, where mule
Ses uliple stances poll Vetance
‘ecovrycon help reduce dvtine and mprove
nd delete statment of product able
Tocreate a wigger tha logs every update and
delete statement onthe product able you can
the the floning SOL cae
product update delete tigger
ITER UPDATE OR DELETE GN procuct
INSERT INTO product tog (aton_tyPe
peated it
VALUES (action, :oLD product
(OLD preducr-name. “OLD price, NEW price,
SsoRn
Thetnggee
FIER UPOATE OR DELETE ON product species
thatthe wigger should fre after an update ot
FOR EACH ROW species that he wiger should
be fed for each fon fete by the upeate or
Wine short not of followings:
2: Stop to creato backup device
Ident the Storage Lcaton Determine where
{you santo stare your baceup uch 982 8k
DIABASE command ath the TO clause to
speci the backup deve and cesta # ne
EACKUP DATABASE Adventurers TIS
‘Cakdventreork Oak WIN
EACKUP DATABASE Aaventrerks To DISK =
“Ciddventreorke bak
vert he Sock: Optonaly you can veil he
command
RESTORE VERFYONY FROM Usk
“Ciena
Manage Backup Retention: Regul review ad
manage your back fs tense they te
Dintemet Darbase Connector (B80) 6 2
Intret I provides secure ard eticent way to
cece databaee resource ‘om remote
Dooling to optinzeperfrmance an sey,
[Dict ae commonly ured web applestone
of oracle
Giferent Mes, process, and memory
The architecture of the Oracle Database
avagement sytem (305) canbe vide into
processes, and memory stucutes, Heres an
renew ofeach
database, dud tables, Indeves, and other
tbjct Data les ae organize nt tablespaces
bout the physical stulure of the database
char the data fle locations log fle
Grace Database Prceset: These processes
Inarage the operaton ofthe dxtabave stance
Including background proerrer leg. OB
LGW. CAPT ane sever proceses fe PON
SON and user processes
User Processes User processes ae crested for
handle SOL statement execution and dle
recieal
Memory stuctures
System Glabal fea (SGA): The SGA is 2 shared
remory region that contains data and cond
Infomation forte aatabare instance
Progam Global res PGA! The ?GA ica memory
Information foreach. indvdal server or
background process
het do you mean by oracle instance?
Explain about the aferont data stuctures
tised in SGA.
memory Arvtres md baciound proeset
that manage a single Oa database When +
databace Orc slcates memory and
penton,
The pte Global Ares (SG sthe memory are
that b wea by the stance to manage the
diabace,
fs. Wen user feguests dat, Oracle
‘heck the buter cache to see f the ith
ule wrthot having tore it tor ask
Fedo Log Bue: This cular burn the
ScAtathale rege entree
the brary acne and thecictonary cacne
that cannot be accommodated by the shared
pool
ed by Java appeatons running in the
dssabace,fecovery In acto database. Also explain
the diferent beckupe. and. recovery
process with example using RMAN and
amp uty
se exert processes to enue the aay
Set integty of eat Heres abet overs of
Sorte otros
sete
toner apy nye
‘Setanta he ae
Sage to ae ed
st ie eet
Bice peo a eo
pect as
Cage Bak ete og
Sig ea bt og cy
Sa end,
Ce ae eae ar
Senticopi'hang hy
eins tte ets
See ey ae aoa
way nh bcos
Soe gr coarse
we a rN ASN
Cause
coast ae ee
Trettne he abatir np,
Per ROE RAISE
Hine en
what Is synonym? why It Is important?
‘objec sich ar a table we sequence,
brocedure, or fencton. Synonyms provide =
‘une ofthe objet.
‘emp that pons tothe employees table TNS
(CREATESINONYH emp FOR employees:
Now you can query te employes table using
Simplfes Ques:
Reduces Dependency on Schema Name
move or fname objects without afecting
ependent code Seay acter Object,
Important? write the steps to Keep your
databate in archive lg made.
Database aenings the process of moving data
locaton, ten feed to san achive Arched
ats tr typlealy retained for historic or
cated or weed
Database achwving 1s Important fr several
Sue of your operational daabuse which an ead
tor cost savings In tems of storage and
Trequertly accessed data toa archive you
improve the perfermance sf yur operational
Complance and Legal Requrements: Many
Inaurtrerhave regulon that require dato Se
Hitorcl Anas Arcuved da canbe vaiabe
for hserieal analysis, tena analyst, and
‘To ep your database in archive log mode in
rake Database allow hese eps
AhabeseStecTlog.mode ROM veatabase:
Ife fog mode isnot ARCHIVELOG teh the
SHUTDOWN IIKEDIATE.
ALTER DATABASE ARCHWELOG
[ALTER DATABASE OPEN
SELECT lg. mode FROM vsestabae
10G_ARCHIVE_DEST_1=LOCATION= 10000,
|v. Rename the table mp to employ
insert rome rows and dlata one ofthe
‘record rom the ble omployee
Wi Create the logical backup of above table
using expe uty
‘i. Give sslect, update privilege fo another
ler User
VI ada department eld as forelgn key
‘oferencing the table dopartmont
1 mouify the name fd fo nerease tho
character length
X'Rename the name
to ename,
ere are the 5 commands forthe given ts:
{Gea the tablenared emp
‘CREATE TAALE emp
‘emp id NUMBER.
nameVARCHARS@)
sears VARCHAR,
ob OnE,
‘alr NuMBER
»
S.A primary ay inthe ep abe
AALIERTABLE emp ADO CONSTRAINT pep id
Pala KEV emp
Fish chee contains inthe sala ek
[ALIERTABLE emp ADD CONSTRAINT ch salary
‘CHECK Galary> 00D |
'w Rename the ale emp to employe:
[ALIEN TABLE emp RENAME TO employes
‘insert some rows and delete one ecrd fom
‘he able employee:
INSERT NTO employee femp_ihname, ares,
00s)
VAIVES fh, John Boe! 123. Maen
‘To_BaTer 990-0101; YOM. 15000
DELETEFROM employee WHERE emg. = 1
9. heate the lola bacup ofthe employee
{able csing expo tty
rede ‘emumelpssswordedatbase
Sirectoty=bactupadit
Gumpflesemployee-backup.dmp
tablememploee
i Give select uate privlege ro another ser
[GRANT SELECT UPDATE ON employee TO User
‘elerecig the ale depariment
IATIER TABLE employee ADD. deparment a
NaMaeR
ATER TABLE employee “ADD CONSTRAINT
Scdeoarimert id FOREIGN KEY
(deparinento) REFHENCES department
{department
a Modly the name Geld to Ietese the
‘aac length
ALIER “TABLE "employee MODIEY name
‘nacunatios
‘eRe the name eld to ene:
[ATER TABLE employe RENAME COLUMN name
Toenane,