Today I Learned

TIL, 2020-05-29

Relational vs. non-relational databases: Which one is right for you?


  • Foreign indexes are used to uniquely identify any atomic piece of data within that table.
  • If you want your application to handle a lot of complicated querying, database transactions and routine analysis of data, you’ll probably want to stick with an RDBMS.
  • Referential integrity - the concept in which multiple database tables share a relationship based on the data stored in the tables, and that relationship must remain consistent - usually enforced with cascading actions of adding, deleting, and updating.
  • No unattended child/no orphans: Cannot add a record to linked table unless the foreign key for that record points to an existing record. Cascade delete and cascade update.
  • Before RDBMS, data was stored in a long text file where each entry was separated by the | character.
  • ORM impedance mismatch - when there is a phenomenally huge amount of data, the probability of error increases. In that situation, consider going with a non-relational database.
  • Choosing non-RDBMS:
    • Need to store serialised arrays in JSON objects
    • Storing records in the same collection that have different fields or attributes
    • If you find yourself denormalising your database schema or coding around performance and horizontal scalability issues
    • Problems easily pre-defining your schema because of the nature of your data model
  • Non-RDBMS disadvantages:
    • No joins like in RDBMS, so join is manually in the code.
    • Since it doesn’t treat operations as transactions, you must manually choose to create a transaction and then manually verify it, manually commit it or roll it back.

4 Engineering Manager Skills to Master for Success


  • Technical Ability - both from having a handle on the work they are managing/making trade-offs, and getting respect from their teams.
  • Communication - the best leaders back up their words with behaviour that sets the standard for everyone around them.
  • Good at communicating upwards to superiors and laterally to other departments.
  • Engineering mangers must be sure to make themselves available for questions, even if they’d rather not be interrupted. Pay attention to and prepare the style of communication that suits the other person most effectively.
  • Knowing when, and when not, to get involved. Micromanagement can work in opposition to the goal of accountability.

Coding is not enough


  • Software derives its main purpose from being useful to people.
  • When making software, I consider the whole product - marketing, documentation, people/organisational concerns.
  • I believe software should just work, and should be simple from the user’s perspective, non necessarily a technical one.

This project is maintained by daryllxd