The collection management system needs rewritten from the ground up. The model should look something like this.
Collection {
id: int
name: String
books: list(Book)
}
it is likely the book object will need rewritten as well.
Book {
id: int
title: String
# other book metadata
collection: list(Collection.id)
}