Open djsiddz opened 1 year ago
If in a future scope, we want to show users their reading progress historically and kind of like a streak on a calendar, how many days they've read, then we will need some additional structure to enable it.
Keeping isbn
and format
fields with books
schema instead of booksOwned
schema.
Added profiles
in place of users
to avoid confusion with auth.users
table. Keeping only first_name
, last_name
and screen_name
fields in the profiles
table.
Added booksOwned
table. Will record final schema created here for future reference.
Rethinking the schema as I have learnt some better things. I am missing a lot of book information that I get from Open Library / Google Books API which I am not capturing. Also missing - book covers, and authors.
We need to store the users and their books.
For
users
, we need some basic information like:For
books
, we need the following information:We can normalize the
books
schema so that this data can be shared amongst users, and we reduce data duplication.We can have a relation table
booksOwned
, where we can move the below details, as these are specific to the unique book ownership and not the book itself.For
booksOwned
we can have the following information:That leaves the following information in the
books
schema:Next Steps
users
schema to Supabase Databasebooks
schema to Supabase DatabasebooksOwned
schema to Supabase Database