SlideShare a Scribd company logo
1 of 19
Download to read offline
Advanced DBMS
(Assignment –II)
Submitted in partial fulfilment of the requirements for the degree of
Master of Technology in Information Technology
by
Vijayananda D Mohire
(Enrolment No.921DMTE0113)
Information Technology Department
Karnataka State Open University
Manasagangotri, Mysore – 570006
Karnataka, India
(2009)
2
3
Advanced DBMS
4
CERTIFICATE
This is to certify that the Assignment-II entitled (Advanced DBMS,
subject code: MT14) submitted by Vijayananda D Mohire having Roll
Number 921DMTE0113 for the partial fulfilment of the requirements of
Master of Technology in Information Technology degree of Karnataka
State Open University, Mysore, embodies the bonafide work done by
him under my supervision.
Place: ________________ Signature of the Internal Supervisor
Name
Date: ________________ Designation
5
For Evaluation
Question
Number
Maximum Marks Marks
awarded
Comments, if any
1 5
2 5
TOTAL 10
Evaluator’s Name and Signature Date
6
Preface
This document has been prepared specially for the assignments of M.Tech – IT I
Semester. This is mainly intended for evaluation of assignment of the academic
M.Tech - IT, I semester. I have made a sincere attempt to gather and study the
best answers to the assignment questions and have attempted the responses to
the questions. I am confident that the evaluator’s will find this submission
informative and evaluate based on the provide content.
For clarity and ease of use there is a Table of contents and Evaluators section to
make easier navigation and recording of the marks. A list of references has been
provided in the last page – Bibliography that provides the source of information
both internal and external. Evaluator’s are welcome to provide the necessary
comments against each response, suitable space has been provided at the end of
each response.
I am grateful to the Infysys academy, Koramangala, Bangalore in making this a big
success. Many thanks for the timely help and attention in making this possible
within specified timeframe. Special thanks to Mr. Vivek and Mr. Prakash for their
timely help and guidance.
Candidate’s Name and Signature Date
7
TABLE OF CONTENTS
FOR EVALUATION................................................................................................................................................................5
PREFACE...............................................................................................................................................................................6
QUESTION 1...................................................................................................................................................................... 10
ANSWER 1......................................................................................................................................................................... 10
QUESTION 2...................................................................................................................................................................... 15
ANSWER 2......................................................................................................................................................................... 15
BIBLIOGRAPHY.................................................................................................................................................................. 19
8
Table of Figures
Figure 1 Student Table created (Oracle, 2009)................................................................................................................11
Figure 2 Student Table populated (Oracle, 2009).........................................................................................................12
Figure 3 Select Statement (Oracle, 2009) .........................................................................................................................12
Figure 4 DML Command : Update (Oracle, 2009)..........................................................................................................13
Figure 5 DML Command: Select (Oracle, 2009)............................................................................................................13
Figure 6 DDL Command: Alter (Oracle, 2009) ................................................................................................................13
Figure 7 TCL Command : SAVE and ROLLBACK (Oracle, 2009) ..........................................................................14
Figure 8 Sailor Table created and populated (Oracle, 2009)..................................................................................16
Figure 9 Boat Table created and populated (Oracle, 2009)....................................................................................17
Figure 10 Reservers table created and populated (Oracle, 2009)......................................................................18
Figure 11 Left Join condition for Sailor and Reservers (Oracle, 2009)..............................................................18
9
ADVANCED DBMS
RESPONSE TO ASSIGNMENT – II
10
Question 1 Make a table using Oracle, SQL and made five entries and run five different
commands.
Answer 1
CREATE TABLE "STUDENTS"
( "STUDENTID" NUMBER NOT NULL ENABLE,
"STUDENTNAME" VARCHAR2(4000) NOT NULL ENABLE,
"STUDENTAGE" NUMBER,
"STUDENTCLASS" VARCHAR2(4000),
"STUDENTGPA" FLOAT,
"STUDENTDOJ" DATE,
"STUDENTMOBILE" NUMBER,
CONSTRAINT "STUDENTS_PK" PRIMARY KEY ("STUDENTID", "STUDENTNAME")
ENABLE,
CONSTRAINT "STUDENTS_UK1" UNIQUE ("STUDENTID") ENABLE
)
/
Figure below shows Table structure( After running CREATE) as in Oracle 10g Express Edition
11
Figure 1 Student Table created (Oracle, 2009)
INSERT
INTO STUDENTS (STUDENTID,
STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT
MOBILE)
VALUES (001, 'Maya', 24, 'B.Tech', 3, '15-JAN-2009', 9342567);
INSERT
INTO STUDENTS (STUDENTID,
STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT
MOBILE)
VALUES (002, 'Sara', 25, 'B.Tech', 4, '15-JAN-2009', 1344567);
INSERT INTO STUDENTS (STUDENTID,
STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT
MOBILE)
VALUES (003, 'Vijay', 29, 'B.Tech', 4, '10-JAN-2009', 98345678);
INSERT INTO STUDENTS (STUDENTID,
STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT
MOBILE)
VALUES (004, 'Ajay', 24, 'B.Tech', 3, '20-JAN-2009', 23456788);
INSERT INTO STUDENTS (STUDENTID,
STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT
12
MOBILE)
VALUES (005, 'William', 24, 'B.Tech', 3.5, '10-JAN-2009', 1123456);
Figure below shows Table data ( After running 5 INSERT statement) as in Oracle 10g Express
Edition Object Browser
Figure 2 Student Table populated (Oracle, 2009)
-----
SELECT STUDENTID, STUDENTNAME, STUDENTGPA FROM STUDENTS WHERE STUDENTGPA
> 3;
Figure 3 Select Statement (Oracle, 2009)
Five different commands:
Command 1) – DML type
UPDATE Students S
SET S.StudentMobile = 234561234
WHERE S.StudentID = 1
13
Figure 4 DML Command : Update (Oracle, 2009)
Command 2) – DML type
SELECT COUNT(*) FROM Students WHERE StudentDoj >= '15-JAN-09';
Figure 5 DML Command: Select (Oracle, 2009)
Command 3) DDL type
alter table
Students
add
ProjGuide varchar2(10);
Figure 6 DDL Command: Alter (Oracle, 2009)
Command 4) DCL type
grant select on Students to public;
14
Command 5) TCL type
DECLARE
v_mob Students.StudentMobile%TYPE;
BEGIN
SAVEPOINT A;
UPDATE STUDENTS SET STUDENTMOBILE= 12377760 WHERE STUDENTID= 2;
SELECT STUDENTMOBILE INTO v_mob FROM Students WHERE Studentid = 2;
DBMS_OUTPUT.PUT_LINE('Mobile updated to ' || v_mob);
SAVEPOINT B;
ROLLBACK TO A;
SELECT STUDENTMOBILE INTO v_mob FROM Students WHERE Studentid = 2;
DBMS_OUTPUT.PUT_LINE('Mobile rolled back to ' || v_mob);
COMMIT;
END
SELECT * FROM Students;
Output:
Mobile updated to 12377760
Mobile rolled back to 1344567
Statement processed.
Figure 7 TCL Command : SAVE and ROLLBACK (Oracle, 2009)
Evaluator’s Comments if any:
15
Question 2 Apply the join operation on the two different tables?
Answer 2
CREATE TABLE "SAILORS"
( "SAILORID" NUMBER NOT NULL ENABLE,
"SAILORNAME" CHAR(100),
"RATING" NUMBER,
"AGE" NUMBER
)
/
CREATE TABLE "BOATS"
( "BOATID" NUMBER,
"BOATNAME" VARCHAR2(4000),
"BOATCOLOR" VARCHAR2(4000)
)
/
CREATE TABLE "RESERVERS"
( "SAILORID" NUMBER NOT NULL ENABLE,
"BOATID" NUMBER NOT NULL ENABLE,
"BOOKINGDATE" DATE
)
/
INSERT
INTO Sailors (SAILORID, SAILORNAME, RATING, AGE)
VALUES (1, 'Smith', 1, 32);
INSERT
INTO Sailors (SAILORID, SAILORNAME, RATING, AGE)
VALUES (2, 'John', 2, 30);
16
INSERT
INTO Sailors (SAILORID, SAILORNAME, RATING, AGE)
VALUES (3, 'Joe', 1, 25);
INSERT
INTO Sailors (SAILORID, SAILORNAME, RATING, AGE)
VALUES (4, 'Vivek', 2, 30);
INSERT
INTO Sailors (SAILORID, SAILORNAME, RATING, AGE)
VALUES (5, 'Paul', 4,32);
select * from sailors order by sailorid;
Figure 8 Sailor Table created and populated (Oracle, 2009)
INSERT
INTO Boats (BOATID, BOATNAME, BOATCOLOR)
VALUES (1, 'Coaster', 'White');
INSERT
INTO Boats (BOATID, BOATNAME, BOATCOLOR)
VALUES (2, 'Lunar', 'Grey');
INSERT
INTO Boats (BOATID, BOATNAME, BOATCOLOR)
VALUES (3, 'Pitty', 'Green');
INSERT
INTO Boats (BOATID, BOATNAME, BOATCOLOR)
VALUES (4, 'Salmon', 'Blue');
INSERT
INTO Boats (BOATID, BOATNAME, BOATCOLOR)
VALUES (5, 'Hound', 'Black');
17
select * from Boats order by boatid;
Figure 9 Boat Table created and populated (Oracle, 2009)
INSERT
INTO reservers (SAILORID, BOATID, BOOKINGDATE)
VALUES (1, 1, '16-JAN-2009');
INSERT
INTO reservers (SAILORID, BOATID, BOOKINGDATE)
VALUES (2, 1, '16-JAN-2009');
INSERT
INTO reservers (SAILORID, BOATID, BOOKINGDATE)
VALUES (3, 2, '17-JAN-2009');
INSERT
INTO reservers (SAILORID, BOATID, BOOKINGDATE)
VALUES (4, 2, '17-JAN-2009');
INSERT
INTO reservers (SAILORID, BOATID, BOOKINGDATE)
VALUES (5, 3, '16-JAN-2009');
INSERT
INTO reservers (SAILORID, BOATID, BOOKINGDATE)
VALUES (5, 4, '17-JAN-2009');
INSERT
INTO reservers (SAILORID, BOATID, BOOKINGDATE)
VALUES (5, 3, '18-JAN-2009');
INSERT
INTO reservers (SAILORID, BOATID, BOOKINGDATE)
18
VALUES (1, 3, '18-JAN-2009');
select * from reservers order by sailorid;
Figure 10 Reservers table created and populated (Oracle, 2009)
SELECT sailorid, boatid
FROM Sailors NATURAL LEFT OUTER JOIN Reservers order by sailorid;
Figure 11 Left Join condition for Sailor and Reservers (Oracle, 2009)
NOTE: Sailor 3 is missing in above as it is a Left Outer Join and Sailors table is on the Left
side of the Join and it does not have sailor 3.
Evaluator’s Comments if any:
19
Bibliography
Oracle. (2009). Oracle Database 10g Express edition. California, USA.

