First of all hello and thank you for reading.
I'am making a database for a Library, the tables I have are:
Student - ID, Name, Class, Sex, Address
Books - ID_book, Name, Writer, ID_Genre
Loan - ID_Student, ID_Book, Take, Return
Genre - ID_Genre, Genre
So what I want is, if I loan a book and it is not returned Loan(return) = is null no one else can take it.
Exp:
User: 1 takes a book ID:2, 5 minutes later User: 52 tries to take book ID:2 but he cannot because it's taken by user 1.
Thanks in advance
I'am making a database for a Library, the tables I have are:
Student - ID, Name, Class, Sex, Address
Books - ID_book, Name, Writer, ID_Genre
Loan - ID_Student, ID_Book, Take, Return
Genre - ID_Genre, Genre
So what I want is, if I loan a book and it is not returned Loan(return) = is null no one else can take it.
Exp:
User: 1 takes a book ID:2, 5 minutes later User: 52 tries to take book ID:2 but he cannot because it's taken by user 1.
Thanks in advance
Comment