Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
3 views

SQL, PL SQL

The document outlines the examination structure for SQL/PL-SQL for B.C.A. and B.Sc. (IT) students, detailing the format, timing, and marking scheme. It includes instructions for answering questions from two sections, with specific requirements for word limits and the use of provided answer books. Additionally, it presents a variety of questions related to SQL and PL/SQL concepts, including definitions, examples, and programming tasks.

Uploaded by

ravikr54154
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

SQL, PL SQL

The document outlines the examination structure for SQL/PL-SQL for B.C.A. and B.Sc. (IT) students, detailing the format, timing, and marking scheme. It includes instructions for answering questions from two sections, with specific requirements for word limits and the use of provided answer books. Additionally, it presents a variety of questions related to SQL and PL/SQL concepts, including definitions, examples, and programming tasks.

Uploaded by

ravikr54154
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

ROMs

iil sisaiss la ies

-
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

any three questions from Section B.


(ii) Answer each question of Section A. within.
50 words.

(iii) Limit your answers within the given answer


book. Additional answer book (B-Answer
pie:
should not be provided or used.
Section A
Note: Attempt any five questions. Each
qnestion carries
_

5 marks.

1. Differentiate between SQL and SQL PLUS.

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

type from the table. suitable example.

Explain DDLwith suitable example of


3. Differentiate between Author‘zation and 11.

and TRUNCATE command.


pach DROP
Authentication.
4, Illustrate the fact that BCNF
is strictly stronger than
12. Write than notes on following :

(a) Views and synonyms


5. What is the ditties between the trim, delete
Function in PL-SQL
(b)
collection methods ? Explain each with example.
(c) While & For Loop
6. Differentiate between HAVING seid WHERE clause

:
|

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

(b) Discuss audit trials in DBMS. P-317 640


eS

ROW NOE fodicsc cessed tsecens sss

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

o Note: (i) Attempt all the five questions from Section A


and any three questions from Section B.

(ii) Answer caoh gs aia of Section A within


50 words.
(iii) Limit. your answers within the given answer
€ |

| |
book. Additional answer book (B-Answer book)
should not be provided or used.
:

‘Section—A

Note : Attempt all the five questions. Each question carries


5 marks.
dire bind
L concept of % type attribute and

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.

block to update employee by increase in


-

Write PLASQL
12. How are queries processed in distributed databases
5

salary by % 5,000 and by using concept of cursor. Find


total number of rows updated.
with example
Explain
advantages.
sriow technique with its

What is function in PL/SQL ? Write simple function to


calculate square of given number with the help of
functional parameters.

Section—B

Note : Attempt any three questions. Each question carries


15 marks.

6. Define identifiers, literals, delimiters and comment .

associated in PL/SQL with suitable cxamplrs,


What is GROUP BY and HAVING clause i tes 7

Explain with an suitable example.


Explain aggregate functions in SQL with suitable
examples of sum, avg, count, max and min.
Explain DCL with GRANT and REVOKE commands
with suitable examples.
10. Explain stored procedure with their advantages and
suitable example. P-338 310
RON g ssssvssovscessseaseeess

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
|

any three questions from Section B.

Gi) Answer each question of Section A within


50 words.

_ (iii) Limit your answers within the given answer


book. Additional answer book (B-Answer book)
should not be provided or used.
Section—A

Note : Attempt any five questions. Each question carries


|
:

5 marks.
|

1. What is PL/SQL ? What are the sections in a PL/SQL


code ? Explain.

| 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

4. Explain object view in detail.


“of two variables without using a third variable.
What is Exception ? Explain Exception
5. Give syntax, purpoge and example for : (i) SELECT handling in
PL/SQL with suitable example. Write a procedure in
using order by clausé (ii) SELECT using Group by and
Having clause.
| PL/SQL
to increase the salaries of all employees in an
6. Explain the basic and composite data type using proper
examples.,
|
organization by 10% employee
BASIC_SAL). oe AGE, SEX,

7.
.

Write a PL/SQL code to. find the largest of three


What is transaction ? Explain COMMIT, ROLLBACK
and SAVEPOINT in transaction using proper
numbers. |

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 :

. Retrieve the names of all the clients and salesmen in


"

the city “Nagpur” from the above table. P-314


GO
Paper Code : 615426 OMR Sheet No.

P—317
B. C. A. (Fifth Semester) Examination, 2020-21
SQL/PL--SQL.
(SET/CSE/BCA/DSE-2A.3) :

Time : One Hour | [ Maximum Marks : 70

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)
.

(per fANetay dy SKATE) .

DO NOT OPEN THE BOOKLET UNTIL YOU ARE ASKED TO DO SO


Od Teh Gel 7 we, ORaeT FT Glet waa
7 IMPORTANT INSTRUCTIONS (Hecayot feet)
. This booklet contains 35 (thirty five) questions with 4 (four) options. Each question is of 2 (two) marks and
there shall be no negative marking.
we Weaa otter eal }
4 (ae) flwcd =, vele wear 2 (@) aint ars
fea afr
A
get 35 Ocihe) wea &, wih
ger fit west a wet ert
Fill your Roll Number, Paper Code, Enrollment No., Subject Name and Title of the Paper clearly and
.
neatly in
your OMR answer sheet. It is also compulsory fill

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

