Given I have 2 tables:
books bookstores
95% of the entries in the books table will be available in ALL bookstores. 5% of the entries in the books table will only be available in a SINGLE bookstore.
Books will NEVER be available to several bookstores, it will always be 1 or all.
I can see two ways of linking these tables:
Place a nullable foreign key on the books table, referencing bookstores. If null, it’s available for all bookstores, if not it’s only available for the referenced bookstore.
Create a linking table which will hold every combination of book / bookstore for the 95% of books and the single book / bookstore combination for the other 5%.
Option 2 is the normalised way of doing this and I guess technically correct, but will result in a lot more DB entries and management.
What do people think is the best approach to take here?