Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
256 views

Assignment 2 DM

The instructions provide guidelines for submitting Assignment 4 by the deadline of November 25, 2019 at 5:00 PM as follows: 1. Each problem must be solved on separate white pages. 2. Assignments must be properly tagged with details. 3. The last date to submit the assignment is November 25, 2019 before 5:00 PM. 4. Students must submit their own work individually and be present for verification.

Uploaded by

shadow mode
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
256 views

Assignment 2 DM

The instructions provide guidelines for submitting Assignment 4 by the deadline of November 25, 2019 at 5:00 PM as follows: 1. Each problem must be solved on separate white pages. 2. Assignments must be properly tagged with details. 3. The last date to submit the assignment is November 25, 2019 before 5:00 PM. 4. Students must submit their own work individually and be present for verification.

Uploaded by

shadow mode
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Instructions for how to solve Assignment

1. Each assignment must be solved in white pages sheet separately.

2. Each assignment must be properly tagged.

3. Last date for submitting assignment is 25/11/2019 on before 5:00 P.M.

4. All students are requested to submit only your own assignment separately and your presence will
countable.
Motilal Nehru National Institute of Technology, Allahabad.
Department of Computer Science & Engineering,
B. Tech. (CSE/IT) VII Semester
Subject:- Data Warehouse and Mining

Assignment-IV

1. A very large tele-communications company called “Cell9”, providing cellular phone services to a
number of states in various regions of the country, plans to build a data warehouse for decision
support. They have millions of subscribers in the country. They want to track the duration (in
minutes) as well as the prevailing rate (per minute) of each phone call made by its subscribers.
They also want to analyze if there is any link between the total amount of time spent in talking on
cellphones by a subscriber and the number of graduates in the state or the number of married
persons in the state or the male-female ratio of the state to which the subscriber belongs. Further,
they want to analyse the relation between the age, salary and marital status of the customers to
their total bill amount per day/month/year. One other important requirement is to make queries
like determining the current total number of customers in the various age groups for each state
having certain ranges of male-female ratio.

a) Design a suitable relational database schema for such a data warehouse, clearly identifying
the fact table(s), the facts in the fact table(s), the dimension table(s), their primary key(s) and
foreign key(s). Your schema should at least be able to satisfy the above mentioned analysis
requirements. You may consider other suitable attributes for the dimension table(s).
b) Classify the facts in your fact table(s) as additive, non-additive and semi-additive.
c) Draw possible concept hierarchies for each dimension that you have designed, identifying
whether these are schema hierarchies or set grouping hierachies.
d) Write an SQL query that runs on your schema and returns the region-wise yearly average bill
amounts of married and unmarried customers.
e) Draw a cuboid to represent the result of your query.
f) From this cuboid, which sequence of OLAP operations would you perform to get the average
monthly bill amounts of all the customers for the states of Bihar and West Bengal?
g) Write an SQL query to return the current total number of customers in the various age groups
for each state with male-female ratio between 0.9 and 1.1.
h) For any one fact table (You may have only one, depending on your design), and any one
attribute of any one dimension table, draw the bitmap index table(s) and join index table(s).
Before drawing the index tables, first mention the representative rows in the tables.

2. A hospital cum medical research institute is carrying out a study on the nature of differenttypes of
fevers. In order to track every patient as he/she keeps coming back to the hospital, aunique id is
maintained. For each patient, they keep track of the body temperature at everyhour of the day as
long as the patient is admitted in the hospital. They also maintain dataabout the different types of
medicine being given to the patient. Patients may be given morethan one medicine in a day. Every
medicine is administered as many times in a day as thedoctor has prescribed. Since there is
history of different types of fevers occurring in variousdistricts, states and regions in the country,
the hospital research team wants to maintain suchresidence details of each patient. One of the
goals of the research is to determine if there isany relation between the age and gender of the
patients with their body temperature whenvarious medicines are administered. Another goal is to
determine if there is a relationbetween the % of population who are farmers, office goers or
teachers in the patient’s statewith the body temperature of the patients when various medicines are
administered.

