As always, 'it depends'
Depends on your queries -
If you are going to be searching primarily on Book
I would suggest having a collection of Books, with an embedded publisher.
Assuming a schema like
Book
{
_id: ObjectId('507f191e810c19729de860ea'),
title: 'A great book',
publisher: {
_id: ObjectId('958d191e810c19629dl860io'),
name: 'A great publisher'
}
}
You could easily query this like:
db.books.find({publisher._id: ObjectId("958d191e810c19629dl860io")});
Which will return all books by that publisher.
The issue I see is around how much you want to 'present' about the publisher to the person viewing a book
.
Could this data change? The publisher could change their name? Then you've got to go through each book and update it...
Or would you prefer to store it as a 'point in time fact' - ie, this book was published by a publisher with xyz name, therefore we don't update it.
If you're primary query however is a list of publishers, and their books, I would reverse the above:
Publishers
{
_id: ObjectId('958d191e810c19629dl860io'),
title: 'A great publisher',
books: [{
_id: ObjectId('507f191e810c19729de860ea'),
name: 'A great book'
}]
}