What is the min & max learner
that a loan_period
can have?
Ans: 1
A learner is unique, and so does the loan_period. Only a single learner can belong to 1 specific loan_period - aka id
What is the min loan_period
that a learner
can have?
Ans: 0
A learner can exist and didn't borrowed any book, thus the learner have no loan_period
What is the max loan_period
that a learner
can have?
Ans: Many
A learner can borrow different books on multiple times or different days, thus the learner will have many set of different loan_period - aka id
What is the min book
that a loan_period
can have?
Ans: 1
In order for a loan_period to exist, it must have a minimum of 1 book borrowed.
What is the max book
that a loan_period
can have?
Ans: Many
A single loan_period can contain many different set of books borrowed.
What is the min loan_period
that a book
can have?
Ans: 0
A book is available for borrowed, but nobody wants to borrow it.
What is the max loan_period
that a book
can have?
Ans: Many
A book is available for borrowed, and it is so popular that many learner wants to borrow it.
End of Cardinalities description
-
availability
is based on thequantity
. Eg; if (quantity == 0) then availability = FALSE -
the
quantity
count will be compute over atloan_period
table
-
Can create new user accounts
-
Can set password
-
login authentication
- Can create
admin
account to have CRUD operation over:Book
tableLearner
table
- Can create
-
starttime
toendtime
can be fixed. Eg; 21 days. The data type should beLocalDate
-
To compute the
quantity
count for thebook
table based on it'sloan_status
.- Examples;
- if the book is on
.BORROWED
or.OVERDUE
then quantity=quantity-1 - if the book is on
.RETURNED
then quantity=quantity+1
- if the book is on
- Examples;
-
If book has passed the enddate but not yet returned, then the
loan_status
should change toOVERDUE
automatically.