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

4.9.1 Database Systems: Examples

1. Two given relations: loan and borrower.

2. inner join:

loan inner join borrower on loan.loan# = borrower.loan#

Notice that the loan# will appear twice in the inner joined relation.

bname loan# amount

 

Downtown

Redwood

Perryridge

 

 

L-170

L-230

L-260

 

3000

4000

1700

 

 

cname loan#

Jones

Smith

Hayes

L-170

L-230

L-155

Figure 4.1: The loan and borrower relations.

bname loan# amount cname loan#

Downtown

Redwood

L-170

L-230

3000

4000

Jones

Smith

L-170

L-230

 

Figure 4.2: Result of loan inner join borrower.

3. left outer join:

loan left outer join borrower on loan.loan# = borrower.loan#

4. natural inner join:

loan natural inner join borrower

Database System Structure: