中文网站
  Advanced Search
Read the latest Blogs from IT professionals in the field. Read and write community created documents. Need IT help? Ask our staff. Connect with your peers. Check our Tech Shop for posters, books and software tools. Home

3.4.2 Database Systems: Example Queries

1. Find branch name, loan number, customer name and amount for loans of over $1200.

2. Find all customers who have a loan for an amount > than $1200.

 

3. Find all customers having a loan from the SFU branch, and the city in which they live.

 

4. Find all customers having a loan, an account or both at the SFU branch.

 

5. Find all customers who have an account at all branches located in Brooklyn.

 

If you nd this example diffcult to understand, try rewriting this expression using implication, as in the
tuple relational calculus example. Here's my attempt:

 

I've used two letter variable names to get away from the problem of having to remember what x stands for.

Database System Structure: