Key Technology

Core database

[!danger]
Many candidate trip themselves by trying to compare between NoSQL or SQL, i.e I need relational database because there are relationships or I use NoSQL because i need scale and performance are often flagged as inexprience

Instead focus more about what the database bring to you, focus on the feature you're familiar with i.e: I'm using postgres here because ACID allow me maintain data integrity

There are 2 types

  1. Relational database: Use for transaction data, default choice for product design interview
    1. The interview where we desgin a product (shop or something) not design the consistent hashing one
  2. NoSQL database: Use when these condition happen
    1. Flexible data models without fixed schema
    2. Application needs to scale horizontally across many servers to accomodate large amount of data or high load
    3. Your application dealing with large volumes of data, unstructured data, applications require real-time data processing and analytics

For NoSQL, the two flexible options are:

  1. DynamoDB: breadth of feature
  2. Cassandra: Good choice for write-heavy workload

[!NOTE]
The thing NoSQL can do does not mean SQL cannot do it. For example Postgres can do JSON columns with flexible schema, SQL can also scale horizontally

Blob storage

Normally for blob storage, our core database will store a pointer to the blob storage references. The blob storage has the following attribute

  1. Durability: uses Erasure Coding
  2. Scalability: AWS S3 can be considered as inidifinitely scale, you dont need to care about scalability here
  3. Security: built-in security like encryption at rest, access control features
  4. Upload & download directly at client: use presigned URL to do so
  5. Chunking: when upload large files, we can enable chunking which allow to resume upload