Grokking the System Design Interview
Ask Author
Back to course home

0% completed

Vote For New Content
For the database selection, why are we proceeding with a NoSQL database? I thoug...

Richard Yuan

Aug 6, 2022

For the database selection, why are we proceeding with a NoSQL database? I thought there is a relationship between the URL and User tables with the UserID field. Wouldn't that qualify as a relationship and therefore require a SQL database be used?

3

0

Comments
Comments
S
Sandeep Kumar3 years ago

Yes, that's a relationship, but in this requirement, there aren't a lot of relationships that we need to maintain. For a very few relationships, we can go for a NoSQL db if it provides a lot more benefits.

On this page

  1. Why do we need URL shortening?

Try it yourself

Designing URL Shortener (video)

  1. Requirements and Goals of the System
  1. Capacity Estimation and Constraints
  1. System Interface Definition
  1. Create Short URL API
  1. Redirect API
  1. Analytics API
  1. URL Management API
  1. Delete Short URL API
  1. Database Design
  1. Basic System Design and Algorithm

a. Encoding actual URL

b. Generating keys offline

  1. Data Partitioning and Replication
  1. Cache
  1. Load Balancer (LB)
  1. Purging or DB cleanup
  1. Telemetry
  1. Security and Permissions