Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A bank maintains each of its transaction data as a tuple in the form ( DateTime , UserId, Operation, Amount ) , where Date Time

A bank maintains each of its transaction data as a tuple in the form (DateTime, UserId, Operation, Amount), where Date Time contains the date and time of the transaction, Userld contains the unique Id of the user who has performed the transaction, Operation contains either D or W referring to whether it's a deposit or withdrawal transaction, Amount refers to the transaction amount (money). For example, a tuple (24-01-20231100,12345, W,1000) indicates that a user with Id 12345 has withdrawn an amount of IN 1000 on 24th Jan 2023 at 1100. You are given a dataset with all transaction data of the bank for last one year, which contains billions of tuples. The bank is interested to know whether each user who has done at least one transaction in the last one year has deposited more money than what he has withdrawn or vice-versa. Write a single pass MapReduce based pseudocode/algorithm to obtain the desired result. For example, output 12345 W if the total amount withdrawn by user with Id 12345 is more than the total amount that he/she deposited. If the total amount deposited is same as the total amount withdrawn, then print a suitable message to indicate the same.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Moving Objects Databases

Authors: Ralf Hartmut Güting, Markus Schneider

1st Edition

0120887991, 978-0120887996

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago