0 ratings 0% found this document useful (0 votes) 35 views 26 pages RDBMS Assignments
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Save RDBMS Assignments For Later S. S. V. P. Sanstha’
Late Karmveer Dr. P. R. Ghogrey Science College, Dhule
Department of Computer Science
Practical Assigment Sheet
Roll No.__41Q _ Name: _Bnanse [alit Ganesh
Name of Assignement : JO_cxeate one ors cme table with
Follountng _ongtyaints fn _odditian to The
fiwst two constraints
+ Postgre SPL Create database Using Admin
® To Create q database in Pyfdmin, we ave going to follow
te below steps:
Stepi:- Firstly, we will open the pgAdmin in our local system
and then in te Obct tree , we will right -click
on the Patabases and Create —> Database
Step2% After mat tne create database window will epen
Where we nea to provide some necessary details
(Database name, Comment) for creating a database and
Then Click on the save:
©
Step 3 the Database 5 created and display in object tree
as we Can see fn the Pdmin Window
step4- And the vight-hand side window will qive us to the
€QL which is used to Create the Potabase as we can
Remark Complete / Incomplete
Practical InchargeS. S. V. P. Sanstha’s
Late Karmveer Dr. P. R. Ghogrey Science College, Dhule
Department of Computer Science
Practical Assigment Sheet
Roll No. Name :
Name of Assignement ; Ta_duap a table alter schema of a table,
Fs , Fe
Previous Assignments (use simple forms of insert/update/delere
statements)
4 Drop Database RyAdmin
Step1*
PFivstly, we will open The pgfAdmin in our local systems.
iSelect the datatase Cdotabase_narre) by left-Click on it:
ii) Then Right-Click on The databasesname
iv) After That, Click on Delete/dvop option from the
given dropdown list to delete tne database
Step2=- Once we Click on the Delete/prop option , ane
confivmation pop-up will appeay on the screen,
where are click on the YES button to drop
The database
> 4 Surtax for inserting records in table :-
St INSERT INTO TABLE NAHE Ccolumnt,Column2, Column’,
_...ColumnN) VALUES Cvaluet, value2, valued---. Valuen);
# Suntan for updating“ recovds © in” table
UPDATE table—name
SET columni= value,
column2 = value2...,
ColumnNn = Value N
WHERE conditions Remark Complete / Incomplete
Practical InchargeS.S.V.P. o e
open Late Karmveer nv oe YP Sanstha’s 3
Bediotatemen: WUeingM! hag cocte. Rmetion
SELEcT * countc*) FROM Public.“ StudentInfo”
inet elites: seottta rou pvaN® Pocatrareoe Rol No”
Ho “FivstNome”, “LastName”
ROER BY *Rollno’ ASC”
Rellno |Fistiime [Urstione | Hovis [Lscatfon] Count |
| |
2 Heewnin Tom | 34 fpmile} ree
2 Ldiptesh} | LPaci!} | 95 peers |
3 | tualit} | 4 Movatre;| 96 eer W )
4 | {Naina} | Spkadey | 98 Dhule 4
| 5 | {Shubhorgi {Patil} aS [nv iendale| e
| & | £Prasadj | { Kale} 7s poeieS Ee
| T | {vikrant} {Potdaxy | 80 pe 3 :
8 | {Penwini}| 60 GROUP BY “Lecation”?
[ Location | Count
[2 [iwimanles
eo { phule§
3 | {Deopur}
DsS. S. V. P. Sanstha’s
Late Karmveer Dr. P. R. Ghogrey Science College, Dhule
Department of Computer Science
Practical Assigment Sheet
Roll No.
Name:
INemeGrAssipnement > =e
+ This will
create a Getinfo Function which
‘he total
will find
Beaten? students who inave) Som ies
m@edat given vange-
Greate function GetIn fol MarksFrom int, MarksTo int)
returns tat
language elpasa!
as
}$
Declare
parksCount integew
Begin
select MarksC*)
Into NavkSCount
for
focom Maks
where Marks between MarkSfrom and Marks Te
eee tauren Marks Count
End’
$b)
> This
will call Our getInfo function
SELECT public getinfo € 90,400). Complete / Incomplete
Practical Inchargename
\J-name