home *** CD-ROM | disk | FTP | other *** search
- Institutσ Oµ Compute≥ Science
- BCC╔ FAST
- Karachi
-
- Coursσ Namσ ║ File≤ AnΣ Database≤ Datσ ║ 16-04-1990
- Coursσ Codσ ║ 2302
- Instructo≥ ║ Professo≥ JaveΣ Ashraµ
- MiΣ Terφ Tes⌠ Ma° Mark≤ ║ 100
- ----------------------------------------------------------------
-
- Notσ ║ Questioε numbe≥ onσ i≤ fo≥ Oraclσ student≤ onl∙.
- Questioε numbe≥ four i≤ fo≥ Ingres≤ student≤ only.
-
-
- Q.1. Fil∞ iε thσ blank≤ :¡ Mark≤ 20
-
- 1. Iε ORACL┼ databasσ informatioε i≤ organiseΣ iε _________.
- 2. Table≤ arσ madσ u≡ oµ _______▀ anΣ ________.
- 3. StandarΣ datσ forma⌠ iε ORACL┼ i≤ ______________.
- 4« ┴ ________▀ functioε caε no⌠ bσ useΣ alongwitΦ aε áindividua∞ ì
- µunction.
- 5« á ________▀ clausσ i≤ useΣ t∩ displa∙ resul⌠ iε ß áparticula≥ ì
- o≥der.
- 6« á ┴ trigge≥ i≤ ß se⌠ oµ ________▀ o≥ _______▀ ácommand≤ átha⌠ ì
- arσ executeΣ b∙ ß certaiε event.
- 7. ________▀ leve∞ trigger≤ caε bσ defineΣ oε al∞ threσ levels.
- 8. Al∞ _______ field≤ corresponΣ t∩ basσ tablσ iε ß block.
- 9. Therσ mus⌠ bσ atleas⌠ onσ _________▀ fielΣ iε ß block.
- 10. ___________▀ field≤ arσ placeΣ oε pagσ zero.
- 11. Hel≡ messagσ fo≥ ß fielΣ i≤ writteε iε ______▀ window.
- 12. _______▀ trigger≤ arσ no⌠ triggereΣ b∙ ß specifiπ event.
- 13« á┴ ápost_inser⌠ átrigge≥ defineΣ a⌠ á____▀ áleve∞ áoverride≤ ì
- post_Θnser⌠ trigge≥ defineΣ a⌠ thσ _______▀ level.
- 14« á┴ __________▀ trigge≥ i≤ executeΣ wheε thσ curso≥ i≤ áabou⌠ ì
- t∩ leavσ ß fielΣ whosσ valuσ ha≤ beeε changed.
- 15. _______▀ trigge≥ i≤ executeΣ oncσ pe≥ query.
- 16« á┴ á_______▀ átrigge≥ ái≤ áexecuteΣ áoncσ áfo≥ áeacΦ árecorΣ ì
- retrieveΣ b∙ thσ query.
- 17. Onl∙ selec⌠ statement≤ arσ alloweΣ iε ß _______▀ trigger.
- 18. Explaiε followinτ attriute≤ oµ trigger≤ :-
- a) Abor⌠ trigge≥ wheε ste≡ fails
- b) Reversσ returε code
- c) Returε succes≤ wheε abortinτ trigger
- .paè
-
-
-
-
- Q.2. Writσ SQ╠ statement≤ fo≥ followinτ :¡ Mark≤ ║ 10
-
- 1. Makσ ß tablσ EM╨ witΦ followinτ column≤ :
- Column Type Width
- ------ ---- -----
- EMPNO string 4
- ENAME strinτ 10
- JOB strinτ 10
- MGR strinτ 4
- HIREDATE date -
- SAL numeric 5
-
- 2« á Selec⌠ al∞ column≤ froφ abovσ tablσ wherσ salar∙ ái≤ áabovσ ì
- 120░ anΣ belo≈ 1300.
-
- 3« á Lis⌠ áinformatioε abou⌠ al∞ thσ managers¼ a≤ áwel∞ áa≤ áthσ ì
- clerk≤ iε departmen⌠ 10.
-
- 4. WhicΦ employee≤ worδ iε Smith'≤ department?
-
- 5« WhicΦ employee≤ havσ thσ samσ joΓ a≤ Clarδ o≥ havσ ß ásalar∙ ì
- greate≥ thaε hi≤ ?
-
-
- .paè
-
-
-
- Q.3. ┴ databasσ consist≤ oµ followinτ table≤ :-
- Table▒ á(SCODE,MCODE⌐ ¡ Relatioε betweeε supplier≤ áanΣ ára≈ ì
- materials.
- Table▓ (MCODE,MNAME⌐ ¡ Maste≥ tablσ fo≥ ra≈ materials.
-
- Table│ (SCODE,SNAM┼⌐ ¡ Maste≥ tablσ fo≥ suppliers.
-
- Wherσ
- SCOD┼ i≤ supplie≥ code
-
- MCOD┼ i≤ ra≈ material
-
- MNAM┼ i≤ namσ oµ ra≈ material
-
-
- and SNAM┼ i≤ supplier≤ name.
-
- ¡ Onσ supplie≥ caε suppl∙ morσ thaε onσ ra≈ material.
-
- ¡ Onσ ra≈ materia∞ caε bσ supplieΣ b∙ morσ thaε onσ suppliers.
-
-
-
-
-
- Mark≤ 20
-
- (ß ⌐ Writσ áaε applicatioε fo≥ ne≈ supplie≥ entr∙ áwitΦ áfollowinτ ì
- constraints:ì
-
- ¡ SCOD┼ t∩ bσ incrementeΣ b∙ thσ systeφ iε sequentia∞ order.
-
- ¡ áAfte≥ enterinτ SNAM┼ use≥ shoulΣ havσ ß choicσ t∩ ente≥ áa≤ ì
- mßn∙ ra≈ material code≤ a≤ required.
-
- ¡ Therσ mus⌠ bσ ß checδ whethe≥ ra≈ materia∞ exist≤ o≥ not.
-
- ¡ áIµ exist≤ theε displa∙ materia∞ namσ elsσ ádispla∙ áanothe≥ ì
- meεu fo≥ entr∙ oµ materia∞ namσ.
-
- ¡ checδ fo≥ duplicatioε iε al∞ tables.
-
- Mark≤ 20
- (B)« Writσ a prograφ iε whicΦ ║
-
- ¡ Wheε yo⌡ ente≥ ß supplie≥ code¼ prograφ shoulΣ displa∙ áal∞ ì
- ra≈ materia∞ name≤ whicΦ caε bσ supplieΣ b∙ ß supplier.
-
- ¡ Wheε yo⌡ ente≥ ß ra≈ materia∞ code¼ prograφ shoulΣ ádispla∙ ì
- name≤ oµ al∞ supplie≥ wh∩ caε suppl∙ tha⌠ ra≈ material.
- è
-
-
-
- Mark≤ 30
- (C)« Writσ ß prograφ t∩ creatσ repor⌠ witΦ followinτ forma⌠ :
-
-
- ╪ ┘ ┌ COMPANY
- ===============
-
- Lis⌠ oµ Suppliers
- -----------------
-
-
- Supplie≥ Namσ ║ Mr ╪┘Z
-
- Ra≈ material≤ :
- -------------
- 1« AB├ 2« XYZ
-
- 3« ABY
-
-
- Supplie≥ Namσ ║ ............
- .
- .
- .
-
-
-
-
-
-
-
-
- Q.4« áWritσ áß áprograφ áhavinτ followinτ facilitie≤ :-
- ¡ Systeφ shoulΣ promp⌠ fo≥ ß materia∞ codσ t∩ bσ deleteΣ aεd
- wheε áß ácodσ i≤ entered¼ i⌠ shoulΣ ádeletσ áal∞ árecord≤ ì
- contßininτ thi≤ codσ froφ table▒ anΣ tablσ▓.
- .paè