First page Back Continue Last page Graphics
Example database
Notes:
We are often going to work with a simple bank database that stores information about customers, accounts, loans and branches.
The algebra lets us select information from a table, like accounts of a given customer, project on certain attributes like the balance, and lets us combine information from different tables, like combining customer and branch information.
The number of possible interesting queries on such a database is endless. We do mention a few to illustrate the kind of information we can extract from this database:
Give the names of customers who have an account that is associated with a branch in the city they live in.
Give the names of customers who have obtained a loan at a branch where they do not have an account.
Give the name of the branch with the largest assets.
Give the names of the branches with more loans than accounts.
Give the customers who have, for each branch where they have an account or loan, more money in accounts at that branch than money borrowed from that branch.
During the labsessions we will try to formulate and read queries that are easier than the last one, but during the colstructions we will learn to ask such complicated questions.