Database model about libraries
Description

I'm synthesising that these are your constraints:


One Book can be in MANY Category's, but only in ONE Category per Library.
Each Library can have ZERO or more Category's, which they do not have to "share" with other Library's.


Solution

This should all be achievable via the following structure (ignoring your wider solution space with users, borrowing, etc):





Note:&nbsp; The link between library_has_category and book_in_library_category is a composite key of the library AND category keys together.