Reputation:
I'm building a site where users will be able to read and save their progress for any book on the site (bookmark the chapter last read). What's a good way to structure the users table? Should I make a column for each book to store the current bookmark number or is there a much better way?
EDIT:
Thanks a lot for the example and rating suggestion hank! What do you think about this:
Users
Books
Book Rating
Book Genre
Book Progress and Rating
Is this method of storing individual chapters a good idea?
Upvotes: 1
Views: 477
Reputation: 3768
For normalization, I would do something like this;
Users
Books
Genres
Book Genre
Book Progress
This allows for multiple users tracking progress for the same book, which opens up for suggestions on what book a user should read next, based on what others have read.
Maybe you would want to allow the users to rate a book (or even a chapter, who know?!) Keep it normalized, that's the key!
https://en.wikipedia.org/wiki/Database_normalization
Upvotes: 1