Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone explain to me how to do the follow actions using relational algebra please? Thanks! a) Find the account ids of all accounts that

image text in transcribedimage text in transcribedCan someone explain to me how to do the follow actions using relational algebra please? Thanks!

a) Find the account ids of all accounts that had only a deposit transaction and no withdraw transaction on 2016-12-22.

b) Find the name of the branch managers and the complete address of the branch where they work if they have a checking account in the branch where they work.

c) Find the transaction ids for all the withdraw transactions performed on any accounts held by Mone L Aunderer which was carried out on a branch which is not the accounts branch.

d) List all the savings account ids and the name and customer ids of their customers which had only one transaction this year.

Look at the following relational schema of a banking database (with some example tuples for each relation ) Customer (custid, name, city, streetaddr, province) 12131, 'Joe Smith', 'Montreal', '412 Rue Minne', 'PQ' Account (acctid, custid, atype, startdate, balance, branchid), (custid ref Customer, branchid ref Branch) 515512, 12131, "checking', '2014-12-20', 1432.56, 31 Branch (branchid, mgrid, city, streetaddr, province), (mgrid ref Employees.empid) 31, 902, 'Ottawa', '450 Le Passfail', 'ON' Employees (empid, name, branchid, salary, city, streetaddr, province), (branchid ref Branch) 902, 'Megan Crowley', 31, 6456.22, 'Ottawa', '31 Walkaway Apt 302', 'ON' Transactions (tid, acctid, transtype, transdate, transamount, branchid), (acctid ref Account, branchid ref Branch) 612312334, 12131, 'deposit', '2016-01-24', 200, 48 Some useful information. .A customer can have multiple accounts, an account however has only one customer. Transactions can be conducted at any branch, irrespective of where the account is located. .An employee can be living in a city, but working in a branch in a different city. Cities can have same name across different provinces (but not within the same province), and should be consid- ered different. For example Delta, ON and Delta, BC are two different cities. Keep this in mind while answering questions that involve cities to be compared. .The combination (name, street addr, city, province) can be considered unique for an individual (helps identify employees who are also a customer, etc.). Therefore a person cannot have two different names/addresses. oche con il consenso de made ra en e l camp de considered the core individual la identify Look at the following relational schema of a banking database (with some example tuples for each relation ) Customer (custid, name, city, streetaddr, province) 12131, 'Joe Smith', 'Montreal', '412 Rue Minne', 'PQ' Account (acctid, custid, atype, startdate, balance, branchid), (custid ref Customer, branchid ref Branch) 515512, 12131, "checking', '2014-12-20', 1432.56, 31 Branch (branchid, mgrid, city, streetaddr, province), (mgrid ref Employees.empid) 31, 902, 'Ottawa', '450 Le Passfail', 'ON' Employees (empid, name, branchid, salary, city, streetaddr, province), (branchid ref Branch) 902, 'Megan Crowley', 31, 6456.22, 'Ottawa', '31 Walkaway Apt 302', 'ON' Transactions (tid, acctid, transtype, transdate, transamount, branchid), (acctid ref Account, branchid ref Branch) 612312334, 12131, 'deposit', '2016-01-24', 200, 48 Some useful information. .A customer can have multiple accounts, an account however has only one customer. Transactions can be conducted at any branch, irrespective of where the account is located. .An employee can be living in a city, but working in a branch in a different city. Cities can have same name across different provinces (but not within the same province), and should be consid- ered different. For example Delta, ON and Delta, BC are two different cities. Keep this in mind while answering questions that involve cities to be compared. .The combination (name, street addr, city, province) can be considered unique for an individual (helps identify employees who are also a customer, etc.). Therefore a person cannot have two different names/addresses. oche con il consenso de made ra en e l camp de considered the core individual la identify

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

Students also viewed these Databases questions