Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 2: SOL (10pts) The following relation schema can be used to register in

ID: 3731166 • Letter: Q

Question

Question 2: SOL (10pts) The following relation schema can be used to register information on the repayments on micro loans Repayment(borrower id,name,address,loan amount, request date,repayment_ date,repayment a mount) A borrower is identified with a unique borrower id, and has only one address. Borrowers can have multiple simultancous loans, but they always have different request dates. The borrower can make multiple repayments on the same day, but not more than one repayment per loan per day. a) State a primary key for Repayment (1pts) b) Write an SQL reque st that returns all the tuples with information on repayments from the borrower with id equal to 42, and where the lent amount exceeds 1000 USD. (3pts)

Explanation / Answer

a) The most suitable primary key for Repayment would be borrower_id since it is a numeric value and is unique for every borrower.

b) SELECT * FROM Repayment where borrower_id=42 and loan_amount>1000;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote