You are on page 1of 7

Assignment No.

01

SEMESTER Fall 2020

CS712 –Distributed DBMS

Due Date: 2/12/ 2020 Total Marks 50

Instructions to Solve Assignments

The purpose of assignments is to provide you with hands on practice on database design. It is
expected that students will solve the assignments themselves. Following rules will apply during
the evaluation of assignment.

 Cheating from any source will result in zero marks in the assignment.

 Any student found cheating in any two of the assignments submitted will be awarded "F"
grade in the course.

 In case of question No. 03 direct copy and paste from the research paper will be awarded
zero marks.

 No assignment after due date will be accepted.


Question No.1 [Marks: 15]

a) Consider a company ABC, having different Employees with different Skills and Hobbies
according to the below given table,

E_ID Fname Skills Hobbies


1 Rafiq Programming, Analysis, Golf, Cricket
Management
2 Ashfaq Management Gardening
3 Dany Analysis, Management Hockey
4 Liza Programming Gardening, Cycling
5 Chaudry Programming, Analysis Golf, Cricket, Hockey
You have to Normalize the table up to 3NF (3rd Normal Form).

1. 1st NF:

E_ID Fname Skills Hobbies


1 Rafiq Programmin Golf
g
1 Rafiq Analysis Cricket
1 Rafiq Management Cricket
2 Ashfaq Management Gardening
3 Dany Analysis Hockey
3 Dany Management Hockey
4 Liza Programmin Gardening
g
4 Liza Programmin Cycling
g
5 Chaudry Programmin Golf
g
5 Chaudry Analysis Cricket
5 Chaudry Analysis Hockey

Its in 1st Normal Form because it’s contain single values in its cells.

2. 2nd NF:
Now table is in 1st Normal Form.
Now we will remove Partial Dependency.
Make separate tables for them.

Table = Employee Table = Hobbies


Primary Key = E_ID Primary Key = S_ID
E_I Fname S_I Skills
D D
1 Rafiq P1 Programming
2 Ashfaq A1 Analysis
3 Dany M1 Management
4 Liza
5 Chaudry
Table = Employee_Skill Table = Employee_Hobby Table = Skill
Primary Key = H_ID
E_ID H_ID
E_ID S_ID 1 G1
1 P1 1 C1
1 A1 1 G2 H_ID Hobby
1 M1 2 H1 G1 Golf
2 M1 3 G2 G2 Gardening
3 A1 3 C2 C1 Cricket
3 M1 4 G1 C2 Cycling
4 P1 5 C1 H1 Hockey
5 P1 5 H1
5 A1

3. 3rd Normal Form:

Now its in 3rd Normal Form because its contain no transitive dependency.
Question No.2 [Marks: 15]

Consider the above example and consider the below table as Employee_Personal;

E_ID U_email Fname City Province Zip


1 rafi@ymail.com Rafiq Peshwar KPK 123
2 ashfaq@gmail.com Ashfaq Karachi Sindh 456
3 dany@hotmail.com Dany Mirpur KPK 789
4 Liza@yahoo.com Liza Lahore Punjab 042
5 Ch85@gmail.com Chaudry Lahore Punjab 042

Normalize the above given table up to 3rd Normal Form.

Answer:

1st NF:
The Given Table is already in 1st Normal Form because it’s contain atomic/single values in its
cells.

2ndNF:
As we now Primary key is only contain one Attribute/column so It contain no Partial
Dependency.
Given table is in already 2nd Normal Form.

3rd NF:
Remove Transitive Dependency.
U_email -> Fname
Zip -> City , Province
Decompose it in sub tables

Primary Key = U_email Primary Key = Zip

U_email Fname
rafi@ymail.com Rafiq Zi City Province
ashfaq@gmail.com Ashfaq p
dany@hotmail.co Dany 123 Peshwar KPK
m 456 Karachi Sindh
Liza@yahoo.com Liza 789 Mirpur KPK
Ch85@gmail.com Chaudry 042 Lahore Punjab
Primary Key = E_ID
Foreign Key = U_email, Zip

E_ID U_email Zip


1 rafi@ymail.com 123
2 ashfaq@gmail.com 456
3 dany@hotmail.com 789
4 Liza@yahoo.com 042
5 Ch85@gmail.com 042

