written 8.6 years ago by | modified 2.2 years ago by |
The terms are
i. Natural join
ii. Assignment
iii. Rename
iv. Set-intersection operation
v. Union
written 8.6 years ago by | modified 2.2 years ago by |
The terms are
i. Natural join
ii. Assignment
iii. Rename
iv. Set-intersection operation
v. Union
written 8.6 years ago by |
Natural join is a type of inner join which is based on column having same name and same datatype present in both the tables to be joined.
Example:
The set intersection operation
Example:
Borrower (customer-name, loan-number)
Depositor (customer-name, account-number)
Customer (customer-name, street-number, customer-city)
List all the customers who have both a loan and an account.
Code:
$Π$ customer-name (Borrower) $∩ Π$ customer-name (Depositor)
r, s must have same number of attributes.
Attribute domains must be compatible.
Duplicate tuples are automatically eliminated.
$∏_{author}$ (Books) $∪∏_{author}$ (Articles)
Output: Projects the name of author who has either written a book or an article or both.