NỘI DUNG MÔN HỌC Foxpro

  • View
    741

  • Download
    0

Embed Size (px)

Text of NỘI DUNG MÔN HỌC Foxpro

,NI DUNG MN HC Bao gm 2 phn Phn 1. H Qun tr CSDL FoxPro t s khi nim c bn c vi Fox ch ca s lnh Phn 2. Lp trnh FoxPro u bi ton c vi Fox ch lp trnh Generated by Foxit PDF Creator Foxit Software http://www.foxitsoftware.com For evaluation only.Bi ging H qun tr CSDL Fox Gio vin: Nguy PHN 1. H QUN TR CSDL FOX Ch-ng I. MT S KHI NIM C BN ...................... 5 I. C S D LIU V H QUN TR C S D LIU ............................ 5 I.1. Tin hc qun l ...................................................................................... 5 I.2. C s d liu .......................................................................................... 6 I.3. H qun tr CSDL Visual FoxPro 9.0 ..................................................... 6 II. CC KHI NIM C BN TRONG FOXPRO ...................................... 9 II.1. Cc kiu d liu c bn ....................................................................... 9 II.2. Hng v bin ..................................................................................... 11 II.3. Hm .................................................................................................. 12 II.4. Biu thc .......................................................................................... 12 II.5. Php gn ........................................................................................... 13 II.6. Lnh ................................................................................................. 13 III. FILE D LIU ....................................................................................... 14 III.1. H s ................................................................................................ 14 III.2. Bn d liu 2 chiu ........................................................................... 14 III.3. File d liu........................................................................................ 15 - 2

Ch-ng II. THAO TC VI FILE D LIU ................. 16 I. TO FILE C S D LIU ..................................................................... 16 I.1. To file c s d liu ........................................................................... 16 I.2. M v ng file c s d liu ............................................................... 18 II. LM VIC VI CU TRC FILE C S D LIU ........................... 19 II.1. Xem v in cu trc ............................................................................ 19 II.2. Sa cu trc ...................................................................................... 20 II.3. Trng c lp v khng c lp ...................................................... 21 Generated by Foxit PDF Creator Foxit Software http://www.foxitsoftware.com For evaluation only.Bi ging H qun tr CSDL Fox Gio vin: Nguyn Hoi Anh III. CP NHT D LIU CHO FILE C S D LIU ............................. 21 III.1. nh v con tr bn ghi ..................................................................... 21 III.2. Thm bn ghi .................................................................................... 24 III.3. Phm vi v iu kin trong cu lnh thao tc bn ghi ........................ 26 III.4. Xem v in d liu ............................................................................. 27 III.5. Sa d liu trn bn ghi .................................................................... 31 III.6. Xo bn ghi trong file c s d liu .................................................. 34 III.7. Thay th ni dung ca trng d liu ................................................ 36 III.8. Lnh Browse ..................................................................................... 37 IV. SP XP V TM KIM D LIU....................................................... 40 IV.1. Sp xp vt l ................................................................................... 40 IV.2. Sp xp logic .................................................................................... 42 IV.3. Tm kim tun t .............................................................................. 46 IV.4. Tm kim trc tip ............................................................................ 47 V. TNH TON V THNG K D LIU ............................................... 47 V.1. t lc cc bn ghi ........................................................................... 47 V.2. t lc cc trng ............................................................................. 48 - 3

V.3. m s bn ghi (Count) .................................................................... 49 V.4. Cng theo ct cc biu thc s (Sum) ............................................... 49 V.5. Tnh trung bnh cng (Average) ........................................................ 50 V.6. Tnh tng b phn (Total) ................................................................. 50 V.7. Thng k tng hp (Calculate) .......................................................... 52 Ch-ng III. LM VIC VI NHIU FILE CSDL ......... 53 I. VNG LM VIC - B DANH CA VNG LM VIC ........................ 53 I.1. Vng lm vic ...................................................................................... 53 I.2. B danh ................................................................................................ 55 II. TO MT FILE CSDL T MT FILE CSDL C .......................... 56 Generated by Foxit PDF Creator Foxit Software http://www.foxitsoftware.com For evaluation only.Bi ging H qun tr CSDL Fox Gio vin: Nguyn Hoi Anh II.1. To cu trc ...................................................................................... 56 II.2. To cu trc v a ni dung sang .................................................... 56 II.3. Kt ni 2 file CSDL .......................................................................... 57 II.4. Lnh UPDATE ................................................................................. 58 III. LIN KT CC FILE CSDL .................................................................. 60 III.1. t vn ......................................................................................... 60 III.2. Lin kt 1 chnh - 1 ph (1 - 1).......................................................... 60 III.3. Lin kt 1 chnh - n ph (1 - n).......................................................... 62 III.4. Lin kt mc xch ............................................................................. 63 Generated by Foxit PDF Creator Foxit Software http://www.foxitsoftware.com For evaluation only.Bi ging H qun tr CSDL Fox Gio vin: Nguy Ch-ng I. MT S KHI NIM C BN I. C S D LIU V H QUN TR C S D LIU I.1. Tin hc qun l - 5 - 4