More Related Content

Viewers also liked

Programmatic queries: things you can code with sql
Programmatic queries: things you can code with sqlProgrammatic queries: things you can code with sql
Programmatic queries: things you can code with sqlShlomi Noach
 
Emerging database technology multimedia database
Emerging database technology   multimedia databaseEmerging database technology   multimedia database
Emerging database technology multimedia databaseSalama Al Busaidi
 
Advanced Database Lecture Notes
Advanced Database Lecture NotesAdvanced Database Lecture Notes
Advanced Database Lecture NotesJasour Obeidat
 

Viewers also liked (6)

Programmatic queries: things you can code with sql
Programmatic queries: things you can code with sqlProgrammatic queries: things you can code with sql
Programmatic queries: things you can code with sql
 
Percona Lucid Db
Percona Lucid DbPercona Lucid Db
Percona Lucid Db
 
Emerging database technology multimedia database
Emerging database technology   multimedia databaseEmerging database technology   multimedia database
Emerging database technology multimedia database
 
Advanced DBMS presentation
Advanced DBMS presentationAdvanced DBMS presentation
Advanced DBMS presentation
 
Distributed dbms
Distributed dbmsDistributed dbms
Distributed dbms
 
Advanced Database Lecture Notes
Advanced Database Lecture NotesAdvanced Database Lecture Notes
Advanced Database Lecture Notes
 

