For the track and annotation comments, you may want to change the body from string to
[x] Contains appropriate constraints/details
[x] primary key
[x] not null
[x] unique
For the annotation_upvotes and comment upvotestrack_comments table, you may want to add a uniqueness key.
Did you want a user to upvote the same annotation?
Did you want a user to upvote the same comment?
[x] indexed
All foreign keys should be indexed since they must be looked up on another table.
[x] foreign key
[x] Contains bullet points after the table that state which foreign keys will reference to which table, or references to the associations which will be made
[x] when referring to a table's column names, instead of bolding, let's use back_ticks. Example: we'll use backticks for author_id
[x] Correctly formatted
[x] schema is written in a table format
[x] the table header column names are bolded
[x] columns names are lowercased and snaked_cased and back_ticked
Comments:
Suggestion: In the users table, you may want to change img_url to something more descriptive like avatar_img or user_img
You may want to change certain fields from text to string
Database Schema
[x] Contains correct datatypes
body
fromstring
to[x] Contains appropriate constraints/details
annotation_upvotes
andcomment upvotes
track_comments
table, you may want to add a uniqueness key.[x] Contains bullet points after the table that state which foreign keys will reference to which table, or references to the associations which will be made
back_ticks
. Example: we'll use backticks forauthor_id
[x] Correctly formatted
back_ticked
Comments:
img_url
to something more descriptive likeavatar_img
oruser_img
text
tostring