Why are we storing userId along with URL table?

Why are we storing userId along with URL table? Doesn’t that create too many entries for hotURLs?

Hi @Prakash1,

Hope you are doing well.

The author says that he wants to keep track of the user who created that URL:

We would need two tables: one for storing information about the URL mappings and one for the user’s data who created the short link.

In order to do that, the UserID should be added to the URL Table.

Hope that helps!

  • Artur Baruchi
    Follow me on twitter for tips and contents about CS, Sw Engineer and SD! (@abaruchi)