Similar to MTech - Advanced_DBMS_Assignment

MTech - Algorithm analysis and design assignment
MTech - Algorithm analysis and design assignment MTech - Algorithm analysis and design assignment
MTech - Algorithm analysis and design assignment Vijayananda Mohire
 
M.Tech : Advanced DBMS Assignment I
M.Tech : Advanced DBMS Assignment IM.Tech : Advanced DBMS Assignment I
M.Tech : Advanced DBMS Assignment IVijayananda Mohire
 
M.Tech : Interactive Computer Graphics Assignment II
M.Tech : Interactive Computer Graphics Assignment IIM.Tech : Interactive Computer Graphics Assignment II
M.Tech : Interactive Computer Graphics Assignment IIVijayananda Mohire
 
M.Tech : Interactive Computer Graphics Assignment I
M.Tech : Interactive Computer Graphics Assignment I M.Tech : Interactive Computer Graphics Assignment I
M.Tech : Interactive Computer Graphics Assignment I Vijayananda Mohire
 
Marine structures computations report
Marine structures computations reportMarine structures computations report
Marine structures computations reportChinmay Korgaonkar
 
MTech - AI_NeuralNetworks_Assignment
MTech - AI_NeuralNetworks_AssignmentMTech - AI_NeuralNetworks_Assignment
MTech - AI_NeuralNetworks_AssignmentVijayananda Mohire
 
