I'm trying to store some information that describes which of a list is currently selected by the user.
For example:
Table: users
users_id
userName
Table: collections (a collection can have only one name)
collections_id
collectionName
Table: books (a book can have only one name)
books_id
bookName
Table: users_collections (one user can have many collections, but a collection can have only one user)
users_id
collections_id
Table: books_collections (a book can belong to many collections)
books_id
collections_id
I want to store which collection and book a user is currently viewing, and am not sure how to properly store it:
Option 1:
New table called currentselections:
users_id
currentCollectionID
currentBookID
Option 2:
Two new tables, currentBook & currentCollection:
users_id
currentcollectionID or currentBookID
Option 1 seems attractive to me, but I can't seem to find any good advice on this in any database design resources.