-
Notifications
You must be signed in to change notification settings - Fork 1
Database Schema
Jonathan Chan edited this page Apr 2, 2021
·
24 revisions
ID PK int username string email string hashPassword string
ID PK int Cover title author published avg_rating statusId FK >- readStatus.ID
ID PK int status string
ID PK int category
bookId FK >- Book.ID tagId FK >- tag.ID
ID PK int name userId FK >- User.ID
ID PK int author raiting created_at userId FK >- User.ID bookId FK >- Book.ID
bookshelfId FK >- Bookshelf.ID bookId FK >- Book.ID
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| username | string | not null, |
| string | not null, indexed, unique | |
| created_at | datetime | not null |
| updated-at | datetime | not null |
- index on
email, unique: true -
userIdreferencesuserstable
| column name | data type | details |
|---|---|---|
| id | integer | not null, primary key |
| cover | string | not null, |
| title | string | not null, unique |
| author | string | not null |
| avg rating | integer | not null |
| rating | integer | not null |
| shelves | string | not null |
| review | text | not null |
- index on
email, unique: true -
userIdreferencesuserstable