jain university Project Report
jain university Project Reportjain university Project Report
jain university Project ReportSukesh Shetty
 
Project.12
Project.12Project.12
Project.12GS Kosta
 
Presentation on Best Faculty Award 2016 - R.D.Sivakumar
Presentation on Best Faculty Award 2016 - R.D.SivakumarPresentation on Best Faculty Award 2016 - R.D.Sivakumar
Presentation on Best Faculty Award 2016 - R.D.SivakumarSivakumar R D .
 
Sample Report Format
Sample Report FormatSample Report Format
Sample Report Formatvikram singh
 
Training_report23155.ppt
Training_report23155.pptTraining_report23155.ppt
Training_report23155.pptsatyam537911
 
Sri-PRJ702- Project Report
Sri-PRJ702- Project ReportSri-PRJ702- Project Report
Sri-PRJ702- Project Reportsrirekha kurra
 
Post of Executive engineer etc
Post of Executive engineer etcPost of Executive engineer etc
Post of Executive engineer etcalokdixit7
 
Kaahwa armstrong intern report
Kaahwa armstrong intern reportKaahwa armstrong intern report
Kaahwa armstrong intern reportkaahwa Armstrong
 

Similar to MTech - Advanced_DBMS_Assignment (20)

MTech - Algorithm analysis and design assignment
MTech - Algorithm analysis and design assignment MTech - Algorithm analysis and design assignment
MTech - Algorithm analysis and design assignment
 
M.Tech : Advanced DBMS Assignment I
M.Tech : Advanced DBMS Assignment IM.Tech : Advanced DBMS Assignment I
M.Tech : Advanced DBMS Assignment I
 
M.Tech : Interactive Computer Graphics Assignment II
M.Tech : Interactive Computer Graphics Assignment IIM.Tech : Interactive Computer Graphics Assignment II
M.Tech : Interactive Computer Graphics Assignment II
 
MTech - OOSE_Assignment
MTech - OOSE_AssignmentMTech - OOSE_Assignment
MTech - OOSE_Assignment
 