Question No.3 [Marks: 20]

Read the paper entitled as “SQL: From Traditional Database to Big Data” available in the zip
folder.

a) Give critical analysis of the above paper in your own words.


ANS:
ALTHOUGH IT IS TOO GOOD BUT IT HAS SOME ISSUES WHEN WE
INTEGRATE IT WITH OTHER ASYSTEM OR WHEN WE ARE USING HUGE
AMOUNT OF DATA OR SUCH AMPLICATION IN WHICH NODEWS ARE
MOVING AND INCREASINF.WE ALSO ALSO FACING SOME SECURITY
ISSUES AND COMPATIBILITY ISSUES DURING COMBINATION.SOME
EXAMPLES ARE GIVEN BELOW

While Map Reduce is a powerful framework to build highly distributed and scalable programs, it
is also complex and difficult to learn. In fact, even simple data operations, like joining two
datasets or identifying the Top-K records, require relatively complex Map Reduce programs.
This is the case because Map Reduce requires users to build a program using a procedural
language that needs a detailed specification of how a processing task should be carried out. Hive
QL supports many of the features of SQL but it does not strictly follow a full SQL standard.
Hive supports multiple DDL and DML commands such as CREATE TABLE, SELECT,
INSERT, UPDATE and DELETE. Moreover, starting with Hive0.13, it is possible to support
transactions with full ACID semantics at the row (record) level. While originally most of the
NoSQL systems did not adhere to the relational database model and did not support SQL for data
manipulation. SQL with VoltDB and it can not run on window and run only on linux

b) Suggest any other efficient framework/ method for handling big data analytics.

ANS:

A- HD-MALA structure have a great deal of focal points than exemplary and current
information digging apparatuses and items for huge examination. Speedier data to-
decision taking care of speed for nonstop military and business applications
because our consistent parallel and coursed preparing computations are made
by using the Storm that don't require questions and data advancement;

B- Results in capable enrolling considering the way that there is irrelevant data
advancement and correspondence traffic over frameworks (tallying virtual
machines), and no rough data is moved for data mining around frameworks to
basically improve preparing capability and system security;

C- Optimized utilization of handling resources, for instance, enlisting memories,


information transmission, and CPUs, since little codes of HD-MaLA Agents eat
up little preparing resources; and

D- Automated data pursuing, getting ready, information understanding and appearing


to on a very basic level lessen decision maker‟s extraordinary job needing to be done
and definitely increase data to-decision rate, since HD-MaLA canny Specialists
mechanize most assignments or businesses that are done by using Storm based
versatile figuring structure.

The applications which can leverage the usage of mobile analytics can be classified as mobile
crowd-sourcing or crowd-sensing. These crowd-sourcing applications depend on multiple
sensors integrated within smart phones to collect data from a very large group of mobile
users and provide contextual information by giving priority to users' operating requirements.
It requires continuous sensing, processing and uploading or transferring sensed/processed
data to the cloud or remote servers. These energy expensive functions may in certain cases
lead to battery depletion (Gaber et al., 2013). In (Gaber et al., 2013), mobile analytics is
classified into push-based independent systems with local sensing and processing, push/pull-
based independent/collaborated systems with local sensing and cloud processing/storage and
push/pull-based collaborated system with distributed processing and load balancing between
cloud and mobile device. (Castro et al., 2014) present a collaborative extension to InCense, a
mobile phone sensing toolkit to enable behavioral data gathering from populations of mobile
phone users during mobile phone sensing campaigns A Spark-based framework (Alsheikh et
al., 2016) for learning deep models was proposed for mobile data analytics within large-scale
mobile systems A Spark-based framework (Alsheikh et al., 2016) for learning deep models
was proposed for mobile data analytics within large-scale mobile systems A Spark-based
framework (Alsheikh et al., 2016) for learning deep models was proposed for mobile data
analytics within large-scale mobile systems A Spark-based framework (Alsheikh et al., 2016)
for learning deep models was proposed for mobile data analytics within large-scale mobile
systems A Spark-based framework (Alsheikh et al., 2016) for learning deep models was
proposed for mobile data analytics within large-scale mobile systems

You might also like