Ni n tin hc ta khng th khng nhc n my tnh. My tnh l mt cng c tin hc nhng n khng th thay th cho con ngi. My tnh do con ngi ch to ra, v my tnh c th thc hin mt cng vic no , con ngi cn phi vit chng trnh cho n lm vic. Lc u my tnh sinh ra nhm mc ch gip con ngi gim nh cng vic tnh ton v tng tc tnh ton. Nhng hin nay vi s pht trin nhanh chng ca tin hc, n ang tng bc thm nhp vo rt nhiu lnh vc trong i sng x hi v my tnh khng ch n gin dng tnh ton m my tnh ch yu gip con ngi s dng thng tin, v ng dng ca tin hc nh my tnh ch yu 2 lnh vc c k thut: lin quan n tnh ton phc tp vi khi lng ln (chim 20%). V d. phn mm thng k, phn mm k ton, phn mm v qun s... n l x hi: tnh ton n gin nhng cc mi quan h li phc tp phi x l mt khi lng ln d liu (chim 80%). V d. phn mm qun l khch sn, qun l bn hng, qun l khu vui chi... Tin hc qun l l mt ngnh ng dng tin hc trong cng tc qun l. Bi ton qun l gm cc c trng sau l mt khi lng d liu kh ln, lun bin i v c cp nht thng xuyn. c cp nht thng c t chc theo nhng khun mu nht nh gi l cu trc d liu. Cc mu ny c thit k sao cho ph hp vi cc yu cu x l khc nhau. V d o Mu Ho n thu chi qun l ti chnh, o Mu phiu xut, nhp kho qun l hng trong kho, o Mu h s cn b qun l cn b... phn loi cc bi ton qun l theo tng lnh vc chung. V d o Qun l kho thnh phm ca cng ty bnh ko Hi H

Generated by Foxit PDF Creator Foxit Software http://www.foxitsoftware.com For evaluation only.Bi ging H qun tr CSDL Fox Gio vin: Nguyn Hoi Anh o Qun l kho thnh phm ca x nghip in c Thng Nht n l kho. o Qun l mua bn hng ti mt ca hng vn phng phm o Qun l mua bn hng ti mt quy sch n l bn hng. Bi v v mt nghip v chng c nhng im tng ng vi nhau. t qu x l thng tin trong bi ton qun l thng a ra theo dng mu biu. Khi qun l v x l thng tin phi m bo 4 mc tiu y t qun o mt - 6

V phi bo m cc thao tc c bn i vi h s i tng qun l o To lp (Create) o Cp nht: update, delete, change. o Sp xp (sort) o Tm kim (find, seek) o Lc (filter) o Tnh ton: cng (count), tng (sum), trung bnh (average)... o Bo co (report) I.2. C s d liu C s d liu l mt tp hp d liu ca mt t chc c lu tr trong my tnh, c nhiu ngi s dng v vic thc hin n c chi phi bng mt m hnh d liu.

Ch : Mt c s d liu khc mt ngn hng d liu v c s d liu l d liu c t chc c cu trc gip cho vic thc hin mt cch thun li, thao tc c bn thun tin. I.3. H qun tr CSDL Visual FoxPro 9.0 u tin ta ni n mi quan h gia Databate, Management, System. Hot ng qun l thng phi x l mt khi lng ln thng tin v thng yu cu phi nhanh, chnh xc nn i hi phi c tin hc ho. Tin hc Generated by Foxit PDF Creator Foxit Software http://www.foxitsoftware.com For evaluation only.Bi ging H qun tr CSDL Fox Gio vin: Nguy ho cng tc qun l l mt i ng hng, trong cng c chnh ca vic tin hc ho l cc phn mm hng vo cng tc qun l. Tc l nhng phn mm ny phi tr gip cho con ngi 4 mc tiu v 7 thao tc c bn nu. Nhng phn mm nh vy c gi l cc H qun tr C s d liu. C rt nhiu H qun tr c s d liu nh FoxPro, Access, Oracle, DB2... FoxPro = Fox Professional. Trong mn hc s gii thiu phin bn Visual FoxPro 9. Ci t FoxPro for Windows Chy file setup.exe v chn la ch ci t t y t tng thnh phn t ti thiu chy. Vo/ra FoxPro khi ng FoxPro di chuyn chut Start/Programs/Microsoft Visual FoxPro 9.0. Sau khi khi ng, mn hnh lm vic ca FoxPro xut hin. Khi thot khi FoxPro ta c 2 cch i ca s lnh dng lnh Quit. - 7

o n phm F10 o Chn bng chn File o Chn mc Exit Cng c th thc hin bng cch chn phm nng n Alt + F, n phm X. Hai ch lm vic trong Visual Fox Cng ging cc phin bn khc, Visual Fox cng lm vic hai ch : ch hi thoi (ca s lnh) v ch chng trnh (lp tr

Search related