M.Tech : Interactive Computer Graphics Assignment I
M.Tech : Interactive Computer Graphics Assignment I M.Tech : Interactive Computer Graphics Assignment I
M.Tech : Interactive Computer Graphics Assignment I
 
Marine structures computations report
Marine structures computations reportMarine structures computations report
Marine structures computations report
 
CSIR Brochure
CSIR BrochureCSIR Brochure
CSIR Brochure
 
MTech - AI_NeuralNetworks_Assignment
MTech - AI_NeuralNetworks_AssignmentMTech - AI_NeuralNetworks_Assignment
MTech - AI_NeuralNetworks_Assignment
 
Btp report final_lalit
Btp report final_lalitBtp report final_lalit
Btp report final_lalit
 
jain university Project Report
jain university Project Reportjain university Project Report
jain university Project Report
 
Project.12
Project.12Project.12
Project.12
 
Presentation on Best Faculty Award 2016 - R.D.Sivakumar
Presentation on Best Faculty Award 2016 - R.D.SivakumarPresentation on Best Faculty Award 2016 - R.D.Sivakumar
Presentation on Best Faculty Award 2016 - R.D.Sivakumar
 
Sample Report Format
Sample Report FormatSample Report Format
Sample Report Format
 
Db presn(1)
Db presn(1)Db presn(1)
Db presn(1)
 
Training_report23155.ppt
Training_report23155.pptTraining_report23155.ppt
Training_report23155.ppt
 
Gomadam Dissertation
Gomadam DissertationGomadam Dissertation
Gomadam Dissertation
 
Sri-PRJ702- Project Report
Sri-PRJ702- Project ReportSri-PRJ702- Project Report
Sri-PRJ702- Project Report
 
Training report_orginal
Training report_orginalTraining report_orginal
Training report_orginal
 
Post of Executive engineer etc
Post of Executive engineer etcPost of Executive engineer etc
Post of Executive engineer etc
 
Kaahwa armstrong intern report
Kaahwa armstrong intern reportKaahwa armstrong intern report
Kaahwa armstrong intern report
 

More from Vijayananda Mohire

Certificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on MLCertificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on MLVijayananda Mohire
 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and EngineeringVijayananda Mohire
 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and EngineeringVijayananda Mohire
 
Bhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAIBhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAIVijayananda Mohire
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIVijayananda Mohire
 
Azure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuitsAzure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuitsVijayananda Mohire
 
Key projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIKey projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIVijayananda Mohire
 
My Journey towards Artificial Intelligence
My Journey towards Artificial IntelligenceMy Journey towards Artificial Intelligence
My Journey towards Artificial IntelligenceVijayananda Mohire
 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureVijayananda Mohire
 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureVijayananda Mohire
 
Bhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud OfferingsBhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud OfferingsVijayananda Mohire
 
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical ImplicationsPractical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical ImplicationsVijayananda Mohire
 
Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)Vijayananda Mohire
 
Red Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise LinuxRed Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise LinuxVijayananda Mohire
 
Generative AI Business Transformation
Generative AI Business TransformationGenerative AI Business Transformation
Generative AI Business TransformationVijayananda Mohire
 
Microsoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohireMicrosoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohireVijayananda Mohire
 
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0Vijayananda Mohire
 
Intel Partnership - Gold Member - 2024
Intel Partnership - Gold Member - 2024Intel Partnership - Gold Member - 2024
Intel Partnership - Gold Member - 2024Vijayananda Mohire
 

More from Vijayananda Mohire (20)

Certificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on MLCertificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on ML
 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and Engineering
 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and Engineering
 
Bhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAIBhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAI
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAI
 
Azure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuitsAzure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuits
 
Key projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIKey projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AI
 
My Journey towards Artificial Intelligence
My Journey towards Artificial IntelligenceMy Journey towards Artificial Intelligence
My Journey towards Artificial Intelligence
 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for Agriculture
 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for Agriculture
 
Bhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud OfferingsBhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud Offerings
 
