OPERATING SYSTEM
UT
jus:
goL ‘Plus is made up of two distinct parts,
are
(1) interactive SQL : Interactive SQL is
ed to create, ACCESS and maintain all data
tables, indexes etc. It can also
jon. It is
96V Oddo
TL9L 80 OV E707
ptures ike
d for interactive, data manip
ed in detail in the next section
(2) PLISQL : Programmers can use PLY
to create programs for validation and
fipulation of table data. PL/SQL adds to the
er of interactive SQL, and provides the user
all the facilities of a standard, modern day
programming environment. Itis explaned
Forms:
is tool allows us to create a data entry
along with suitable menu objects. Thus
Oracle Forms Tool, that handles data
ng and data validationin a commercial
ion.
anu auie vata
Fig. 2. Working with the Oracle DBA.
\sav‘Pius :) .=
SQL *Plus @ fate ort & rece art, StH
Ware:
(1) Sefea SQL : HiRes SOL Bh ta er
‘98 dace, fa ga a Gee, waa sh Bs (wa
‘ema ) 2508 fare sags Pee rar 8 | gear oer eee
(Sera area Ses) atk Saenger (weTAT) * fre
sh a aaa? |g oe Saar Hi fea sare TT EY
(2) PLISQL = emma PLISQL #1 FIM eae
22 } afeean (were) sik ge (wetrT) % fee
‘Sram fanz ad ax aa & | PLISQL rat wa gate
SQL Surat ftentia axar 8 ait aaa saree (AGL)
Sesto arama eosd A ah geod Has eT
“Aye toa an Beara cae Ta
aitemcr are:
ae i ei ow Ba eA GA & aT TTT A,
_aearaen Bae HAA Sa ATS | TET AR SS
care za 8, oh oc ata wee er ef ST
Sa ateten a Beat ear!ETION. were 1
Different Keys \fas Key) 2
cy means the special attribute by which KEY em Feira ene a vigor dn & | eel
identify or relate the other attributes. qqq @ ay aq wie a year aI aig waa ze |
‘can be categorized like these = KEYS @) au for van & aviiga ax waa @ :
‘an attribute (or combination of attributes),
sriquely identifies each row in a relation. It fxg
Fe}
eI
ey
=
=
Na
Sg
S
&
OPPO A96
i20
In STUDENT TABLE every student has a
unique RN (ROLL NO.), thats why BN is
considered as a Primary Key.
(2) Foreign Key
An attribute in a relation of a database that
serves as the primary key of another relation in
the same database. It is also called reference
key because it establishes the relation between
the tables. Repeatition and null value both are
permisible in foreign key.
Ora,
aé) STUDENT TABLE 4 Wers BA Hy
(are 4.) cated re ater RN I 4 Brae,
yeaa eel
(2) waits at
ua @ Sarre & um fei a1 ae ufgep
stadt Serta & a7 feere & fort array
at ard ati @8 foetal ot wed €) wy
ae dt aay th ata free enfie Beat 1 HT
‘at H geerafa a ar Aey HT STAT HAF
Example : SaTETTT :
Foreign Key
CLASS TABLE
Primary—PEN RN NAME | CLASS ‘SUBJECT
Key 1004 401 RAM McM COMPUTER
1002 102 HARI MCM COMPUTER
1003 403 SITA MCA COMPUTER
STUDENT TABLE and CLASS TABLE both
have the attribute (field) RN. In STUDENT TABLE
it is considered as a primary key but in CLASS
TABLE it is considered as a Foreign Key, It is a
common field (with same data type and other
parameters but-not name) by which we can
establish the relationship between these two.
tables.
(3) Composite Key
A primary key that consists of more than
one attribute is called composite key.
(4) Super Key
It is another name for primary key and
composite Key.
(5) Candidate Key
Every attributes or every combination of
attributes, that uniquely identifies a row in a
relation. Among all the candidate keys we choose
any one as a primary key.
STUDENT TABLE 4 CLASS TABLE
a -ufzeqe (fires) RN@ 1 STUDENT TABLE
#
lll
1»)
Q Search.10:24 am ie Ful! 44%
x & www.tutorialinhindi.com <
Fert STS, afer A rete Reais at oH
orfgeita Soh {RI SIA GI Heat B, Git
Uh Hie OT IAA aT Ae V1 sa Holt F att
art & fre van aifadta colt cht sragacrar
atch 21 sfacta soll A chact ver ger A at
ward @, Tater wrafte chott F arg oft val et
aad él
Var safe @ atte ve afore A haat ua
mrefics hott et aenct @1 ctfenar anferent A up
a afd afadta art (unique value) et
aad él
Jealexr ch ferg, UH country arfercar WR
fora ane fore @ thtes at:
¢ Country ID
¢ Country Name
¢ ISO Code
Country Country Iso
ID Name Code
+91 India IND
Q Search ® = @10:24 am ie Ful! 44%
x €& www.tutorialinhindi.com <
Country Country Iso
ID Name Code
+91 India IND
+1 United States | USA
+880 Bangladesh BGD
+977 Nepal NPL
Example of Unique key in DBMS
x K wv
+1 United States USA
+880 Bangladesh BGD
+977 Nepal NPL
ae
ww tutoriainhind com
UNIQUE KEY IN DBMS
Country ID miata dott st aac @!
ISO Code sua sifedta apa St aera
8, Sk Ua arfatta (unique) soft ett
Bieiifes, Star fer SAR Ure Vet S et VE
trefics hott @, eH se apres Ht orate
colt of aét sat Gerd Ge Us unique key
Bander
Q Search ® = @10:26 am Ful @ 44%
x @ ehindistudy.com <
@
nw
Types of constraints:- Wed table 4 Set
at insert met & Ferg Hw business rules
id 1 @ business rules, data
constraints Heed é!
DBMS 4 constraints Prfefaa wear
adel
a
1:-NOT NULL constraints:- 3a
constraints 1 Wart ag frat sta @ GT
feet column ot Greil aT waa Bt! NOT
NULL constraints Y& column at value
cat null @4 @ tena @1 ota feet column 4
34 constraints or Fah fehar viral € dt sa
captcta at null az] provide et