Field type

download Field type

of 36

Transcript of Field type

  • 7/23/2019 Field type

    1/36

    SYNON Day 2

    Agenda

    1. Field Types

    2. Field conditions

    3. Field Usage

    4. Access Path

    . Select!O"it c#ite#ia

    $. %i#t&al Fields

    '. (ands on ) *#eating +elds and Access Paths

  • 7/23/2019 Field type

    2/36

    Part 1 -Reference Material

  • 7/23/2019 Field type

    3/36

    Field Types

    Field has a Na"e and a Field Type

    *lassi+cation depends on the type o,-al&es

    #oadly classi+ed as alphan&"e#ic/n&"e#ic 0 special +eld types

  • 7/23/2019 Field type

    4/36

    Field Type Name Description Type Length Example

    *D *ode A $ Stoc *ode

    DT Date P '/ Date o, i#th

    56* 5deg#aphic te7t A 2 8an9i na"eNA: Na##ati-e te7t A 3 *o""ents

    N: N&"e# P . ; o, e"ployees

    P*T Pe#centage P .2 P#o+t "a#gin

    P:* P#ice o# ta#i< P '.2 Unit P#ice

    =TY =&antity P . Stoc >&antity

    :F :e,e#ence ) ) Field ased onanothe#

    S6T S#ogate P '. Syste" 8ey

    STS Stat&s A 1 Yes!No

    T? Ti"e P $. *hange Ti"e

    T@T Desc#ipti-e na"e A 2 P#od&ct na"e%A ?oneta#y -al&e P 11.2Stoc -al&e

    %N? %alid syste" na"e A 1 File na"e

  • 7/23/2019 Field type

    5/36

    TBo typesC Dataase +elds and F&nction+elds

    Dataase +elds *ode *DE +eldsC) &sed ,o# ey +elds e.g.

    *o"pany *ode

    Data att#i&te AT:E +eldsC &sed ,o# non)ey +elds e.g. *o"pany Na"e

    Field Usage

  • 7/23/2019 Field type

    6/36

    F&nction +eldsThese a#e &sed only in DTT:N/ DSPT:N/ P:TF5 and

    P:TO ,&nctions

    They alloB ,o# co""on a#ith"etic ope#ations on a s&+leo, #eco#ds in a t#ansaction/ o# a g#o&p o, #eco#ds in a#epo#tGs ey le-el

    SU? ) S&""ing a +eld -al&e th#o&gho&t a s&+le

    *NT ) *o&nting the #eco#ds in the s&+le

    ?A@ ) :etning the "a7i"&" -al&e o, a +eld in thes&+le

    ?5N ) :etning the ?ini"&" -al&e o, a +eld in thes&+le

    D:% *ontain any a"o&nt o, p#ocessing. Pa#a"ete#s "aye speci+ed. The #es&lt o, the &se#)de+ned calc&lation/ o#p#ocessing

    US: ) O

  • 7/23/2019 Field type

    7/36

    Field *onditions

    Speci+es the -al&es o# set o, -al&es a +eld "ay tae

    *ondition has a Na"e/ a type and an associated -al&e

    The tBo sets o, condition types/ %A and ST ,o# STS+elds/ and *?P and :N6 ,o# othe# +eld types/ can e

    &sed in ,o p#i"a#y BaysC1.al!e "#L$ %ondition Used to speci,y single -al&es that stat&s +eld can tae

    tBo #elated -al&esC

    inte#nal -al&e ) -al&e in the i"ple"ented dataasee7te#nal -al&e ) -al&e displayed!ente#ed on thesc#een

  • 7/23/2019 Field type

    8/36

    &. List "L'T$ %ondition

    Used to speci,y list o, -al&es that stat&s

    +eld can tae Sc#een ,&nctions i"ple"ent p#o"pt ey

    F4E

    (. %ompare "%MP$ %ondition

    De+ned in te#"s o, a +7ed -al&e and anope#ato#

    %alid ope#ato#sC H=/ HN/ H6T/ HT/ H6/ H

    ). Range "RN*$ %ondition

    De+nes #ange o, -al&es that +eld can tae

    De+ned in te#"s o, F#o" and To -al&es

  • 7/23/2019 Field type

    9/36

    Access Path

    An access path de+nes the physical +le and!o# the logical-ieBs o, that +le

    The o#de# in Bhich yo& Bant to #et#ie-e #eco#ds ,#o" a+le.

    Ihich +elds Bill e p#esent J

    Yo select!o"it c#ite#ia ,o# deciding Bhich #eco#ds ,#o"the +le Bill e #et#ie-ed y the access path.

    'ix types of #ccess Paths

    Physical P(YE

    Update UPDE:et#ie-al :T%E

    :ese>&ence :S=E

    =&e#y =:YE

    Span SPNE

  • 7/23/2019 Field type

    10/36

    Physical (PHY) Access PathSingle ,o#"at +le containing +elds de#i-ed ,#o"#esol&tion o, all #elations on the +le.Not eyed.No -i#t&al +elds.*#eated a&to"atically ,o# e-e#y :F!*PT +le.Not #e,e#enced di#ectly y ,&nctions.No additional P(Y access paths alloBed ,o# a +le.

  • 7/23/2019 Field type

    11/36

    Update (UPD) Access Path

    Uni>&ely eyed/ single ,o#"at access path Bhichis &sed y ,&nctions ,o# &pdating dataase.

    8eyed on the +elds that identi,y the +le.

    No %i#t&al +elds.

    *#eated a&to"atically ,o# e-e#y :F!*PT +le.

    Additional UPD access paths "ay e c#eated Biththe sa"e ey &t s&set o, +elds.

  • 7/23/2019 Field type

    12/36

    Retrieval (RTV) Access Path

    Uni>&ely eyed/ single ,o#"at access path &sedy ,&nctions to #et#ie-e #eco#ds.

    8eyed e7actly as the UPD access path.

    AlloBs -i#t&al +elds.

    *#eated a&to"atically ,o# e-e#y :F!*PT +le. Associated Bith the UPD access path.

    Non)ey +elds can e d#opped.

    *an select!o"it #eco#ds.

    Possile to de+ne "&ltiple :T% access paths ,o# agi-en +le/ &t all sho&ld ha-e sa"e ey +elds.

  • 7/23/2019 Field type

    13/36

    Resequence (RSQ) Access Path

    Uni>&ely o# non)&ni>&ely eyed single ,o#"at

    access path &sed y ,&nctions to #et#ie-e #eco#ds. ?&st e c#eated e7plicitly.

    De,a&lts to the eys o, the ased on +le.

    AlloBs de,a&lt eys to e changed Bhich need not

    e &ni>&e. AlloBs -i#t&al +elds.

    Associated Bith :T%/ Bhich points to a UPD.

    ?any :S= access paths possile ,o# single +le.

  • 7/23/2019 Field type

    14/36

    Query (QRY) Access Path

    8eyed single ,o#"at access path &sed y,&nctions to #et#ie-e #eco#ds.

    ?&st e c#eated e7plicitly. Display File/ Select :eco#d/ :et#ie-e O9ect/ P#int

    O9ect/ and P#int File

    AlloBs -i#t&al +elds on ey 0 non)ey +elds.

    A-ailale only ,o# P#int O9ect!P#int File ,&nctions.

    De,a&lts to the eys o, the ased on +le.

    AlloBs de,a&lt eys to e changed.

    Associated Bith :T%/ Bhich points to a UPD

    ?any =:Y access paths possile ,o# single +le

    5"ple"ented y OPN=:YF o# Dyna"ic S=

  • 7/23/2019 Field type

    15/36

    Span (SPN) Access Path

    A SPN access path can only e speci+ed o-e# +les BithOBned y o# :e,e#s to #elationships

    A SPN access path "&st e c#eated o-e# an oBning o##e,e##ed to +le

    P#ess FK on dit Access Path Details panel to +#stselect the p#i"a#y ,o#"at and then the seconda#y

    ,o#"at 8eyed "&lti),o#"at access path

    Used y dit 0 Display t#ansaction ,&nctions to#et#ie-e #eco#ds ,#o" a pai# o, #elated +les

    ?&st e c#eated e7plicitly

    Used ,o# the t#ansaction)type ent#y ,&nctions DTT:Nand DSPT:N

    These eys can e changed

    AlloBs -i#t&al +elds

    Associated Bith :T%/ Bhich points to a UPD

  • 7/23/2019 Field type

    16/36

    P#esent a s&set o, the #eco#ds ,#o" the physical+le

    5, "o#e than 1 set is &sed/ the GSe>G +eld can e&sed to speci,y the o#de# in Bhich the checs a#e

    ca##ied o&t/ and the lines a#e logically LO:M dtogethe#C

    The +eld and conditions na"es "ay e selected&sing the GJG p#o"pt.

    5, "o#e than one condition is ente#ed on thissc#een/ they a#e logically LANDedM togethe# e,o#eincl&ding a #eco#d ,o# selection.

    Select!O"it

  • 7/23/2019 Field type

    17/36

    %i#t&al Fields

    Ihen a +le is #e,e#enced y anothe# +le y"eans o, a :e,e#s to #elation/ ent#ies a#ea&to"atically c#eated on the #e,e#encing

    +le ,o# the ey +elds o, the #e,e#enced +le. To incl&de a non)ey +eld ,#o" the

    #e,e#enced +le in the #e,e#encing +le/ yo&need to speci,y it as a -i#t&al +eld. This

    "aes the +eld a-ailale ,o# &se in the,&nctions that ope#ate &pon the#e,e#encing +le.

  • 7/23/2019 Field type

    18/36

    Pa#t 2 (ands on

  • 7/23/2019 Field type

    19/36

    %reate ne+ ,elds in the model and edit the defa!ltlength of the ,eld

  • 7/23/2019 Field type

    20/36

  • 7/23/2019 Field type

    21/36

    6o to dit +eld details y taing LM against the+eld.

  • 7/23/2019 Field type

    22/36

    Add +eld conditions. Fo# (o#se gende# add the,olloBing tBo -al&es

  • 7/23/2019 Field type

    23/36

    Yo& can type in the %hec condition ,eld/ to 0ie+ a selectionlist of existing conditions from Edit ,eld Details screen'elect #ll 0al!es from the screen.

    N t th t P t , ti + ld di l A lt

  • 7/23/2019 Field type

    24/36

    Note that a P#o"pt ,&nction +eld noB displays. As a #es&lt/Bhen the end &se# o, the co"piled application positions thecso# on the (o#se gende# +eld and eithe# ente#s orpresses F)/ a selection list of the conditions yo!de,ned +ill 2e displayed.

  • 7/23/2019 Field type

    25/36

    %reate a RT #ccess path

    Type against one o, the #elations ,o# the (o#se +le and add the ,olloBing

    #et#ie-al inde7

  • 7/23/2019 Field type

    26/36

    Tae LM against the Access Path to edit thepa#a"ete# o, Access Path

    %reate 'elect34mit criteria

  • 7/23/2019 Field type

    27/36

    %reate 'elect34mit criteria

    Type D in the AlloB select!o"it +eld to select Dyna"icOS!4 selection and type S in the S&+le selecto# to de+nethe select!o"it c#ite#ia.

  • 7/23/2019 Field type

    28/36

    Type / S/ and the desc#iption o, the select!o"it set.

  • 7/23/2019 Field type

    29/36

    (o#se gende# in the Field col&"n to speci,y the +eld onBhich the condition is to e ased.?a#e in the condition col&"n to indicate the -al&e the (o#segende# +eld "&st contain ,o# the #eco#d to e selected.

  • 7/23/2019 Field type

    30/36

    Speci,y a Select c#ite#ia ,o# the Stallions AccessPath

  • 7/23/2019 Field type

    31/36

    Speci,y the ,olloBing c#ite#ia

  • 7/23/2019 Field type

    32/36

    5ncl&de Fo# Te7t in the #elationship y taing QMagainst the #elationship5ncl&de %i#t&al +elds in the :e,e#s To #elationship as,olloBs.

  • 7/23/2019 Field type

    33/36

    Type LQM against the +elds Bhich ha-e to e-i#t&aliRed and p#ess ente# to con+#".:epeat the sa"e ,o# the othe# :e,e#s To #elationship

  • 7/23/2019 Field type

    34/36

    NoB tae against the +le #elationship to displaythe dit File nt#ies panel

  • 7/23/2019 Field type

    35/36

    Note that the -i#t&al +elds yo& 9&st speci+ed a#eincl&ded as indicated y a % in the nt#y type tEcol&"n.

  • 7/23/2019 Field type

    36/36

    Than Yo&