DBMS Summer 2020 Online Exam

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Bangladesh Army University of Engineering & Technology (BAUET)

Department of Information and Communication Engineering (ICE)


B. Sc. Engineering 4th Year 1st Semester Final Examination Summer-2020
Course Title: Database Management System Course Code: ICE 4131
Full Marks: 40 Time: 2 Hours
N.B: 1. Answering Question no 1 is mandatory.
2. Answer any TWO of the following THREE questions for each section.
3. The figure shown in the margin indicates full marks.
Section -A
1. (a) Define Database Management System? List the characteristics of database 3
approach.
(b) What do you understand by file systems of database? List the drawbacks of 3
using file systems to store data and identify the solutions to the drawbacks.
(c) Categorize the major components of DBMS. Briefly explain the components of 4
DBMS.

2. (a) Categorize personnel involved in Database Management System. Differentiate 3


between actors on the scene and workers behind the scene.
(b) What do you understand by domain relational calculus and tuple relational 3
calculus? Demonstrate using appropriate examples.
(c) Explain the three levels of data abstraction in a database management system 4
with a block diagram.

3. (a) Define instances and schema of database. Differentiate between Physical 3


Schema, Logical Schema and View Level Schema.
(b) Categorize and explain different types of data models. 3
(c) Define integrity constraints and referential integrity. Carry out Super Key, 4
Candidate key, Primary key and Alternate key from the following relation R.
Relation, R
Attribute1 Attribute2 Attribute3 Attribute4
a a e a
b a g a
c a g a
d b g a
e b e a
f b e b

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.

6. (a) Define the following terms: 2


(i) Super Key (ii) Candidate key (iii) Primary key (iv) Foreign key
(b) Describe the update and alter operation of SQL language with a simple 3
example.
(c) Consider the following employee database where the primary keys are 5
underlined.
employee (employee_name, street, city)
works (employee_name, company name, salary)
company (company_name, city)
manages (employee_name, manager name)
Give an expression in SQL for each of the following queries:
i. Find the names, street addresses, and cities of residence of all employees
who work for “First Bank Corporation” and earn more than $10,000.
ii. Find all employees in the database who do not work for “First Bank
Corporation”.
iii. Find all employees in the database who earn more than each employee of
“Small Bank Corporation”.
iv. Assume that the companies may be located in several cities. Find all
companies located in every city in which “Small Bank Corporation” is located.
v. Find those companies whose employees earn a higher salary, on average,
than the average salary at “First Bank Corporation”.

You might also like