0% found this document useful (0 votes)
50 views6 pages

ADBMS Assignment Final

This document contains questions related to SQL and NoSQL databases. For SQL, it includes questions about creating tables, inserting data, using functions and procedures in Microsoft SQL Server and Oracle. For NoSQL, it asks about MongoDB collections and documents, as well as queries involving distance and airport fields. It also contains questions about mobile databases and SQLite, including creating tables, inserting and selecting data, and triggers.

Uploaded by

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

ADBMS Assignment Final

This document contains questions related to SQL and NoSQL databases. For SQL, it includes questions about creating tables, inserting data, using functions and procedures in Microsoft SQL Server and Oracle. For NoSQL, it asks about MongoDB collections and documents, as well as queries involving distance and airport fields. It also contains questions about mobile databases and SQLite, including creating tables, inserting and selecting data, and triggers.

Uploaded by

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

ADBMS Assignment 03 / 06 / 2020

Question 1(MSSQL)
Student
StNo StName Address

Enrol
StNo CourseNo DateEnrol Marks

Course
CourseNo CourseName Credit

1. Create tables and insert 2 rows to all tables.


2. Select all the students who follow IT course.
3. Select addresses of students whose name start with ‘S.
4. Create a function to return the credits when the course no given as parameters.
5. Create a procedure to display the Student number, Course Name, Date Enroll and marks of
all enrolled students.
6. Create a another table called deletedCourses. Develop a trigger on the course table and it
should send all details to deletedCourses table when user delete a course.

Question 2 (Oracle)
1. Write a PL / SQL code to insert four records given below into the two tables
EMP_SALARY_GET10000 and EMP_SALARY_LTE10000 according to the
following criteria.
Criteria: - When inserting into EMP_SALARY_GET10000 table, it should contain records with
salary greater than or equal to 10,000. When inserting data into EMP_SALARY_LTE10000
table, it should contain records with salary less than 10,000.
EMP_NAME EMP_NO SALARY MANAGER
BBB 1000 25000 AAA
XXX 1001 10000 BBB
YYY 1002 10000 BBB
ZZZ 1003 7500 BBB

2. Write a PL / SQL procedure to get Student ID and Student Name of the student who
obtained the highest marks. Use the following table structure.
Table Name: Student
Columns: StudentID, StudentFName, StudenLName, DOB, Marks
3. What are the differences between Functions and a Procedures?

Question 3 (Oracle)
Question 4
Part 1
1. Describe what a NoSQL database is. What are the advantages and disadvantages of
NoSQL database?
2. Explain the Collections and Documents in MongoDB
3. Write a Insert statement to save given below flight details.
[
{
"departureAirport": "MUC",
"arrivalAirport": "SFO",
"aircraft": "Airbus A380",
"distance": 12000,
"intercontinental": true
},
{
"departureAirport": "LHR",
"arrivalAirport": "TXL",
"aircraft": "Airbus A320",
"distance": 950,
"intercontinental": false
}
]

4. Write a NoSQL query to retrieve the flight details where the distance is grater that 10,000
and depature air port equal to “MCU”
5. Write a NoSQL query to delete all the information where aircraft = “Airbus A320” from
your table.

Part 2
Question 5
Part 1

1. What is a mobile database (give four main points that describes a mobile database)?

2. What are the available mobile database types?

3. What are the key features of the SQLite mobile database

4. How do you view the database and tables in your SQLite database server.

5. What is the different between LIKE clause and BLOG clause in SQLite?

6. In the customer table given below you have to retrieve 4 records and it should start where
CustomerID = 3. Write a SQLite query to perform the task.

Part 2

1. Create the below tables.


Emp (eid,ename,address)
Project(eid,did,Name)
Dept(did,dname,location)

2. Insert records to the above table.


3. Select all empoyees who are in Colombo.
4. Select all the employees whose name starts with S.
5. Select all employee name who belongs to the same city of department.
6. Select all the employees who work in IT department.
7. Select employee name, department name and Name of all employees.
8. When user delete an employee from the table. All the details should sent to
the ‘Employee_Details’ table.

EmpID,EName,Address

You might also like