Question: 3. Consider the following bank database: BANK(Code, Name, Addr) BANK_BRANCH(Code, BranchNo, Addr) ACCOUNT(AcctNo, Balance, Type, Code, BranchNo) LOAN LoanNo, Amount, Type, Code, BranchNo) CUSTOMER(SSN, Name,
3. Consider the following bank database: BANK(Code, Name, Addr) BANK_BRANCH(Code, BranchNo, Addr) ACCOUNT(AcctNo, Balance, Type, Code, BranchNo) LOAN LoanNo, Amount, Type, Code, BranchNo) CUSTOMER(SSN, Name, Addr, Phone) DEPENDENT(SSN,dname, bdate, sex) A C(AcctNo,_SSN) L C(LoanNo, SSN) Write a query to find the number of customers who have dependents but do not have any loans. Create views for the subquery parts and use the set difference operator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
