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)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

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;

Add a comment
Know the answer?
Add Answer to:
Question 2: SOL (10pts) The following relation schema can be used to register information on the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 11 This problem is about writing SQL for the relation Repayment from the above proablem. problement(borrower...

    11 This problem is about writing SQL for the relation Repayment from the above proablem. problement(borrower id, name, address, loanamoun id, name, address, loanamount, requestdatoe, nt, requestdate, repayment date, request amount) a) (4 Rrl points) Write an SQL request that returns all the tuples with information on repayments from the aith id equal to 42, and where the lent amount exceeds 1000 USD. borrower b) (4 points)Write an SQL request that for each address finds the total repaid amount for...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT