home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Borland Plateform / Turbo Prolog 2 / TEST < prev    next >
Encoding:
Text File  |  1979-12-31  |  5.0 KB  |  167 lines

  1.                   Institutσ Oµ Compute≥ Science
  2.                             BCC╔ FAST
  3.                              Karachi
  4.  
  5. Coursσ Namσ ║ File≤ AnΣ Database≤             Datσ ║ 16-04-1990
  6. Coursσ Codσ ║ 2302
  7. Instructo≥  ║ Professo≥ JaveΣ Ashraµ           
  8. MiΣ Terφ Tes⌠                                 Ma° Mark≤ ║ 100
  9. ----------------------------------------------------------------
  10.  
  11. Notσ ║ Questioε numbe≥ onσ i≤ fo≥ Oraclσ student≤ onl∙.
  12.        Questioε numbe≥ four i≤ fo≥ Ingres≤ student≤ only.
  13.  
  14.  
  15. Q.1. Fil∞ iε thσ blank≤ :¡                         Mark≤ 20
  16.  
  17. 1.   Iε ORACL┼ databasσ informatioε i≤ organiseΣ iε _________.
  18. 2.   Table≤ arσ madσ u≡ oµ _______▀ anΣ ________.
  19. 3.   StandarΣ datσ forma⌠ iε ORACL┼ i≤ ______________.
  20. 4«   ┴ ________▀ functioε caε no⌠ bσ useΣ alongwitΦ aε áindividua∞ ì
  21.      µunction.
  22. 5« á  ________▀ clausσ i≤ useΣ t∩ displa∙ resul⌠ iε ß áparticula≥ ì
  23.      o≥der. 
  24. 6« á  ┴ trigge≥ i≤ ß se⌠ oµ ________▀ o≥ _______▀ ácommand≤ átha⌠ ì
  25.      arσ executeΣ b∙ ß certaiε event.
  26. 7.   ________▀ leve∞ trigger≤ caε bσ defineΣ oε al∞ threσ levels.
  27. 8.   Al∞ _______ field≤ corresponΣ t∩ basσ tablσ iε ß block.
  28. 9.   Therσ mus⌠ bσ atleas⌠ onσ _________▀ fielΣ iε ß block.
  29. 10.  ___________▀ field≤ arσ placeΣ oε pagσ zero.
  30. 11.  Hel≡ messagσ fo≥ ß fielΣ i≤ writteε iε ______▀ window.
  31. 12.  _______▀ trigger≤ arσ no⌠ triggereΣ b∙ ß specifiπ event.
  32. 13« á┴ ápost_inser⌠ átrigge≥ defineΣ a⌠ á____▀ áleve∞ áoverride≤ ì
  33.      post_Θnser⌠ trigge≥ defineΣ a⌠ thσ _______▀ level.
  34. 14« á┴ __________▀ trigge≥ i≤ executeΣ wheε thσ curso≥ i≤ áabou⌠ ì
  35.      t∩ leavσ ß fielΣ whosσ valuσ ha≤ beeε changed.
  36. 15.  _______▀ trigge≥ i≤ executeΣ oncσ pe≥ query.
  37. 16« á┴ á_______▀ átrigge≥ ái≤ áexecuteΣ áoncσ áfo≥ áeacΦ árecorΣ ì
  38.      retrieveΣ b∙ thσ query.
  39. 17.  Onl∙ selec⌠ statement≤ arσ alloweΣ iε ß _______▀ trigger.
  40. 18.  Explaiε followinτ attriute≤ oµ trigger≤ :-
  41. a)   Abor⌠ trigge≥ wheε ste≡ fails
  42. b)   Reversσ returε code
  43. c)   Returε succes≤ wheε abortinτ trigger
  44. .paè    
  45.  
  46.  
  47.  
  48.  
  49. Q.2. Writσ SQ╠ statement≤ fo≥ followinτ :¡             Mark≤ ║ 10
  50.  
  51. 1.   Makσ ß tablσ EM╨ witΦ followinτ column≤ :
  52.      Column         Type      Width
  53.      ------         ----      -----
  54.      EMPNO          string      4
  55.      ENAME          strinτ     10
  56.      JOB            strinτ     10
  57.      MGR            strinτ      4
  58.      HIREDATE       date        -
  59.      SAL            numeric     5
  60.  
  61. 2« á Selec⌠ al∞ column≤ froφ abovσ tablσ wherσ salar∙ ái≤ áabovσ ì
  62.      120░ anΣ belo≈ 1300.
  63.  
  64. 3« á Lis⌠ áinformatioε abou⌠ al∞ thσ managers¼ a≤ áwel∞ áa≤ áthσ ì
  65.      clerk≤ iε departmen⌠ 10.
  66.  
  67. 4.   WhicΦ employee≤ worδ iε Smith'≤ department?
  68.  
  69. 5«   WhicΦ employee≤ havσ thσ samσ joΓ a≤ Clarδ o≥ havσ ß ásalar∙ ì
  70.      greate≥ thaε hi≤ ?
  71.  
  72.  
  73. .paè
  74.  
  75.  
  76.  
  77. Q.3. ┴ databasσ consist≤ oµ followinτ table≤ :-
  78.      Table▒ á(SCODE,MCODE⌐ ¡ Relatioε betweeε supplier≤ áanΣ ára≈ ì
  79.                              materials.
  80.      Table▓ (MCODE,MNAME⌐  ¡ Maste≥ tablσ fo≥ ra≈ materials.
  81.      
  82.      Table│ (SCODE,SNAM┼⌐  ¡ Maste≥ tablσ fo≥ suppliers.
  83.  
  84. Wherσ 
  85.       SCOD┼ i≤ supplie≥ code
  86.       
  87.       MCOD┼ i≤ ra≈ material
  88.       
  89.       MNAM┼ i≤ namσ oµ ra≈ material
  90.  
  91.   
  92. and   SNAM┼ i≤ supplier≤ name.
  93.  
  94. ¡  Onσ supplie≥ caε suppl∙ morσ thaε onσ ra≈ material.
  95.  
  96. ¡  Onσ ra≈ materia∞ caε bσ supplieΣ b∙ morσ thaε onσ suppliers.
  97.      
  98.  
  99.  
  100.  
  101.  
  102.                                                    Mark≤  20
  103.  
  104. (ß ⌐ Writσ áaε  applicatioε fo≥ ne≈ supplie≥ entr∙ áwitΦ áfollowinτ ì
  105.      constraints:ì
  106.   
  107.    ¡ SCOD┼ t∩ bσ incrementeΣ b∙ thσ systeφ iε sequentia∞ order.
  108.  
  109.    ¡ áAfte≥ enterinτ SNAM┼ use≥ shoulΣ havσ ß choicσ t∩ ente≥ áa≤ ì
  110.       mßn∙ ra≈ material code≤ a≤ required.
  111.  
  112.    ¡ Therσ mus⌠ bσ ß checδ whethe≥ ra≈ materia∞ exist≤ o≥ not.
  113.  
  114.    ¡ áIµ exist≤ theε displa∙ materia∞ namσ elsσ ádispla∙ áanothe≥ ì
  115.       meεu fo≥ entr∙ oµ materia∞ namσ.
  116.   
  117.    ¡ checδ fo≥ duplicatioε iε al∞ tables.
  118.  
  119.                                                      Mark≤ 20
  120. (B)« Writσ a prograφ iε whicΦ ║   
  121.  
  122.     ¡ Wheε yo⌡ ente≥ ß supplie≥ code¼ prograφ shoulΣ displa∙ áal∞ ì
  123.       ra≈ materia∞ name≤ whicΦ caε bσ supplieΣ b∙ ß supplier.
  124.  
  125.     ¡ Wheε yo⌡ ente≥ ß ra≈ materia∞ code¼ prograφ shoulΣ ádispla∙ ì
  126.       name≤ oµ al∞ supplie≥ wh∩ caε suppl∙ tha⌠ ra≈ material.
  127.  è
  128.  
  129.  
  130.  
  131.                                                       Mark≤ 30
  132. (C)«  Writσ ß prograφ t∩ creatσ repor⌠ witΦ followinτ forma⌠ :
  133.  
  134.  
  135.                       ╪ ┘ ┌ COMPANY
  136.                      ===============
  137.                      
  138.                      Lis⌠ oµ Suppliers   
  139.                      -----------------
  140.  
  141.  
  142.    Supplie≥ Namσ ║ Mr ╪┘Z
  143.  
  144.    Ra≈ material≤ :
  145.    -------------
  146.    1« AB├                        2« XYZ
  147.   
  148.    3« ABY
  149.  
  150.   
  151.    Supplie≥ Namσ ║ ............
  152.    .
  153.    .
  154.    .
  155.  
  156.  
  157.                        
  158.  
  159.  
  160.  
  161.  
  162.  
  163. Q.4« áWritσ áß áprograφ áhavinτ followinτ facilitie≤ :-
  164.       ¡ Systeφ shoulΣ promp⌠ fo≥ ß materia∞ codσ t∩ bσ deleteΣ aεd 
  165.         wheε áß ácodσ i≤ entered¼ i⌠ shoulΣ ádeletσ áal∞ árecord≤ ì
  166.         contßininτ thi≤ codσ froφ table▒ anΣ tablσ▓.
  167. .paè