I'm kinda stuck on this relational algebra question, any help would be really appreciated. Many thanks!
Given the following database schema:
person (name, age, account id)
account (account id, balance)
Write relational algebra expressions to accomplish the following task:
Suppose every member of the bank will withdraw money via check equal to their age in two days. Find the names and balances for all customers in two days (assuming no other transactions).
My understanding is, finding all names, balances where the customer's age has been withdrawn;
for example, if Pete is 30 and has $500 in the bank, he will withdraw $30 and have a new balance of $470?
But how to do it in relational algebra?
Thanks!