educative.io

Educative

Why database design is not consistent with api

  1. The api accepts information like api dev key etc. and same has bot been reflected in database design?

  2. If the parts of the url are url encoded, then how it can be a problem for the solution as mentioned in tutorial?

Hi @rahul9!

  1. API dev keys are traditionally not stored in the database, because they are not a part of the user’s information, rather something the developers use on the backend. Hence, it is not necessary to store them in the database. Plus, storing them in a database would be a bad practice because it leaves your APIs vulnerable to a breach.

  2. URL encoding might not shorten URLs at all, as shown in the lesson. It might just replace some characters with others.

I hope this helps!