0% found this document useful (0 votes)
13 views11 pages

DMS Microproject

The document discusses different conditional statements in PL/SQL like if-then-else, while loops, and case statements. It provides an overview of control structures in PL/SQL and describes the syntax and usage of if-then-else statements, relational operators, and while loops. The project aims to help students understand how to write PL/SQL programs using these decision-making statements.

Uploaded by

Atharv Khadatare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views11 pages

DMS Microproject

The document discusses different conditional statements in PL/SQL like if-then-else, while loops, and case statements. It provides an overview of control structures in PL/SQL and describes the syntax and usage of if-then-else statements, relational operators, and while loops. The project aims to help students understand how to write PL/SQL programs using these decision-making statements.

Uploaded by

Atharv Khadatare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

A

Micro project report On

“Execute PL/SQL Program using different conditional statement


(if else, for /while) ”
SUBMITTED TO M.S.B.T.E., Mumbai

For the Award of


DIPLOMA COMPUTER ENGINEERING BY

Roll no Name of Student Enrollment no


Atharv Maruti Khadatare 2212140111
Anand Digambar Ukirde 2212140236
Laxman Nagnath Khandekar 2212140131
Shrijeet Sharad Kashid 2212140234

UNDER THE GUIDANCE OF

DEPARTMENT OF COMPUTER ENGINEERING


NBA ACCREDIATED

SVP’s Swami Vivekanand Institute Of Technology (Polytechnic), Solapur


Solapur - 413255
2023-24
AFFILIATED TO

M.S.B.T.E.
Evolution sheet for Micro Project

Academic Year:- 2023-24 Name of Faculty:-


Course:- Computer Engineering Course code:- CO3I
Subject:- Database Management System Subject Code:- 22319
Semester:- 3 Scheme:- I

Title of Project:- Execute PL/SQL Program using different conditional statement


(if else, for /while)
COs addressed by the Micro Project:

CO 3 Write PL/SQL code for given database.


Major learning outcomes achieved by student by doing this project

Practical
Outcomes Write PL/SQL programs using if then else,for,while and nested loop.

Unit Outcomes in
Cognitive Domain Write simple PL/SQL code using control structure and handle various
exceptions in given situation.

Outcomes in
Affective Domain Follow proper syntax to create and implement the PL/SQL programs.

Comments/Suggestions about team work/leadership/inter-personal communication (if any)

Marks out of 4
Marks out of 6 Total
for
for mars
Roll No Name of students performance
performance in out
in oral/
group activity of 10
Presentation

Atharv Maruti Khadatare 2212140111


Anand Digambar Ukirade 2212140236
Laxman Nagnath Khandekar 2212140131
Shrijeet Sharad Kashid 2212140234

Name and
Signature of
faculty
SVP’s SWAMI VIVEKANAND INSTITUTE OF TECHNOLOGY(POLY), SOLAPUR

CERTIFICATE

This is to certify that the Project report entitled


“Execute PL/SQL Program using different
conditional statement
(if else, for /while) ”
Submitted by
Roll no Name of Student Enrollment no
Atharv Maruti Khadatare 2212140111
Anand Digambar Ukirde 2212140236
Laxman Nagnath Khandekar 2212140131
Shrijeet Sharad Kashid 2212140234

is a bonafide work carried out by above students, under the guidance of………………….. and it is
submitted towards the fulfillment of requirement of MSBTE, Mumbai for the award of Diploma in
Computer Engineering at SVP’s COE (Polytechnic), Solapur during the academic year 2023-24.

Guide

HOD Principal
Place: Solapur

Date: / /

INDEX

Sr.No. Title
1. Acknowledgement
2. Introduction
3. Description
4. Type Of Operator
5. Overview of PL/SQL Control Structures
6. Description Of Control Structure
7. Testing Conditions (IF and CASE Statements)
8. Relational Operator
9. IF-THEN-ELSE Statement
10. While loop Statement
11. Conclusion
12. References
Acknowledgement
“Execute PL/SQL Program using different conditional statement (if else,
for /while)” has been developed successfully with a great contribution of two students in a
period of two months. We like to appreciate their guidance, encouragement and willingness
since without their support the project would not have been a success. We would like to give
our heartfelt gratitude to Principal………………… , Guide & HOD ………………… who
is the supervisor of our project for helping and encouraging us in many ways to make our
project a success. We would never been able to finish our work without great support and
enthusiasm from friends and support from our family. We would like to thank the department
of Computer Engineering, for giving us permission to initiate this project and successfully
finish it.
Introduction:-

They’re come situation in real life when we need to make some


decision and based ob these decisions we decide that should we do
next. Similar situation arises in programming also where we need to
make some decision, we will execute the next book of code.

1. if then else statement.

2.if then statement.

3.Nested if then statement.

