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