Professional Documents
Culture Documents
DMS4 231110 202858
DMS4 231110 202858
Micro Project
Report on
Submitted by
MR. Abak Sahil Sunil
(2111710069)
Guided By
Prof. Bhad S.A
1
MAHARASHTRA STATE BOARD OF TECHNICAL
EDUCATION,MUMBAI.
CERTIFICATE
This is to certify that Mr.Abak Sahil Sunil satisfactorily carried out the
investigation/experimentation and micro project work entitled “Describe View,
Sequence, Function And Procedure”.
This work is being submitted for the award of diploma in Computer
Engineering. It is submitted in the partial fulfillment of the prescribed
Syllabus M.S.B.T.E Mumbai. For the academic year 2022-2023.
2
Evalution Sheet For Micro Project: -
Academic Year:-2022-2023 Sub & Sub Code:-DMS(22316)
Semester: - 3rd
Pos:-
Cos:-
Roll no Name Of Student Marks Out of ( Marks Out of #( Total Marks out
)For performance )For of( )
in group activity performance in
oral
presentation
3
Weekly Progress Report
4
Group Details:-
5
Index
1. Introduction
3. What Is Sequence,Sequence 8
Syntax & Example
4. What Is Function,Function 9
Syntax & Example
5. What Is Procedure 11
6. Conclusion 14
6
Views In DBMS
A view is a virtual table that consists of columns from one or more tables.
A virtual table is like a table containing fields but it does not contain any data.
In run time it contains the data and after that it gets free. But table stores the
data in database occupy some space.
Just like table, view contains Rows and Columns which is fully virtual based
table.
Views are usually virtual and do not occupy space in systems.
Views can be used as security mechanism
There is no record in the view it only holds the definition of table and fetches
data from the table and shows it.
We can create a view by selecting fields from one or more tables present in the
database.
A View can either have all the rows of a table or specific rows based on certain
condition.
Example
7
Sequence:-
Syntax:
8
Example:-
Following is the sequence query creating sequence in ascending order.
Function:-
9
BEGIN
< function_body >
END [function_name];
•
• PL/SQL Drop Function
Functions Drop Syntax
DROP FUNCTION function_name;
DROP FUNCTION adder;
return number
is
n3 number(8);
begin
n3 :=n1+n2;
return n3;
end;
/
10
Now write another program to call the function
DECLARE
n3 number(2);
• BEGIN
n3 := adder(11,22);
dbms_output.put_line('Addition is: ' || n3);
END;
/
Output:-
Addition is: 33
Statement processed
11
Procedures:-
• Header:- The header contains the name of the procedure and the parameters
or variables passed to the procedure.
Procedure Example:-
• In this example, we are going to insert record in user table. So you need to
create user table first.
• create table user(id number(10) primary key,name varchar2(100));
• Now write the procedure code to insert record in user table.
Procedure Code:
create or replace procedure "INSERTUSER"
(id IN NUMBER,name IN VARCHAR2)
is
begin
insert into user values(id,name);
12
end; /
• Output:-
Procedure created.
13
Conclusion
It was a great experience to design and implement the Describe View, Sequence,
Function, Procedure. System by using Database Mangement System and to work on its
documentation.While working on this project,we have learned many things especially
how to apply the concepts of Database Mangement System paradigm in modelling of
real world systems.
14