中文网站
  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

5.1.3 Database Systems: Queries on Several Relations

1. Queries on several relations require several skeleton tables.

2. To find the name and city of all customers having a loan at the SFU branch:

borrow bname loan# cname amount
  SFU   _x  
customer cname street ccity
  P._x   P._y

3. Find the name of all customers having an account at the SFU branch, but no loan from that branch.Queries involving negation can be expressed by putting a : sign under the relation name beside an example

row

deposit bname account# cname balance borrow bname loan# cname amount
  SFU   P._x ï¿¢   SFU   _x  

4. To nd all customers who have accounts at two di erent branches:

deposit bname account# cname balance
 

_y

ï¿¢_y

 

P._x

_x

 
Database System Structure: