Produce a report with the details of borrowers who currently have books overdue

I am grateful you are here to contribute in my learning. I currently have an assgnment in dataBase course. My real problem is understanding the question.I have a table named as Borrower with details in it.Borrower (borrowerNo,borrowerName, borrowerAddress). Also I have another table called BookLoan (copyNo,dateOut,dateDue,borrowerNo). borrowerNo is the foreign key. The question is asking to produce a report with details of the borrowers who have books overdue. I am confused because we dont have such info displayed in the table?

Answers


Is the key not in the field dateDue? If this is lower than the current time then the book is overdue.

So its a join between Borrower and Bookloan on the borrowerNo key with a WHERE clause to filter on the dueDate column.

Don't want to spoil your learning by answering the question for you, just point in the right direction. Post back if you're still stuck.

Regards,

James


In your table structures, you cant identify which are overdue.

Because there is no field that will identify if the books are returned or not.

Borrower - is the lists of borrowers BookLoan - is the lists of borrowers who borrowed books from date (dateOut) and expected return of books (dateDue).

If the books was returned beyond the dateDue then it is overdue - so you can not determined overdue books by looking @ the field dateDue alone. You need to compare it with the dateReturn - which is not existing in your structure.

    //BookLoan (copyNo,dateOut,dateDue,borrowerNo,dateReturn)
    //dateReturn will be the tagging if the borrowed books by borrowerNo has returned the books borrowed.
    //by then you can determined which books are overdue if 
    1. dateDue is already reached (passed by parameter) and the dateReturn is blank or empty
    2. dateReturn is greater than dateDue

Need Your Help

Spring SAML on Weblogic 12c

java spring-security weblogic opensaml spring-saml

I'm currently working on an application that is making use of the Spring SAML (http://projects.spring.io/spring-security-saml/) project as part of our authentication. I know it is still in RC but s...