Professional Documents
Culture Documents
DBMS Summer 2020 Online Exam
DBMS Summer 2020 Online Exam
DBMS Summer 2020 Online Exam
Section -B
4. (a) Define Structured Query Language (SQL). Briefly describe about DDL and 2
DML.
(b) List five aggregate functions of structured query language and explain their 3
operations with example.
(c) Consider the following relational database: 5
Employee(Employee_ID, Employee_Name, Department_ID)
Department(Department_ID, Department_Name, Salary_ID)
Salary(Salary_ID, Salary_Amount)
here, primary keys are underlined. Give an expression in the SQL to express
each of the following queries:
i. Find the Employee Id and Employee name for employees whose salary is
higher than the average salary throughout the department.
ii. Find the Department Id and Department name for departments whose salary
is third highest salary throughout the department.
iii. Find the Salaries whose salary is not equals to the minimum salary
throughout the department.
iv. Find the amount of salaries after giving 25% increment to each salary.
v. Show the number of Employees and the name of the Employees in the
descending order who has the same Salary.
5. (a) Define the following terms: 2
(i) Relation (ii) Tuple (iii) Attribute (iv) Domain.
(b) Describe the insertion and deletion operation of SQL language with a simple 3
example.
(c) Give an expression in the SQL to express each of the following queries for the 5
Flight schema:
Flight(flightid, source, destination, fare)
i. Create a view to display those flight details who have fare amount in the
range of 5000 to 8000.
ii. Display the flight details who have fare greater than the average fare of all
the flights.
iii. Display details of Flight as “Flight id + <flightid> + has fare + <fare>” in a
single column and give column name as INFO.
iv. Increase all the flight fares by 10% percent which have source as Dhaka.
v. Display the flightid and only the first three characters of source and
destination of flights which have fare less than 3000.