CH-2 INTRODUCTION TO TABLES ifjp;% Table; database dh vk/kkjHkwr laxzg.k bZdkbZ gksrh gSA tgkWa MsVk dks Vscy q j #i esa vFkkZr iWfDr o dkWye ds #i esa j[kk tkrk gSA fdlh Hkh MsVkcsl esa ,d ;k ,d ls vf/kd Vscyl~ gks ldrh gSA rFkk ;s lHkh varZlacf/kr gksrh gSA fdlh Hkh Vscy dks fMtkbu djusa ds fuEufyf[kr pj.k gksrsa gS%& Vscy ds QhYMl~ dk p;u djukA izR;sd QhYM ds MsVk VkbZi dk p;u djukA QhYM dh lkbZt dks fu/kkZfjr djukA izfrca/kksa dks ykxw djukA MS-Access esa Vscy cukusa ds 3 rjhds gksrsa gS%& 1. fMtkbu O;w esa Vscy cukukA (Creating table in design view) 2. fotkMZ }kjk Vscy cukukA (Creating table through wizard) 3. MsVk ,UVj djds Vscy cukukA (Create table by entering data)
(1) Create table in design view fMtkbZu O;w ls rkRi;Z ml O;w ls gS]ftlesa Vscy dk fuekZ.k djrsa le; ;wtj }kjk Vscy ds fQYMl~] MsVk VkbZil~ o mldh leLr izksiVhZt dks fu/kkZfjr fd;k tkrk gSA o mlesa MsVk ,sUVj djusa ls igys lHkh checks o constraints dks fu/kkZfjr fd;k tk ldrk gSA fMtkbZu O;w esa Vscy cukusa ds fy, fuEu pj.kksa dks dke esa fy;k tkrk gS%& loZizFke ,d blank database dk fuekZ.k fd;k tk,sxkA mlds ckn miyC/k MsVkcsl fo.Mksa esa ls Table tab ij click djsaxsaA ;gkW gekjs lkeusa rhu fodYi miyC/k gksxsa %& 1. Create table in design view. 2. Create table using wizard.
3. Create table by entering data. bu fodYiksa esa ls ge izFke fodYi dks pqu ysaxsaA blls Vscy dk fMtkbZu
O;w miyC/k gksxkA
miyC/k fo.Mks ds nks Hkkx gksrsa gS%& • Vscy ds QhYM] MsVk VkbZi dks ,sUVj djusa ls lacf/kr HkkxA • Vscy ds QhYMl~ dh izksiVhZt dks fu/kkZfjr djusa ls lacf/kr HkkxA vc gesa ftl Hkh Vscy dks cukuk gS mlls lacf/kr lkjs QhYMl~ o MsVk VkbZil~ dks fu/kkZfjr djsaxsaA tSls ;fn gesa student ds fjdkMZ dks iznZf’kr djusa ls lacf/kr Vscy cukuh gS] rks lcls igys QhYM use okys Hkkx esa RollNo dks VkbZi djsaxsa] fQj Vsc nck dj ;k ekml }kjk fDyd djds mlds MsVk VkbZi dks fu/kkZfjr djsaxsaA blds ckn ge vU; QhYMl~ dks ,sUVj djsaxsaA ;fn fdlh QhYM dh izksiVhZt dks Hkh fu/kkZfjr djuk gks rks ml QhYM dks lysDV djds mldh QhYM izksiVhZ okys Hkkx esa mlds fy, QhYM osfyMs’ku] buiqV ekLd] o bUMsDl tSlh izksiVhZl~ dks r; fd;k tk ldrk gSA bu lHkh dk fu/kkZj.k dj ysusa ds ckn fdlh Hkh QhYM dks lysDV djds mls izkbZejh dh cuk nsxsA vc LVS.MZM Vwy ckj esa ls lso cVu ij fDyd dj nsxsA bl izdkj ls ,d Vscy dk fuEkkZ.k gks tk,sxkA
fotkMZ }kjk Vscy cukuk Vscy dk fuekZ.k djusa dh ;g lcls ljy fof/k gksrh gS] bldh lgk;rk ls iwoZ fufeZr fodYiksa dk p;u djds ,d Vscy dk fuekZ.k fd;k tk ldrk gSA fotkMZ }kjk Vscy cukusa ds fuEu pj.k gS%& loZizFke ge Ms-Access dks vkjaHk djsxsa] mlds ckn MsVkcsl fo.Mksa esa ls Vscy Vsc dks lysDV djsaxsaA ;gkW gekjs lkeusa rhu fodYi vk,sxsaA Create table in design view. Create table using wizard. Create table by entering daya. blesa ls ge “Create table using wizard” fodYi dk p;u dj ysxsa] ftlls Vscy fotkMZ [kqy tk,sxkA
blds Ik’pkr gessa fotkMZ esa ls Vsscy dh dsVsxjh dk p;u djuk gksrk gS]tks business ;k Personal esa ls dksbZ gks ldrk gSA Vscy ds VkbZi dk p;u djusa ds ckn Sample tables okys Hkkx esa ls fdlh sample table dks pqu fy;k tk,sxkA
Sample table dk p;u djusa ls sample fields okysa area esa sample fields dh ,d fyLV [kqy tk,sxhA mlesa ls ge fdlh Hkh sample field dks select djds gekjh u;h Vscy ds fy, pqu ldrsa gSA blds ckn Next button ij click dj fn;k tk,sxkA ftlesa Vscy dk uke nsdj izkbZejh dh dks lsV dj fn;k tk,sxkA
izkbZejh dh dks set djus ds ckn Next button ij click dj fn;k tk,sxk] ftlls vxys screen esa Table relationship dk fu/kkZj.k djusa dk fodYi miyC/k gksxkA ;gkWa Tables ds e/; Relationship dks fu/kkZfjr dj fn;k tk,sxkA blds Ik’pkr ,d Mk;Wykx ckWDl miyC/k gksxk] ftlesa Vscy ds fMtkbZu esa ifjorZu djusa ;k mlesa directly data enter djusa ls lacf/kr fodYi vk,sxsaA blds Ik’pkr ge Finish button ij click dj nsxsaA
(3) Create table by entering data) ;g Vscy cukusa dk lcls vklku rjhdk gS] ftlesa Vscy dks cukusa ls igys mldk
Vscy ds fMtkbZu ls lacf/kr egRoiw.kZ ?kVd Data types(MsVk VkbZil~) :- Ms-Access esa fdlh QhYM dks fu/kkZfjr djrs le; fuEufyf[kr MsVk VkbZil~ dks iz;D q r fd;k tk ldrk gS%& Text: ;g Ms-access dk default data type gS] ftldk iz;ksx dsoy characters(Words,numbers,special characters) dks store djusa ds fy, fd;k tkrk gSA bldh vf/kdre~ lhek 255 characters gksrh gSA Number:- bldk iz;ksx dsoy numbers dks buiqV djusa ds fy, fd;k tkrk gSA Mmeo:- bl data type dk iz;ksx vf/kd ek=k esa MsVk dks LVksj djusa ds fy, fd;k tkrk gSA bldh vf/kdre~ lhek 65000 character gksrh gSA Date/Time:- bl data type dk iz;ksx vyx vyx formats esa date o time values dks store djusa esa fd;k tkrk gSA Currency:- bl data type dk iz;ksx currency data dks(ftlesa ,d $ symbol, decimal point and comma) vkfn dks Hkh 'kkfey fd;k tkrk gSA Auto number:- bl data type }kjk automatic numbers generate fd, tk ldrsa gS] ftUgs indexing ;k primary dh esa iz;ksx fy;k tk ldrk gSA Yes/No :- bl data type dk iz;ksx mu data dks input djusa ds fy, fd;k tkrk gS] ftudh values true/false ;k On/Off ds #i esa gks ldrh gSA OLE data types:- bl data type dk iz;ksx fdlh vU; QkbZy ;k sound/video/graphic object dks MsVkcsl ls fyad djusa esa fd;k tk ldrk gSA
Hyperlink:- bl MsVk VkbZi dk iz;ksx e-mail address, url vkfn dks store djusa esa fd;k tk ldrk gSA
Components of Field properties (QhYM QhYM izksiVhZt ds ?kVd) ?kVd Field size(QhYM lkbZt) Field size ds }kjk fdlh field esa enter fd, tkusa okys dqy characters dh lW[;k dk fu/kkZj.k fd;k tk ldrk gSA tSls text izdkj ds data type }kjk QhYM dh default lW[;k 50 j[kh x;h gS] ftls vf/kdre 255 rd set fd;k tk ldrk gSA fofHkUu MsVk ds vuqlkj field sizes fuEufyf[kr gksrh gS%& Byte: 1 ls 255. Integer:- Positive o Negative integers (-32768 to 32767) Long Integer:- -2,147,483,648 to 2,147,483,647. Single:- Fraction with decimal precision 7 digits. Double:- Stores fractions ( with 15 digits DP) Formats:- bl field property dk iz;ksx fdlh field esa enter fd, tkusa okys data ds format(fy[kusa ds izdkj) dks fu/kkZfjr djusa ds fy, fd;k tkrk gSA mnkgj.k ds fy, ;fn gesa fdlh field esa Date/time dh entry djuh gks rks mlds fy, vyx vyx formats fu/kkZfjr fd, tk ldrsa gSA Ex :@@@-@@@@ }kjk [kkyh Lisl dks bafxr fd;k tkrk gSA > symbol Lowercase character dks UpperCase esa cnyrk gSA < character Uppercase character dks Lowercase esa cnyrk gSA @\% var esa fdlh fu/kkZfjr character dks tksMrk gSA blh izdkj ls Number izdkj ds MsVk VkbZi o Date and Time ds lkFk Hkh fofHkUu izdkj ds formats dks tksMk tk ldrk gSA tSls%& ###,##0.00 format dk p;u djusa ij datasheet entry bl izdkj ls iznf’Zkr gksxh%& 343,343.746
LkkFk gh lkFk ;fn ge Date esa dd/mm/yyyy format dk p;u djsa rks Date 12/1/1888 ds #i esa iznZf’kr gksxhA izkbZejh dh+ %& izkbZejh dh ls rkRi;Z fdlh Vscy esa ekStwn ml unique field ls gS] ftldk iz;ksx ml Vscy dh leLr tuples dks unique identity nsusa esa fd;k tkrk gSA lkekU; rkSj ij izkbZejh dh dk iz;ksx nks Vscyl~ ds e/; fjys’kuf’ki LFkkfir djusa esa fd;k tkrk gSA izkbZejh dh ds ykHkksa dks fuEu izdkj ls le>k tk ldrk gS%& izkbZejh dh ds }kjk Vscy ds izR;sd fjdkMZ dks unique identity nh tkrh gSA izkbZejh dh dk iz;ksx nks ;k nks ls vf/kd Vscyl~ ds e/; fjys’kuf’ki cukusa esa fd;k tkrk gSA izkbZejh dh ij indexing vklkuh ls gks tkrh gS] blds dkj.k MsVk dks 'kh?kzrk ls izkIr fd;k tk ldrk gSA izkbZejh ds dkj.k MsVk dk duplication laHko ugha gksrk gSA Datasheet ;k forms esa data dk display primary key ds vuqlkj ghs gksrk gSA
izkbZejh dh dks fufeZr djuk%& izkbZejh dh dks fufeZr djusa ds fy, loZizFke Vscy dks fMtkbZu O;w esa [kksysxsaA mlds Ik’pkr ftl Hkh field dks izkbZejh dh cukuk gS] mls select djsaxs] o standard toolbar esa ls izkbZejh dh ds icon ij click dj nsxsaA bl izdkj ls izkbZejh dh LFkkfir gks tk,sxhA bls ge Edit> Primary key fodYi }kjk Hkh set dj ldrsa gSA ,d ls vf/kd QhYM ij izkbZejh dh cukuk%& cukuk% ;fn gesa ,d Vscy esa ,d ls vf/kd izkbZejh dh cukuh gks rks ge fuEu pj.kksa dk iz;ksx djsxsa%& loZizFke Vscy dks Design view esa [kksysxsaA mlds i'pkr izFke field dks select djsaxsaA
vc CTRL key dks press djds vU; field dks Hkh select dj ysxsaA blds ckn Standard toolbar esa ls primary key ds icon ij click dj nsxsA
izkbZejh dh dks delete djuk%& ;fn gesa izkbZejh dh dks delete djuk gks rks blds fy, ge fuEu pj.k iz;D q r djsxs%& loZizFke Vscy dks Design view esa [kksysxsaA blds ckn ml field ij right click djsxsa] primary key cuh gqbZ gSA blls ,d popup menu miyC/k gksxk] ftlesa ls izFke fodYi izkbZejh dh dks iqu% select dj ysxsa] bl izdkj ls izkbZejh dh gV tk,sxhA
(Indexes) Indexing ls rkRi;Z ml izfdz;k ls gS] ftlds }kjk ,sDlsl Data dh query o sorting dks rhoz xfr ls djrk gSA fdlh Hkh field ij indexing dh tk ldrh gS] ysfdu mudk data type number gksuk pkfg,A Text o Memo data types ij indexing ugha dh tk ldrhA fdlh Hkh field ij indexing LFkkfir djusa ds fuEu pj.k gks ldrsa gS%& loZizFke Vscy dks Design view esa [kksysxsaA mlds Ik’pkr field dks select djsxsa]ftl ij indexing djuh gSA vc ml field dh Field properties okys Hkkx esa ekStn w fodYi Index dk p;u djsxsa o mls Yes dj nsxsaA ;fn Indexing ds nkSjku ,d ls vf/kd leku MsVk dks Hkh enter djusa dh vuqefr nsuh gks rks ogkW duplicate option dks Hkh OK dj nsxsaA o bls jksdusa ds fy, NO option dks select dj ysxsaA
(Field Validation rules) QhYM osfyMs’ku #Yl ls rkEi;Z mu fu;eksa ls gS] ftudk iz;ksx ;g Kkr djusa ds fy, fd;k tkrk gS] fd D;k fdlh QhYM fo’ks"k dh QhYM izksiVhZ esa lSV fd, x, eku dh ikyuk gks jgh gS ;k ughaA nwljs 'kCnksa esa QhYM osfyMs’ku #Yl }kjk fdlh QhYM fo’ks"k esa Mkyh tk jgh osY;w dh oS/krk ;k voS/krk dh tkWp ls fy;k tkrk gSA fdlh QhYM esa osfyMs’ku #Yl dks LFkkfir djusa ds fy, fuEu pj.k ykxq fd, tk ldrsa gS%& loZizFke ge Vscy dks fMtkbZu O;w esa [kksysxsaA mlds ckn ml QhYM dk p;u djsasxsa] ftl ij field validation rules ykxq djusa gSA blds ckn Field properties esa ls field validation okys Hkkx dk p;u djsxsa] o mi;qDr validation rule fy[k nsxsaA blds ckn Validation text okys Hkkx esa ml text dks fy[ksxsa] ftls condition ds false gksusa ij n’kkZ;k tk,sxkA bl izdkj ls field validation dks ykxq fd;k tk ldrk gSA
(Input Mask) bUiqV ekLd table dh ,d ,slh field property gS] ftlds }kjk bUiqV fd, tk jgs fjdkMZ dh oSY;w dks control fd;k tk ldrk gSA o mls ,d fuf’pr QkesZV esa lSV fd;k tk ldrk gSA bls ykxq djusa ij ;g MsVk’khV O;w esa MsVk dks ,sUVj djusa ls igys lSV fd;k x;k QkesZV Hkh iznZf’kZr djrk gSA mnkgj.k ds fy, ;fn ge fdlh Phone field esa bUiqV ekLd ykxq djuk pkgrsa gS] rks mlds fy, fuEu pj.k gksxsa%& loZizFke fMtkbZu O;w esa ls phone field dks select djsxsaA mlds Ik’pkr field property esa ls Input mask property dk p;u djsxsaA vc ogkW ekStn w ellipse button ij click djsxsa]ftlls Input Mask dk dialog box [kqysxkA
vc mi;qDr Mask dk p;u djsxsaA bl izdkj ls Input Mask apply gks tk,sxkA
Vscy ds k tk ldrk gS%& loZizFke ge Vscy dks MsVk’khV O;w esa [kksysxsaA mlds Ik’pkr tgkW gesa ,d u;k dkWye tksMuk gS] ogkW igys ls ekStn w fdlh Hkh dkWye ij ekml }kjk jkbV fDyd djsxsaA blls gekjs lkeusa ,d fyLV [kqysxhA ml fyLV esa ls Insert column fodYi dk p;u djsxsaA blls ,d u;k dkWye field1 ds uke ls tqM tk,sxkA vc design view esa table dks [kksydj mls rename fd;k tk ldrk gSA blh izdkj ls ge ,d u;h jks Hkh Insert dj ldrsa gSA ijUrq blds fy, gesa table dks design view esa [kksyuk iMsxkA blds ckn fdlh Hkh field use ij right click djds miyC/k esU;w esa ls Insert row fodYi dk p;u dj ysxsaA bl izdkj ls ,d u;h jks Insert gks tk,sxhA ;fn gesa dkWye ;k jks dks gVkuk gks rks mijksDr pj.kksa dk gh iz;ksx fd;k tk,sxk] dsoy gesa Inser column ;k Insert row ds LFkku ij Delete column ;k delete row dk p;u djuk gksxkA
dkWye o iafDr dh lkbZt cnyuk%& cnyuk% fdlh Vscy ds dkWye ;k jks dh lkbZt dks cnyusa ds fuEu pj.k gksrsa gS%& lacf/kr dkWye ;k jks ds e/; separator ckj ij ekml ikbUVj ys dj tk,sxsaA blds ckn ekml ikbUVj cross hair shape esa cny tk,sxkA vc bls drag djds jks ;k dkWye dh lkbZt dks c Freeze fodYi dk p;u djsxsaA dkWye dks Unfreeze djusa ds fy, Format>Unfreeze fodYi dk p;u djsaxsaA
(Hiding the column) Hiding ls rkRi;Z gS] MsVk’khV O;w esa fdlh dkWye dks Hide dj nsukA vFkkZr ml column fo’ks"k dh lwpukvksa dks Hide fd;k tk ldrk gSA ysfdu blls dsoy column hide gksrk gS] Delete ughaA fdlh column dks hide djusa ds fuEu pj.k gS%& loZizFke Vscy dks MsVk’khV O;w esa [kksysxsaA mlds ckn ml QhYM dks lysDV djsxsa] ftls Hide djuk gSA
blds ckn Format>HideColumn fodYi dk p;u djsxsaA o bl izdkj dkWye hide gks tk,sxkA bls nqckjk Unhide djusa ds fy, Format>Unhide fodYi dk p;u djsxsaA ;gkW lHkh dkWyeks dh fyLV ds lkFk ,d doalog box miyC/k gksxkA ftlesa lHkh dkWyeksa dks n’kkZ;k tk,sxk] o izR;sd dkWye ds vkxs ekStn w check mark select gksxkA dsoy mUgh fields ds vkxs ;g select ugha gksxk] ftUgs hide fd;k x;k gSA vc bu check mark dks yxk nsxsa ftlls og column iqu% iznZf’kr gks tk,sxsaA (Finding Data in tables) Vscy esa MsVk dks <wa Find(Ctrl+F) fodYi dk p;u djsxsaA ftlls gekjs lkeusa Find & Replace nks tabl okyk Dialog box [kqysxkA blds ckn ge Find what okys combo box esa ml phrase ;k 'kCn dks fy[ksxsa] ftls search djuk gSA vc Look in combo esa ls ml QhYM dks pqusxsa] ftlesa ls fjdkMZ dks [kkstuk gSA blds ckn Match okys combo box esa ls dkzbVsfj;k dk p;u djsxsaA vkSj Find Next button ij click dj nsxsaA tc rd gekjs document esa [kksts tkus okyk 'kCn fn, x, criterion ls match djrk jgrk gS] rc rd Find next button highlight jgrk gSA blds ckn ;g dim gks tkrk gSA
(Replacing data in a datasheet) Vscy esa ekStn w MsVk dks fdlh u,s MsVk ls replace djusa ds fy, ge fuEu pj.k dke esa ys ldrsa gS%& loZizFke Vscy dks MsVk’khV O;w esa [kksysxsaA blds ckn fdlh Hkh field dk p;u djsxsa o EDIT> FIND option dk p;u djsxsaA blls gekjs lkeusa Finf and Replace uke dk MkW;ykx ckWDl [kqysxkA blesa ls ge Replace Tab dk p;u dj ysxsaA blds fuEu Hkkx gksrsa gS%& • Find What: ftlesa Find fd, tkusa okys 'kCn dks fy[kk tkrk gSA • Replace with: ftlesa Replace fd, tkus okys 'kCn dks fy[kk tkrk gSA • Look in: bl combo esa ls ml field dk p;u djrsa gS] ftlesa ls MsVk dks [kkstk tk,sxkA • Match; blesa search criterion fy[kk tkrk gSA ;fn gesa dsoy ,d gh 'kCn dks Replace djuk gks rks blds fy, Replace button ij click dj nsxsaA ij ;fn lkjs 'kCnksa dks Replace djuk gks rks replace all button ij click fd;k tk ldrk gSA
(Spelling checking in Table) Spell checker ,d ,slh lqfo/kk gS] ftlds }kjk Datasheet esa ls spelling checking dks ykxq fd;k tk ldrk gSA bls iz;ksx esa ysus ds fuEu pj.k gS%& Vscy dks MsVk’khV O;w esa [kksysxsaA fdlh QhYM dks select djsxsa] o Tools> Spelling(F7) fodYi dk p;u dj ysxsaA blls Spelling & Grammer dk dialog box vk tk,sxkA blesa ls ge ;k rks auto correct feature dks iz;ksx esa ys ldrsa gS] ;k miyC/k list esa ls
fdlh 'kCn dks pqudj “Change”, “Change all” ;k Ignore o Ignore all fodYi dk p;u dj ldrsa gSA
(Printing datasheet) MsVk’khV dks fizaV djusa ds fy, fuEu pj.k iz;ksx esa fy, tk ldrsa gS%& Vscy dks Datasheet O;w esa [kksysxsaA blds ckn FILE>Print fodYi dk p;u djsxsaA blls gekjs lkeusa Print uke dk dialog box [kqysxkA blesa ls ge Print range(All, Pages, Selected records) dk p;u dj ldrsa gSA lkFk gh lkFk Number of copies dk fu/kkZj.k Hkh dj ldrsa gSA blds ckn Print button click djusa ls datasheet print gks tkrh gSA
(Table esa records tksMuk) uk Vscy dk structure rS;kj djusa ds ckn Vscy esa MsVk dks enter fd;k tk ldrk gSA blds fuEu pj.k gksrsa gS%& Vscy dk select djds open button ij click djsaxsaA ftlls Vscy datasheet view esa [kqy tk,sxhA blds ckn mouse pointer dks izFke field esa ys tkdj click djsxsa] vkSj Data enter djsxsaA blds ckn Tab key dks press djds vxys field esa tk,sxs] o data dh entry djsaxsaA bl izdkj ls ,d record tqM tk,sxkA Data enter djrsa le; (8) symbol izR;sd [kkyh record dks n’kZkrk gSA
(Editing records) Records dks edit djusa ds fuEu pj.k gks ldrsa gS%& Vscy dks fMtkbZu O;w esa [kksydj fdlh Hkh field esa click djds mlds MsVk esa ifjorZu fd;k tk ldrk gSA ;fn gesa lkjs fjdkMZl~ esa navigate djuk gks rk blds fy, Datasheet view esa ekStn w Navigation bar ds (Next, Previous, First, Last) buttons dks pqu ldrsa gSA