Database

Basics

Relational DB

NoSQL #NoSQLFor?arrow-up-right

  • Column-oriented

    • Cassandra

      • Strength:

        • ability to scale while still being reliable

        • high availability (high velocity writes, and lower velocity reads)

      • Structured / non-structured data. Flexible wide column.

      • A cluster of equal-privileged nodes in a ring structure.

  • Graph

  • Document-oriented

    • Mongo

      • JSON document based

  • Key-value

    • Properties:

      • Can provide a good look up for sharded RDB

    • ready to talk about:

      • Cache Hit Ratio

      • Evictions

      • Expired objects

    • Redis

      • Support persistence

      • Support key-objects (string, hash, list, set, sorted set)

      • Can selectively outdate data

      • Support single threaded only

    • Memcached

    • Advanced data structures

Trouble Shooting

Implementation:

  • Designing a friend list

    • Relational DB

      • Instead of just insert 1 row and do bi-directional search. Insert 2 rows at the same time to describe from both user's perspectives would help keep search SQL simple and make sharding possible.

    • NoSQL

Reference:

Reference

Last updated