Database Design for Dropbox System Design

To understand Database design one should understand

  • Each user must have at-least one device.
  • Each device will have at-least one object (file or folder). Once user registers, we create a root folder for him/her making sure he/she has at-least one object.
  • Each object may have chunks. Only files can have chunk, folders can’t have chunks.
  • Each object may be shared with one or multiple users. This mapping is maintained in AccessControlList.

We need the following tables to store our data:

5.1 Users

Users




{
  user_id(PK)
  name
  email
  password
  last_login_at
  created_at
  updated_at
}


5.2 Devices

Devices




{
  device_id(PK)
  user_id(FK)
  created_at
  updated_at
}


5.3 Objects

Objects




{
    object_id(PK)
    device_id(PK,FK)
    object_type
    parent_object_id
    name
    created_at
    updated_at
}


5.4 Chunks

Chunks




{
    chunks_id(PK)
    object_id(PK,FK)
    url
    created_at
    updated_at
}


5.5 AccessControlList

AccessControlList




{
    user_id(PK,FK1)
    object_id(PK,FK2)
    created_at
    update_at
}


Design Dropbox – A System Design Interview Question

System Design Dropbox, You might have used this file hosting service multiple times to upload and share files or images. System Design Dropbox is a quite common question in the system design round. In this article, we will discuss how to design a website like Dropbox.

Important Topics for the Dropbox System Design

  • Requirements Gathering for Dropbox System Design
  • Capacity Estimation for Dropbox System Design
  • High-Level Design(HLD) of Dropbox System Design
  • Low-Level Design(LLD) of Dropbox System Design
  • Database Design for Dropbox System Design
  • API Design for Dropbox System Design
  • Scalabilty for Dropbox System Design

Similar Reads

1. Requirements Gathering for Dropbox System Design

Functional Requirements:...

2. Capacity Estimation for Dropbox System Design

Storage Estimations:...

3. High-Level Design(HLD) of Dropbox System Design

...

4. Low-Level Design(LLD) of Dropbox System Design

A lot of people assume designing a Dropbox is that all they just need to do is to use some cloud services, upload the file, and download the file whenever they want but that’s not how it works. The core problem is “Where and how to save the files? “. Suppose you want to share a file that can be of any size (small or big) and you upload it into the cloud....

5. Database Design for Dropbox System Design

To understand Database design one should understand...

6. API Design for Dropbox System Design

...

7. Scalabilty for Dropbox System Design

...

8. Conclusion

...