This is my model:
class User {...} class Book { User author; int number; }
Every book number starts at 1 per author and increments upwards.
When table is created before, it is necessary to remove it. Unique key is not added to existing table.