MySQL Forums
Forum List  »  Newbie

Triggers
Posted by: Julia Krenn
Date: March 25, 2022 06:27AM

Hi everyone! I'm pretty new to MySQL and databases in general and I'm just practicing to learn. I have a question for the experts. So I have three tables

Students with studentID (PK), FName, LName, Address, bookID (FK)
Professors with professorID (PF), FName, LName, Address, bookID (FK)
Books with bookID (PK), name, author, genre

and I would like to implement the following scenario in MySQL with MySQL Workbench: there is only one version of each book available in my library and it can only be borrowed to one person at a time. I thought about solving this with a trigger, would that work? I'm really grateful for your input and hints!

Options: ReplyQuote


Subject
Written By
Posted
Triggers
March 25, 2022 06:27AM
March 25, 2022 08:10AM
March 25, 2022 10:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.