PAT sift PRAT


aoe ST See 9s
9
zs |

. 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

Each question has four expected answers/options, i.e. (A), (B),


ore)
(©), (D); out of these options only one is

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 :

(B) PL/SQL Supports both single-line’ statements enclosed by THEN and


and multi-line comments. IF.
~

END

The PL/SQL single-line comments


"

(C)_ (3) The IF statement also adds the


start with the delimiter-(double keyword ELSE followed by an
hyphen) and multi-line comments alternative sequence of statement.

"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
_

(B) EXIT WHEN .


of
.

(C) CONTINUE WHEN SQL?


_@) KILL.
(A) SORTBY
3. Which of the following is not a PL/SQL (B) ALIGNBY
unit ?
(C) ORDERBY
(A) Table
(B) Type (D) GROUPBY

(C)

(D)
Trigger
Package
SQL a be used
to :

(A) Create database structures only


4. Which of the following is used to declare
arecord ? (B) Modify database data only

(A) %ROWTYPE (C) All of the above can be done by


(B) %TYPE SOL
(C) Both (A) and (B)
(D) Query database data only
(D) None of the above

(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 it is defined (C) Inner join


j

(D) Cannot determine (D) Natural oin

Which ofthe following is used at the end 12. How tables may be included with a
©
many

of the view to reject the tuples which do


.

a join?
not satisfy the condition in where
|

(A) One
clause ? ,

(B) Two
(A) With
Check (C) Three
(B)

(C) With check (D) All ofthe above

(D) All of the above


1 In SQL the statement select * from R, S

10. SELECT instructor.* is equivalent to :

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 —

teaches are selected 14. Which of the following makes the


(B) All attributes of instructor
are transaction permanent in the database ?
selected on the given condition
(A) View
(C) All attributes “of teaches are
selected on given condition
(B) Commit -

(D) Only the some attributes from (C) Roilback .

_
instructed and teaches are selected (D) Flashback

Code 615426 (3)


:
-P.T.O.
Which among the following have
the
Transaction processing is associated with
19°
15.

everything below except : maximum bytes ?

(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)

(D) Maintaining a data


20. What is the significance of the statement
16. will undo all statements up to “HAVING COUNT (emp_id)>2” in the
commit ? following MySQL statement
2
~

(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

(A) Deletes a particular tuple from the


GROUP BY d.name
relation HAVING COUNT (emp_id) >2

(B) Deletes the relation (A) Filter out all rows whose total
(©) Clears all entries from the relation emp_id below 2
All ofthe above
;

(@) rows whose total


(B) Selecting those

BY’ clause similar to


~

18. Is ‘GROUP emp_id>2


‘ORDER BY’ clause. ? all rows whose total
(C) Filter out
Yes
(A) emp_id below 2 & Selecting those

(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
-

conjunction with the ...........0. to group unit ?


the result-set by one or more columns.
3
(A) “Table
(A) Wildcards
:
B) Aggregate functions (B) Type

© Date functions (C) Trigger


©) Joins
(D) Package
OYE A transaction involves single SQL
Which of the following is the correct
statement is known as :
26.

(A) Simple Query Transaction syntax for creating an explicit cursor ?

(B) Single Query Transaction (A) CURSOR cursor_name IS select

(C) Unique Query Transaction statement;


(D) None of above CURSOR
(B) CREATE cursor—name

25% In a sql dibaten, whith operator is used IS select_statement;

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

27 Which keyword is used instead of the


{ 24. Which of the following executes the
assignment operator to initialize
query and identifies the result set,

consisting of all rows that meet the query _


variables ?

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

using :. existing relation use


:
(A) Create datatype (A) Create table

@) Create data
(B) Modify table

‘(C) Alter table


(C) Create definettype

(D) Create type


(D) Drop 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) UPDATE Query cursors with great care.

(C) Iniplicit cursors are used in cursor


30. What is true about indexes ?
for loops to handle data preceeing
(A) Index leads to enhance the
(D) Implicit cursors are no longer a
performance even if the table is
feature in Oracle.
being updated so frequently.
33.- Which of the following is the correct.
B) It makes harder for SQL Server
order of occurrence in a typical SQL
engine to work on indexes which
statement ?
have slange key.
(A) select, group by, where, having
(C) It doesn’t make harder for SQL
(B) select, where, having, group
Server engine to work on indexes byselect, having where, group by
,

which have large key.


(C) select, having, where, group by

(D) None
of the above (D) select, where, group by, having

Code : 615426 (6)


34. Which of the following statement(s) 35. Which of the Order by query is correct
is/are true for UPDATE in SQL ? one ?

(1) You can update only single table


(A) SELECT * FROM Table Order By
using UPDATE command
Column;
(2) You can update multiple tables
using UPDATE command
(B) SELECT * FROM Table Order By
(3) In UPDATE command, you must Column ASC;
"list what columns to update with
their new values (separated by (C) SELECT * FROM Table Order By

commas). Column DESC;

()
(4) To update multiple targeted
Allof the above
records, you need to specify
f

‘UPDATE command ‘using the

WHEREclause.

(A) (1), @) and (4) .

(B) (2); G) and @)

(C) G)and @)
(D) (1) only

Code : 615426 (7)

You might also like