SamuelL Posted May 13, 2019 Share Posted May 13, 2019 Hello Larry, I thought CH 17 Forums was well put and easy to implement. If I were to add a Like functionality to the database design. Then it would look as follows: posts_table post_id thread_id user_id etc thread_table thread_id etc user_table user_id etc like_table like_id post_id user_id etc This database design looks normalized, but the 'like_table' would hold all likes for all posts? This seems like a table that would be very heavily populated and queried? What do you think about this Larry? Thanks I appreciate your response to these forums. Link to comment Share on other sites More sharing options...
Larry Posted May 14, 2019 Share Posted May 14, 2019 That looks totally fine to me, and you'd create a unique index on the combination of post_id and user_id, which restricts each user to only liking a post once. Nice work! Link to comment Share on other sites More sharing options...
Recommended Posts