1. The following database Supply (Company, part, Qty) Storage (Department, part,
ID: 3891644 • Letter: 1
Question
1. The following database
Supply (Company, part, Qty)
Storage (Department, part, Qty)
find all parts and their quantity used by “ computer science” department.
find all companies which supply at least one part used by” computer science” department
find all companies supply all the parts be “ computer science” department.
2. The following database
deposit (bank_account, account_number, costumer_name, balance)
barrow (bank_name, last_ name, costumer_name, account)
Find all customers who have only a deposit account whose balance is greater than $ 1000.
Find all customers who have only a deposit account at (Chester) branch and whose balance greater than $ 2500.
Find all customers who have both a deposit account and a loan at (Chester) branch.
3. One of the set operators (-x) can be expressed in terms of the other set operators .
which one is it? give the algebraic expression in terms of the other set operators.
hint: R S = (RS) x (R-S)
4. give an algebraic expression for the join operation in terms of other relation algebra operations.
6. Under what condition is the following equation true ?
A1(R)= R
Explanation / Answer
1. SELECT part, Qty FROM Storage WHERE Department = 'computer science';
SELECT Company FROM Supply WHERE count(*) >= 1 GROUP BY Company;
SELECT Company, part FROM Supply WHERE part in (SELECT part FROM Storage WHERE Department = 'computer science');
2. SELECT * FROM depost WHERE balance > 1000;
SELECT * FROM depost WHERE balance > 2500 AND account_number IN (SELECT account FROM barrow WHERE bank_name = 'Chester');
3. The division operator can be expressed as
R÷S=?A(R)??A(?A(R)×S?R)
4. ? (STUDENT.ROLL_NO>EMPLOYEE.EMP_NO)(STUDENT×EMPLOYEE)
NOTE: As per Chegg policy, I could answer only 4 questions at a time. Please post the remaining questions separately and I will try to answer it.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.