a) Design a suitable schema for the hospital cum medical research institute, clearly
identifying the Fact table(s), Dimension Tables(s), the Facts, the Dimensions,
Primary Keys and Foreign Keys of all the tables. Your schema should at least be able
to satisfy the above mentioned research requirements. You may consider other
suitable attributes for the dimension table(s).
b) Classify the fact(s) in your fact table(s) as additive, non-additive and semi-additive.
c) Write an SQL query that runs on your schema and returns today’s average, maximum
and minimum body temperature for each married male patient.
d) Draw a cuboid to represent the result of your query.
3. A chain of departmental stores called “India-Mart” having operations only in India, plans to
develop a data warehouse for effective decision-making about their sales and different promotion
schemes. India-Mart puts some of their products on promotional sales from time to time. There
may be a large number of different types of promotions like coupon sales, end-of-the-aisle
display, buy-two-get-one-free, etc.
India-Mart would like to analyze how item sale is affected by the promotions at each store, in
each state and across the entire country.
With respect to the above business scenario, answer the following questions.

a. Design a star schema for the data warehouse clearly identifying the fact table(s), dimension
table(s), their attributes and measures along with the primary key and foreign key relationships.

b. Write an SQL query by which you can display year-wise, promotion-wise, product-wise total sales
in the entire country from your schema.

c. Draw a cuboid that would display the result of the query specified in Q. b above.

d. From the cuboid of Q. c above, if we want to find the total amount of promotional sales made
during the years 2002 and 2003 for the states of Karnataka and Maharashtra, which sequence of
OLAP operations would you need to perform?

e. Draw possible schema hierarchies for each dimension that you have designed.

f. Based on the schema hierarchies drawn in Q. e above, determine the total number of cuboids,
considering all the aggregation levels.

4. A consortium of banks wants to develop a data warehouse for effective decision-making


about their loan schemes. The banks provide loans to customers for various purposes,
like, House Building Loan, Car Loan, Educational Loan, Personal Loan, etc. The whole
country is categorized into a number of regions, namely, North, South, East and West.
Each region consists of a set of states. Loan is disbursed to customers at interest rates that
change from time to time. Also, at any given point of time, the different types of loans
have different rates. The data warehouse should record an entry for each disbursement of
loan to customer.
With respect to the above business scenario, answer the following questions. Clearly state
any reasonable assumptions you make.

a) Design a star schema for the data warehouse clearly identifying the fact table(s),
dimensional table(s), their attributes and measures along with the primary key and
foreign key relationships.
b) Write an SQL query by which you can display region-wise, bank-wise, year-wise total
amount of loans disbursed from your schema.
c) Starting with the base cuboid, if we want to see the amount of loan disbursed during
the year 2000 for the state of Maharashtra, which sequence of OLAP operations
would you need to perform?

5. Use the similarity matrix in Table (shown below) to perform single and complete
linkhierarchical clustering. Show your results by drawing a dendrogram.
Thedendrogram should clearly show the order in which the points are merged.

6. Compute the hierarchical F-measure for the eight objects {p1, p2, p3, p4, p5, p6, p7,
p8} and hierarchical clustering shown in Figure (shown below). Class A contains
points p1, p2, and p3, while p4, p5, p6, p7, and p8 belong to class B.
7. Following is a data set that contains two attributes, X and Y , and two class labels,
“+” and “ −”. Each attribute can take three different values: 0, 1, or 2. The concept for
the “+” class is Y = 1 and the concept for the “−” class is X =0 ∨ X=2.

(a) Build a decision tree on the data set. Does the tree capture the “+” and “−”
concepts?

(b) What are the accuracy, precision, recall, andF1 -measure of the decision tree?
(Note that precision, recall, and F1 -measure are defined with respect to the “+”
class.)

8. The original association rule mining formulation uses the support and confi-dence
measures to prune uninteresting rules.
(a) Draw a contingency table for each of the following rules using the trans-actions
shown in Table shown below.
(b) Use the contingency tables in part (a) to compute and rank the rules in decreasing
order according to the following measures.

You might also like