SQL, PL SQL
SQL, PL SQL
-
P-317
SET/CSE/BCA/DSE-2A3
B. C. A. (Fifth Semester)
EXAMINATION, 2023-24
|
SQL/PL-SQL
Time : Two Hours ]
[Maximum Marks : 70
Note : (i) Attempt any five questions from Section A and
5 marks.
P.T.O.
(ay age | [3]
2. Explain the meta data used iri PL/SQL to inherit data 10. Explain various types and properties of join with
:
|
with suitable
amp. 15. Write procedure for the following Queries
7. Write a program in PL-SQL to cheek a prime number.
(a) Write a query to print details of the Workers with
Section—B SALARY
lies between 40000 and 70000.
Note : Attempt any three questions. Each question carries (b) Write a query to fetch the count of employees
15 marks. working
in the department ‘SALES’.
8. Write a PL/SQL cursor program which is used to (c) Write a SQL query to fetch the no. of workers for
calculate total salary from emp table without using sum each department in
the descending order.
function ? Write a query to show the current date and time.
:
(d)
9. (a) Explain the following
(ec) Write a query to show the top n (say 10) records
(i) System Catalogue and its contents ofa table.
(ii) Triggers in PL/SQL
p.338° ;
SET/CSE/BIT/DSE-2A3
_B. Sc. (IT) (Fifth Semester)
EXAMINATION, 2022-23
(New Course)
|
SQL/PL-SQL
Time : Two Hours [ Maximum Marks : 70
| |
book. Additional answer book (B-Answer book)
should not be provided or used.
:
‘Section—A
i
_ Explain
_variable in PL/SQL.
P. T..0.
[2] |
P-338 [3]
What is PL/SQL ? Explain block of PL/SQL. 11. Explain different joins such as EQUIJOIN,
NATURALJOIN, LEFTJOIN and RIGHTJOIN,
Explain different comparison andlogical operators
used in PL/SQL. OUTERIOM with suitable examples.
Write PLASQL
12. How are queries processed in distributed databases
5
Section—B
P8314
SET/CSE/BCA/DSE-2-A.3 «=
B. C. A. (Fifth Semester)
EXAMINATION, 2021-22
SQL/PL-SQL
Time : Two Hours
| [ Maximum Marks: 70
Note: (i) Attempt any five questions from Section A and
|
5 marks.
|
| PTO
|
2] Pa814 [3]
2. How will you create, call and remove a stored {
mS What is a view ? Write the rules for updating views.
procedure ? * ’
Also write down the syntax and example
for updating a
3. Explain different types of constraints in SQL. view. Write a program in PL/SQL to swap the values
7.
.
examples.
Section-B What is Cursor ? Differentiate between implicit and
explicit cursor. Write a trigger on the Employee
Note : Attempt any three questions. Each question carries table,
which makes the entry in the name column in
:
15 marks.
uppercase
1. What are functions and their purity levels ? Explain
:
Employee cnaine; age, Sex, salary)
with an example. Consider the following table
Explain Codd’s rule in detail. Explain UPDATE and
Client-master (Client-no, name,
city) DELETE command with examples.
Salesman_master (Salesman_no, name, city)
Answer the following query using the SET operator :
P—317
B. C. A. (Fifth Semester) Examination, 2020-21
SQL/PL--SQL.
(SET/CSE/BCA/DSE-2A.3) :
a ane ee es
(in figures)
pri iat
-Roll Number
4)
Roll Number (in Words).......s.sessesssecssecvecesecsessseesees
sryaaia (eset 4)
:
|
_
Signature of Candidate.................... Soeeeaee Signature of Invigilator...................cc000-
Grae @
See)
.
as
your Roll Number and OMR sheet number on your
to
aaKa
ee
question booklet.
so sapain, tox wis, aied Wen, fsa or ara
Se See
GIR-TaS wd doe or wae
A) srawas
SHOTHOMRO We wd
. Please maintain perfect silence and discipline in ‘the examination’ hall. Any conversation, gesticulation,
ay
disturbance and use of unfair means will lead to the cancellation of candidature of the candidate.
era wWha-pat A uot wo S wba ud gay We] Wenner A fae at aes aT aafery, wera,
.
Srna a aged Meat GT VIPT He oY aezell wT ude feed ox dh
a
correct.
o ae wenfta sax /faor
Was yea 7a = we (A), (B), (©, (D); Fea wa S| STI Tel GR
ge hos eer
8 wren ST 81 gwa S ww A wel gue a
Before filling the OMR answer sheet, kindly read the instructions mentioned on the OMR answer sheet and
wae Fe
.
oe fe
follow the same.
SRG
SATA. HY
oe Fert
|
wey A Soyosm at we CE
oe wr
(Contd.-on the last page)
(7 MER shar TS 7)
1. Which of the following is true about 5i Which of the following is not true about
comments in PL/SQL 2 PL/SQL decision making structures ?
(A), Comments7
are explanatory (A) The IF “Statement associates a
statements. condition with
a sequence of
ps :
END
"are enclosed by /* and */. (C) ‘The IP-TI statement allows you to
(D) All of the above choose between several
'
alternatives,
2. Which ofthe following statements can
used to terminate a PL/SQL loop 2
be (D) PL/SQL does not have a CASE
|
statement
(A) GOTO.
Which one the following sorts rows in
_
(C)
(D)
Trigger
Package
SQL a be used
to :
(2)
©
Code : 615426
Updating the value of the view : Li. Which of the join operations do not
(A) Will affect the relation from which
preserve non-matched tuples ?
it is defined
.
(A) Left outer join
(B) Will not change the view definition
(B) Right outer join
(C) Will not affect’ the relation from
Which ofthe following is used at the end 12. How tables may be included with a
©
many
a join?
not satisfy the condition in where
|
(A) One
clause ? ,
(B) Two
(A) With
Check (C) Three
(B)
FROM
instructor, teaches (A) Select * from R natural join
WHERE instructor.ID= teaches.ID;
Shy
(B) Select * from R cross join S
This query does which of the following
(C) Select * from R union
join S
operations ?
(D) Select * from R inner join S
(A) All attributes of instructor and —
_
instructed and teaches are selected (D) Flashback
(A) -
Conforming an action or triggering (A) -Varchar
©
aresponse Char
(B)
(B) Producing detail summary or
(C) Text type
exception report
Recording a business activity (D) Both Varchar and Char
(C)
(A) Transaction
SELECT d.name, COUNT (emp_id)
-(B) Flashback
emp_no
(C) Rollback
EROM department d INNER JOIN
(D) Abort
Employee ¢
17. Delete from r where P.
:
ON d.dept_id = e. rmp_id
|
The above command
(B) Deletes the relation (A) Filter out all rows whose total
(©) Clears all entries from the relation emp_id below 2
All ofthe above
;
(B) No
rows whose total emp_id>2
(C) Depends
of the above
©
None
of the above
(D)
(D) None
Code : 615426
(4)
#
a1; The GROUP BY statement is used in 25: Which of the following is not a PL/SQL
-
to check
for existence of record ? (C) CREATE CURSOR cursor—name
SQL NOT NULL
|
(A) AS select_statement;
@) SQL AS
(D) CURSOR cursor name AS select-
(C) ‘SQL EXISTS
stalement;
@) None of the above
search criteria ?
(A) NOT NULL ae
(A) Fetching with a cursor
(B) DEFAULT
(B) Opening a sitet
(C) %TYPE
(©) Fetching bulk data with a cursor
-
of the above (D) %ROWTYPE
(D) None
(5) P.T. 0.
Code : 615426
The
28. user defined data type can be created 31. To include integrity constraint in an
@) Create data
(B) Modify table
32, -
Which ofthe following statements is true
29. An index helps to speed up : ®
about implicit cursors ?
(A) SELECT queries “
(A) Implicit cursors are used for SQL
(B) WHERE clauses
statements that are not named.
(C) Both (A) and (B) (B) Developers should use implicit
(D) None
of the above (D) select, where, group by, having
()
(4) To update multiple targeted
Allof the above
records, you need to specify
f
WHEREclause.
(C) G)and @)
(D) (1) only