GitHub Copilot-vijaymohire
GitHub Copilot-vijaymohireGitHub Copilot-vijaymohire
GitHub Copilot-vijaymohire
 
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical ImplicationsPractical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
 
Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)
 
Red Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise LinuxRed Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise Linux
 
RedHat_Transcript_Jan_2024
RedHat_Transcript_Jan_2024RedHat_Transcript_Jan_2024
RedHat_Transcript_Jan_2024
 
Generative AI Business Transformation
Generative AI Business TransformationGenerative AI Business Transformation
Generative AI Business Transformation
 
Microsoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohireMicrosoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohire
 
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
 
Intel Partnership - Gold Member - 2024
Intel Partnership - Gold Member - 2024Intel Partnership - Gold Member - 2024
Intel Partnership - Gold Member - 2024
 

Recently uploaded

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 

Recently uploaded (20)

EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 

MTech - Advanced_DBMS_Assignment

  • 1. Advanced DBMS (Assignment –II) Submitted in partial fulfilment of the requirements for the degree of Master of Technology in Information Technology by Vijayananda D Mohire (Enrolment No.921DMTE0113) Information Technology Department Karnataka State Open University Manasagangotri, Mysore – 570006 Karnataka, India (2009)
  • 2. 2
  • 4. 4 CERTIFICATE This is to certify that the Assignment-II entitled (Advanced DBMS, subject code: MT14) submitted by Vijayananda D Mohire having Roll Number 921DMTE0113 for the partial fulfilment of the requirements of Master of Technology in Information Technology degree of Karnataka State Open University, Mysore, embodies the bonafide work done by him under my supervision. Place: ________________ Signature of the Internal Supervisor Name Date: ________________ Designation
  • 5. 5 For Evaluation Question Number Maximum Marks Marks awarded Comments, if any 1 5 2 5 TOTAL 10 Evaluator’s Name and Signature Date
  • 6. 6 Preface This document has been prepared specially for the assignments of M.Tech – IT I Semester. This is mainly intended for evaluation of assignment of the academic M.Tech - IT, I semester. I have made a sincere attempt to gather and study the best answers to the assignment questions and have attempted the responses to the questions. I am confident that the evaluator’s will find this submission informative and evaluate based on the provide content. For clarity and ease of use there is a Table of contents and Evaluators section to make easier navigation and recording of the marks. A list of references has been provided in the last page – Bibliography that provides the source of information both internal and external. Evaluator’s are welcome to provide the necessary comments against each response, suitable space has been provided at the end of each response. I am grateful to the Infysys academy, Koramangala, Bangalore in making this a big success. Many thanks for the timely help and attention in making this possible within specified timeframe. Special thanks to Mr. Vivek and Mr. Prakash for their timely help and guidance. Candidate’s Name and Signature Date
  • 7. 7 TABLE OF CONTENTS FOR EVALUATION................................................................................................................................................................5 PREFACE...............................................................................................................................................................................6 QUESTION 1...................................................................................................................................................................... 10 ANSWER 1......................................................................................................................................................................... 10 QUESTION 2...................................................................................................................................................................... 15 ANSWER 2......................................................................................................................................................................... 15 BIBLIOGRAPHY.................................................................................................................................................................. 19
  • 8. 8 Table of Figures Figure 1 Student Table created (Oracle, 2009)................................................................................................................11 Figure 2 Student Table populated (Oracle, 2009).........................................................................................................12 Figure 3 Select Statement (Oracle, 2009) .........................................................................................................................12 Figure 4 DML Command : Update (Oracle, 2009)..........................................................................................................13 Figure 5 DML Command: Select (Oracle, 2009)............................................................................................................13 Figure 6 DDL Command: Alter (Oracle, 2009) ................................................................................................................13 Figure 7 TCL Command : SAVE and ROLLBACK (Oracle, 2009) ..........................................................................14 Figure 8 Sailor Table created and populated (Oracle, 2009)..................................................................................16 Figure 9 Boat Table created and populated (Oracle, 2009)....................................................................................17 Figure 10 Reservers table created and populated (Oracle, 2009)......................................................................18 Figure 11 Left Join condition for Sailor and Reservers (Oracle, 2009)..............................................................18
  • 9. 9 ADVANCED DBMS RESPONSE TO ASSIGNMENT – II
  • 10. 10 Question 1 Make a table using Oracle, SQL and made five entries and run five different commands. Answer 1 CREATE TABLE "STUDENTS" ( "STUDENTID" NUMBER NOT NULL ENABLE, "STUDENTNAME" VARCHAR2(4000) NOT NULL ENABLE, "STUDENTAGE" NUMBER, "STUDENTCLASS" VARCHAR2(4000), "STUDENTGPA" FLOAT, "STUDENTDOJ" DATE, "STUDENTMOBILE" NUMBER, CONSTRAINT "STUDENTS_PK" PRIMARY KEY ("STUDENTID", "STUDENTNAME") ENABLE, CONSTRAINT "STUDENTS_UK1" UNIQUE ("STUDENTID") ENABLE ) / Figure below shows Table structure( After running CREATE) as in Oracle 10g Express Edition
  • 11. 11 Figure 1 Student Table created (Oracle, 2009) INSERT INTO STUDENTS (STUDENTID, STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT MOBILE) VALUES (001, 'Maya', 24, 'B.Tech', 3, '15-JAN-2009', 9342567); INSERT INTO STUDENTS (STUDENTID, STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT MOBILE) VALUES (002, 'Sara', 25, 'B.Tech', 4, '15-JAN-2009', 1344567); INSERT INTO STUDENTS (STUDENTID, STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT MOBILE) VALUES (003, 'Vijay', 29, 'B.Tech', 4, '10-JAN-2009', 98345678); INSERT INTO STUDENTS (STUDENTID, STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT MOBILE) VALUES (004, 'Ajay', 24, 'B.Tech', 3, '20-JAN-2009', 23456788); INSERT INTO STUDENTS (STUDENTID, STUDENTNAME,STUDENTAGE,STUDENTCLASS,STUDENTGPA,STUDENTDOJ,STUDENT
  • 12. 12 MOBILE) VALUES (005, 'William', 24, 'B.Tech', 3.5, '10-JAN-2009', 1123456); Figure below shows Table data ( After running 5 INSERT statement) as in Oracle 10g Express Edition Object Browser Figure 2 Student Table populated (Oracle, 2009) ----- SELECT STUDENTID, STUDENTNAME, STUDENTGPA FROM STUDENTS WHERE STUDENTGPA > 3; Figure 3 Select Statement (Oracle, 2009) Five different commands: Command 1) – DML type UPDATE Students S SET S.StudentMobile = 234561234 WHERE S.StudentID = 1
  • 13. 13 Figure 4 DML Command : Update (Oracle, 2009) Command 2) – DML type SELECT COUNT(*) FROM Students WHERE StudentDoj >= '15-JAN-09'; Figure 5 DML Command: Select (Oracle, 2009) Command 3) DDL type alter table Students add ProjGuide varchar2(10); Figure 6 DDL Command: Alter (Oracle, 2009) Command 4) DCL type grant select on Students to public;
  • 14. 14 Command 5) TCL type DECLARE v_mob Students.StudentMobile%TYPE; BEGIN SAVEPOINT A; UPDATE STUDENTS SET STUDENTMOBILE= 12377760 WHERE STUDENTID= 2; SELECT STUDENTMOBILE INTO v_mob FROM Students WHERE Studentid = 2; DBMS_OUTPUT.PUT_LINE('Mobile updated to ' || v_mob); SAVEPOINT B; ROLLBACK TO A; SELECT STUDENTMOBILE INTO v_mob FROM Students WHERE Studentid = 2; DBMS_OUTPUT.PUT_LINE('Mobile rolled back to ' || v_mob); COMMIT; END SELECT * FROM Students; Output: Mobile updated to 12377760 Mobile rolled back to 1344567 Statement processed. Figure 7 TCL Command : SAVE and ROLLBACK (Oracle, 2009) Evaluator’s Comments if any:
  • 15. 15 Question 2 Apply the join operation on the two different tables? Answer 2 CREATE TABLE "SAILORS" ( "SAILORID" NUMBER NOT NULL ENABLE, "SAILORNAME" CHAR(100), "RATING" NUMBER, "AGE" NUMBER ) / CREATE TABLE "BOATS" ( "BOATID" NUMBER, "BOATNAME" VARCHAR2(4000), "BOATCOLOR" VARCHAR2(4000) ) / CREATE TABLE "RESERVERS" ( "SAILORID" NUMBER NOT NULL ENABLE, "BOATID" NUMBER NOT NULL ENABLE, "BOOKINGDATE" DATE ) / INSERT INTO Sailors (SAILORID, SAILORNAME, RATING, AGE) VALUES (1, 'Smith', 1, 32); INSERT INTO Sailors (SAILORID, SAILORNAME, RATING, AGE) VALUES (2, 'John', 2, 30);
  • 16. 16 INSERT INTO Sailors (SAILORID, SAILORNAME, RATING, AGE) VALUES (3, 'Joe', 1, 25); INSERT INTO Sailors (SAILORID, SAILORNAME, RATING, AGE) VALUES (4, 'Vivek', 2, 30); INSERT INTO Sailors (SAILORID, SAILORNAME, RATING, AGE) VALUES (5, 'Paul', 4,32); select * from sailors order by sailorid; Figure 8 Sailor Table created and populated (Oracle, 2009) INSERT INTO Boats (BOATID, BOATNAME, BOATCOLOR) VALUES (1, 'Coaster', 'White'); INSERT INTO Boats (BOATID, BOATNAME, BOATCOLOR) VALUES (2, 'Lunar', 'Grey'); INSERT INTO Boats (BOATID, BOATNAME, BOATCOLOR) VALUES (3, 'Pitty', 'Green'); INSERT INTO Boats (BOATID, BOATNAME, BOATCOLOR) VALUES (4, 'Salmon', 'Blue'); INSERT INTO Boats (BOATID, BOATNAME, BOATCOLOR) VALUES (5, 'Hound', 'Black');
  • 17. 17 select * from Boats order by boatid; Figure 9 Boat Table created and populated (Oracle, 2009) INSERT INTO reservers (SAILORID, BOATID, BOOKINGDATE) VALUES (1, 1, '16-JAN-2009'); INSERT INTO reservers (SAILORID, BOATID, BOOKINGDATE) VALUES (2, 1, '16-JAN-2009'); INSERT INTO reservers (SAILORID, BOATID, BOOKINGDATE) VALUES (3, 2, '17-JAN-2009'); INSERT INTO reservers (SAILORID, BOATID, BOOKINGDATE) VALUES (4, 2, '17-JAN-2009'); INSERT INTO reservers (SAILORID, BOATID, BOOKINGDATE) VALUES (5, 3, '16-JAN-2009'); INSERT INTO reservers (SAILORID, BOATID, BOOKINGDATE) VALUES (5, 4, '17-JAN-2009'); INSERT INTO reservers (SAILORID, BOATID, BOOKINGDATE) VALUES (5, 3, '18-JAN-2009'); INSERT INTO reservers (SAILORID, BOATID, BOOKINGDATE)
  • 18. 18 VALUES (1, 3, '18-JAN-2009'); select * from reservers order by sailorid; Figure 10 Reservers table created and populated (Oracle, 2009) SELECT sailorid, boatid FROM Sailors NATURAL LEFT OUTER JOIN Reservers order by sailorid; Figure 11 Left Join condition for Sailor and Reservers (Oracle, 2009) NOTE: Sailor 3 is missing in above as it is a Left Outer Join and Sailors table is on the Left side of the Join and it does not have sailor 3. Evaluator’s Comments if any:
  • 19. 19 Bibliography Oracle. (2009). Oracle Database 10g Express edition. California, USA.