Cat2 Q
Cat2 Q
Course Name & code: Advanced Database Management Systems & CSI2004 Slot: C1+TC1
Programme Name & Branch : M.Tech. (Integrated) CSE
Class Number: VL2023240501818 / 1814 / 1817 Faculty Name: Profs. ILAYARAJA V /
RAMANATHAN L / ANAND BIHARI
Exam Duration: 90 min Maximum Marks: 50
(i) It is decided to maintain the employee salary (EMPID and Salary) data at
their headquarters’ server, which is located in Chennai. (2.5 Marks)
Ans: create table EMPSAL as select EMPID, Salary from EMP;
Fragmentation method is Vertical Fragmentation.
(ii) It is decided that information for a given employee (except Salary) should
be stored in the DBMS server at the branch office where that employee
works. (2.5 Marks)
Ans: create table EMP_Chennai as select EMPID, name, loc, dob, department from
EMP where LOC=’Chennai’;
Fragmentation method is Hybrid Fragmentation.
create table EMP_ Hyderabad as select EMPID, name, loc, dob, department from
EMP where LOC=’ Hyderabad’;
Fragmentation method is Hybrid Fragmentation.
create table EMP_ Bangalore as select EMPID, name, loc, dob, department from
EMP where LOC=’ Bangalore;
Fragmentation method is Hybrid Fragmentation.
Or
create table EMP_data as select EMPID, name, loc, dob, department from EMP;
This is vertical fragmentation.
create table EMP_ Hyderabad as select * from EMP_data where LOC=’ Hyderabad’;
Fragmentation method is Horizontal Fragmentation.
create table EMP_ Bangalore as select * from EMP_data where LOC=’ Bangalore;
Fragmentation method is Horizontal Fragmentation.
(iv) Let us assume that the given table is fragmented into two tables’ a salary
table and a non-salary table. The salary table contains only the ID and
salary, and the Non-Salary table contains all attributes except Salary. Now,
it is decided to fragment the non-salary table into two tables. One table
must contain all employee information whose salary is greater than 50000,
and the other table must contain the rest of the data. (2.5 Marks)
Ans:
create table EMP_data as select EMPID, name, loc, dob, department from EMP;
create table EMP_sal as select EMPID, salary from EMP;
Create table emp1 as select * from EMP_data where EMPID in (select EMPID from
EMP_sal where salary >50000)
Create table emp2 as select * from EMP_data where EMPID in (select EMPID from
EMP_sal where salary <=50000)
b. Execute Query at Cochin site by calling both the table at Cochin site using
sort merge join. [5 Marks]
Answer key
100(2td+ts)+900(2td+ts)+3(100+900)td+1500 ts
Note: if any additional parameter is required for cost estimation you can assume that
value and give the proper justification.
3 Assume that you are working in TCS and assigned a project to develop a website for 10
selling a wide variety of Samsung products. Samsung India sells Mobile Phones, TVs
and AV, Home Appliances, screens, etc. This application requires displaying all side
images of the appliances, product description (both in English and national language)
and Product demo videos that help users understand the product functionality and
features. Using multimedia database, write the multimedia query for the following:
Answer key:
a. Create a table for the given scenario using multimedia data type for storing
product details.
CREATE TABLE product_details (product_id NUMBER(6), product_name
VARCHAR(20), prod_desc_hindi NCLOB, prod_desc CLOB,
product_photo BLOB, prod_video BFILE);
Ans:
Geospatial database is suitable for this application. Application designer can
implement Entity based model or Spaghetti Model to design the database. Designer
can use one dimensional or liner object to store the location and path. To store the
location of branch office and customer house, designer can use geometry data object.
5 Discuss the role of DBS in managing the database in mobile database. Do you think 10
DBS’s should be made a part of BS’s (housed in BS’s)? First explain if it is possible
to make them as a part of BSs and then comment on the benefits of this architecture.
Suggest another location for DBS’s that works fine without affecting functionality of
the cellular system.
Database servers (DBSs) can be installed (a) inside BSs or (b) inside FHs.
There are a number of problems with this setup. BSs or FHs are switches and they
have specific switching tasks to perform; incorporating database capability in them
would interfere in their switching tasks.
Besides, the size of a BS varies and inhibits incorporating complete database
functionalities in smaller BSs, and the entire architecture of a BS (hardware and
software) may have to be revised. Such a major change in a cellular platform would
be unacceptable from a mobile communication viewpoint. So, storing DBs inside the
BSs is not much profitable. In this case data switching is more. So, it would be better
to make DBs as the part of FHs.(fixed hosts). Diagram is given in above.