On a Monday morning the manager of a bank branch sends the IT officer three questions. Which of our customers have a deposit account but no loan? What is the total loan of each branch? And which customers hold an account at every one of our Dhaka branches? Each answer is hidden in tables you already know how to build. The officer will type SQL, but underneath, the DBMS turns every SQL query into a short expression in a small mathematical language, relational algebra, and works it out one operation at a time. Learn that language and SQL stops being a list of keywords to memorise: you will see why a query returns what it returns, and you will be able to write the algebra that written papers ask for.
Question: The 47th BCS asked for "customers who have an account at all branches located in Dhaka". In relational algebra, which operation expresses the word "all"?
a) Natural join
b) Union
c) Division
d) Projection
Why it matters: MCQs ask which operator is unary, what the − operation is called, which join keeps unmatched rows and how many rows a product returns. Written papers ask you to write algebra for a given schema (SGFL 2021, BPDB 2021), to define left, right and full outer joins (Dutch-Bangla Bank 2018), and to write the query for "customers with an account but not a loan" (JGTDSL 2021) or "customers with an account at all Dhaka branches" (47th BCS), in algebra or in SQL.