NoSql Example Of Separate Collections In One-to-One Relationship; Case Of Specialization And Generalization

When And Why Should Reference Be Used To Link Documents In 1-1 Relation

In my detailed post on NoSql data modeling I listed down ways of modeling NoSql data (using mongodb collections). For one-to-one relation, usually, it’s not apparent why one needs a separate collection instead of embedding everything in single document. In this post I’ll address this and share an example. [Read More]

Unit Testing Expressjs Controller (Part 1)

Stepwise Test Driven Development of Express Mongoose CRUD APIs

So far, I haven’t found a real workable example of unit testing Express controller/route for API. Most I saw either label integration test as unit test or offer little meaningful in right direction. To be clear what I’m talking about, see the controller code below: [Read More]

Develop Two Player Chess Game Application with React Js

With React js, development of two player chess application is a breeze. This tutorial assumes working knowledge of Javascript ES6 and React js. The application’s code is bootstrapped with create-react-app. The initial setup and stylesheet are taken from and built upon React’s official tic tac toe tutorial. [Read More]

Why I Chose Hugo Framework For My First Blog?

A journey of exploring various CMSs, website builders and static site generators before settling on Hugo

If you’re an over-thinker like me, you’re bound to share my experience ahead of launching your first blog. The most strenuous part is platform selection. Wordpress.org? Wordpress.com? Squarespace? Wix? Hubpages? A never ending cycle begins: Weigh pros and cons of each and choose one, only to start over again on second-guessing. [Read More]

Node Express Endpoint to Upload and Process CSV File

It’s very common in Node/Express backend development to come across a requirement of parsing and processing CSV file. Perhaps storing the content in database after processing. This post will do just that. We’ll upload a CSV file, store it temporarily in server’s directory to fetch all rows in JSON form, push all rows in an array, and remove the temporary file. [Read More]

How To Draw NoSql Data Model Diagram?

NoSql, unlike SQL which has ER and class diagrams, has neither names nor constraints for data modeling diagram(s). The obvious reason is NoSql’s lack of hard and fast relationship rules, which aims to get a developer started with minimum requirements. [Read More]

NoSql Data Modeling: 1 to 1, 1 to Many, Many to Many

Surprisingly, data modeling for NoSql databases doesn’t get much traction compared with SQL. 1 to 1, 1 to many and many to many; all can be modeled multiple ways. No favoring of a particular choice, no required normalization. The only constraint is application requirements. [Read More]