Programming: Databases

From wikinotes

Mobile Offline Mode w/ Replication

dzone offline mode https://dzone.com/articles/how-to-make-mobile-app-work-offline
offline mode indexeddb https://yalantis.com/blog/offline-mode-application/
  • use soft-deletes, and use columns: updated_at, created_at, deleted_at
  • nothing is deleted, the latest decision per row wins

Efficient Pagination

See https://www.slideshare.net/MarkusWinand/p2d2-pagination-done-the-postgresql-way

  • OFFSET is expensive
  • instead use WHERE, and limit results to those you haven't seen yet

JOIN Algorithms

Algorithms: Nested Loop Join
Algorithms: Block Nested Loop Join
Algorithms: Hash Join
Algorithms: Merge Join