4.if then-else-then-else ladder.

The project skill will help the student will understand the pl/sql
statement to retrive the needed information about the table as per their
specified condition og that the desion making statement….

Resources Used:-

Sr. No. Remark


1 As per requirement
2 As per requirement
3 As per requirement

DESCRPTION
TYPE OF OPREATOR

• OVERVIEW OF PL/SQL CONTROL .

• Testing Conditions: IF and CASE Statements .

• Controlling loop iteration; loop and EXIT statement.

• Sequential control: GOTO and NULL statement.

Overview of PL/SQL Control Structures:-


Procedural computer programs use the basic control structures shown
in Figure .

Description Of Control Structure


The selection structure tests a condition, then executes one sequence of statements instead of
another, depending on whether the condition is true or false. A condition is any variable or
expression that returns a BOOLEAN value. The iteration structure executes a sequence of
statements repeatedly as long as a condition holds true. The sequence structure simply
executes a sequence of statements in the order in which they occur.

Testing Conditions (IF and CASE Statements)


The IF statement executes a sequence of statements depending on the value of a condition.
There are three forms of IF statements: IFTHEN, IF-THEN-ELSE, and IF-THEN-ELSIF. For
a description of the syntax of the IF statement, see IF Statement.

The CASE statement is a compact way to evaluate a single condition and choose between
many alternative actions. It makes sense to use CASE when there are three or more
alternatives to choose from. For a description of the syntax of the CASE statement, see CASE
Statement.

Relational Operator:-
The following table shows all the relational operators supported by C language. Assume
variable A holds 10 and variable B holds 20 then:-
IF-THEN-ELSE Statement:-
• The IF-THEN-ELSE statement is mainly used to select between
two alternatives based on the condition.
• Below is the syntax representation of IF-THEN-ELSE statement.

Syntax for IF-THEN-ELSE Statements:

• In the above syntax, keyword 'IF' will be followed by a condition which evaluates to
'TRUE'/'FALSE'.
• The control will execute the <action_block1> only if the condition returns <TRUE>.
• In case of condition evaluates to <FALSE> then, SQL will execute <action_block2>.
• In any case, one of the two action blocks will be executed.
Note: Whenever condition evaluates to 'NULL', then SQL will treat 'NULL' as 'FALSE'.In this
example, we are going to print message whether the given number is odd or even.

Code Explanation:
• Code line 2: Declaring the variable 'a' as 'NUMBER' data type and initializing it with value '11'.
• Code line 4: Printing the statement "Program started".
• Code line 5: Checking the condition, whether modulus of variable 'a' by '2' is 0.
• Code line 6: If '0', then "a is even number" will be printed.
• Code line 7: If the modulus value is not equal to '0', then the condition returns <FALSE>, so the message "a
is odd number" will be printed.
• Code line10: Printing the statement "Program completed".

While loop Statement:-


WHILE loop statement works similar to the Basic loop statement except the EXIT condition is
at the very beginning of the loop.

It works like an entry-check loop in which execution block will not even be executed once if
the condition is not satisfied, as the exit condition is checking before execution part. It does
not require keyword 'EXIT' explicitly to exit from the loop since it is validating the condition
implicitly each time of the loop.
Syntax:-

Syntax Explanation:
• In the above syntax, keyword 'WHILE' marks beginning of the loop and 'END LOOP' marks
the end of the loop.
• EXIT condition is evaluated each time before the execution part is starting executing.
• The execution block contains all the code that needs to be executed.
• The execution part can contain any execution statement.

Code Explanation:

• Code line 2: Declaring the variable 'a' as 'NUMBER' data type and initializing it with value
'1'.
• Code line 4: Printing the statement "Program started".
• Code line 5: Keyword 'WHILE' marks the beginning of the loop, and it also checks whether
the value of 'a' is less than or equal to 5.
• Code line 7: Prints the value of 'a'.
• Code line 8: Increments the value of 'a' by +1.
• Code line 9: Keyword 'END LOOP' marks the end of execution block.
• The code from line 7 and line 8 will continue to execute till 'a' reaches the value 6, as the
condition will return TRUE, and the control will EXIT from the loop.
• Code line 10: Printing the statement "Program completed".
Conclusion:-

1. Conditional selection statements, which run different statements for different data values.

2. Loop statements, which run the same statements with a series of different data values.

3. The EXIT statement transfers control to the end of a loop. The CONTINUE statement .

4. exits the current iteration of a loop and transfers control to the next iteration. Both EXIT
and CONTINUE have an optional WHEN clause, where you can specify a condition.

5. Sequential control statements, which are not crucial to PL/SQL programming.

References:-
1. PL/SQL Control Statements (oracle.com) .

2.Oracle PL/SQL WHILE LOOP with Example (guru99.com) .

You might also like