You are on page 1of 17

DeA STRUCTUAES

’ ar INTRODUCTICN
Juroduclion
æ) Qala values sets values
rfers to a ige unit
2) ata ilem relers values
’ bata ilems tat ale divided into ub ilems ae called
qroup itemy tse thal ae not called denenlary
ilems
mame may be diided inta rsl name
Enlaye'
idle name
s Cnd e laal name

-’ Colleclion dala
dala ue teguety organized into a
Tecords audl
Cuol ielda
that has cerlain allribules or
oicl mmay bi asiynd valuts The values may be
ei the númeril oy mon numerc

Aaibulu Name RollNo. Mats


Values Ac
Erlties wit si mila al ibules form an entity sel
Çask aliibude an enitly sel has a
Taye o valuts
Unit CLn

olibule
Record t's colleelion ield valu4
(V) file
ilo!
Reeords maymay be elassitid
) fixed length Recovds
Records

aLtords all the reco rela eonlain ame


dala uniks tth the 'same am unl spaee asig ned to ac
item 3u vai able cnain di

# The organizalion of daia nlo ielda, reeordo and fils may


mainlen

eeulain coll eoliona o daa for this dala aue also


organized into
ino more sruclures
The siudy ot sue dlaia ciruclares, udih jorms the subjeol maller
indudes the three
oY mathemalial descipion the shucure
’ digemenalion og the elruclure
’ Quani(afive analy sis thA shruclure thal de thL
lore the erucure aud
.Memory meeded lo Hime required
be
he
or
oganíz d in (9)
nlicalL moto!
talled a dala seuclue
The choice. dala
consideraliona palicula dan modet.
o máror the ist it he tib
aalval velalionsp e Ite
othe lavd Whhe kala in he
thal drurluce housd
þuots te dola n nuay
+ ARRAYS
(0) The
linac or onedimiioral

(2) anar a
imilar dola elerurs
Ael

then limee A ar denoled


) Cn.

A), A(2), A3) A()

AD1, A], A[3] A[N]

tue the numbey K in A[K] s called


A] callec the Aubsoaplud Vauable

Q- imenaiorsl arr a cotlolion o imilar dala umds


arny
4 ened by dioo subzciple.
malicee
9
$tore
s

1000

Saleu ,3]:
salu

fows hoie onal lines


Vateal lines
(
mode À cohnecld to he myt mode
Lake

)\Cuslomeu Calespev:on
Cnih he dala here is slored in
Adams Jary columns
Ray table
Clak Jonea
DA
vans Smiill
famee Jones
Getlee
Kay
mitl

Kay
Another lhe dala i to lave "parale.
)
chy (olda poinia)
h saleapenan
arinythefor cuolomeu whicl
localion
in
Cusí orrner's salapeion
lusloe Tolale
absperon
Adams Jones
Blouon
Clauk Ray
Smith
fyans 3

faumu
2
byelle he localion he cop olipoon
3
An use a a
-lhan name htnee it save
Ap ac
Apace
lusttet'.
’ Suppese the Would love
the lulire cslomu file
then
Aached

he Ceuslomers
þoustiok of
Panle
The min discdyontegLeoeltais
Hal
Loshersm Tepiesewi al ion is
Jones 3, G Lalupuson may lae many prids
4,4, 3, 9 þirdees ill
&nith

to or te dasa is thisd
iv) Anatne vey heclie t te
inted lials The ialuptson kos
|si Cusionw, whoe poinler in lun painds to te 2id bis'oMu
ithh the salspevson's last Cuslome indicaled by O
Cuslome link
Adams Poide
Biown
Jones
llark 2

Rmith
vans

FaL
9
nates
(BinzeyTre)
aast in tist tut
a
sei avd delefos can Take place iy

Fisi in hst Qu.


Kineai el in siel delelins can lake pleet chy
al one tn e
te list
take slac onsy

hierachcal in aue

te nodes veulices
Dala Avuelure bpualins

’ lontig
ime ipae Trade
) Agoitom ds a wdl
2) The time and space it ULea
u e to t
te

3) The
the runay tine' oY
funclion kik
in lumi -822
alre in stuc.etsiy

bound
called
he logesl index
louna botnd .
l8 he innille 6 in.deN called

record
(jtn automaile enny ees an avray AUTO t
the n0 aulomodles 'sold' cach yea 193Q 1984

1984 - 1930 +|
: 55.

Avro coniains 35 demenls .

Kepreanaiion Kincau ray in Memory

The elementa an

artay ae sl Yed in

|003 Suce essie


cells
the addre
Thee's uo need tbb kep the track g
but nd to tr
{very elemenl in an array des
the array
addral the edement
ae address LA
e B
by Base (LA)
shue LA / the lineay rray
(K- owee
J Bound
Bae (lA) + w
2oc (LA EKJ)
shee wie tae no wode peu memoy llfer
LA.

-L8)
s Bae (wTo) t w( K
0+ 4 1965 - 1932)
332

Mulidinnsional Arays
Aomelinu called malrix
’ fw0 dintnaioral arra
artay

T0o- imenioal Arrays in Memory


Kepresnlalion 5)
ue alosed eithe by

un Mgjor- louinn by coumn


Koo by Kow
$,2, 3,4,
S, 6,7,
1°,", ,

Ro Hajor
234s6|as o

7|| 482
1s9 6

( ) w[N (3-) +
Baue
Loc (AL T K))
koc Maa
bshere w[w(K-)
Base(4) +
Loc (A (7,K)
+( )
25X 4 Malix array Sc
ORE ’

Base ( Reote) 00 call.


add seove l12,3

· J®t4[4 (1a-) +6-))


’ lxaae[3,31) 38.
4) .

b) gpese Baie tAam) [er

(cc)
Nefe L8 not

b)
LOc (AtA[K) Base (Ann) wlK-LA)

dince 65

(xeeeds
A(-i )

A d&./

lecabat
Asi
a)

Je dime ndime

he di)e naùnd B ae:- LI 8-1+| 8


L2 5- (s)+|: }1
L3 5-(-1o) +| - I6
6 has &x|X16 elemenls 1468 elimeule

b) The f colie index ei Ki- L6

E3 3-(-1o) 13
colema
£al : 13 Xl= 43
Addres ol
9.
.30

(El E;) (3 30 X/6

loe (B [3, 3,3)) - to0 -+ (y92)


Lyoo YX493

2342

for a

KN]) -
Baue(C) +wl(En Lut)Lw)+
)

) Bau (c)t wll ((Eilz +f)y+ s)ly


Maiuie

Mus wh a
sld epare marices.
Two malrice ae
n- sqae sparse
1) Lianglan malrix
i) Tidiayonal malrix
Maleix AU the enries aboue the main diagoral
eue 2ero Or Khue non 2er0 enliea canr
On
belo he ain

35

3
5 -2

X X

Soueu Tiangulau Malix Malax


Tidi ogonal Malrix
on th.

dbave or balao te dingonl


malrix

-3
1 3
-3 G
4 -+
-)
-S

2-1

Velor Reptnlalion
d-D array
non zero elemeul in awit
can be ept esenecl tie the
Jonat
colmn cubscápl value)

Coumn Value
Ron
2

2 2

5 4
2
2 3
2
MATRIX
2
-3
2 MULTIL)CATIDN
D-2+6
||-Dt3
o+3-2

-3 +0 +2 -6tlto/

i<3 i++)
for (izo .
j<s; j++) ’ dumns
for (j=o,
Column 1sTmafnx

for (ko, k<3: ktt)


)

c[)lj+= mati [Uk]+ mat


aud addiho

You might also like