kjeganathan / peer-recognition-tool

The peer recognition tool is a tool to recognize peers for their achievements, accomplishments, and contributions.
0 stars 0 forks source link

Determine Best Database Type to Use #3

Closed kjeganathan closed 3 years ago

kjeganathan commented 3 years ago

Research database design and decide between relational, non-relational, and graph databases.

Deliverables:

dhsavell commented 3 years ago

@PYee1999, @ShotaroSessions, and I worked together to research relational, non-relational and graph databases for this project.

Pros & Cons

This document contains our research, which is summarized below.

SQL/Relational

NoSQL/Non-Relational/Document

Graph

Proposal: Non-Relational Database

Based on our discussion, we think a NoSQL document database like MongoDB will strike a good balance between efficiency and ease of use for our team. For us, these were the main deciding factors:

  1. Simple, object-oriented interface. Most NoSQL databases have JS drivers that let you work directly with objects, eliminating the need to write SQL queries and deconstruct their responses. (An ORM solves this problem for SQL databases, but could add complexity as a separate "moving part.")
  2. Good cloud support. If scaling is necessary, it's easy to acquire more resources on Google Cloud, AWS, Azure, etc.
  3. Well-known tech stack. NoSQL databases are very popular in conjunction with frameworks like Express, Angular, and React (see "MERN stack"), all of which the infrastructure team are considering. This makes it easy to find relevant tutorials and manuals.

If we go through with this decision, we will have to make sure we're aware of the downsides by keeping queries simple and making our data consistent.

We did note the benefits of choosing a SQL database for this app. It would be easier to express our relationships and run queries like "most values met" and "most recognized." Additionally, our data format is mostly fixed. However, given our timeframe, scope, and stack (so far), we think NoSQL will make life a little easier.

Example Dataset

Simply getting the data in our database would be trivial. We could create collections for employees and values using the data as-is. This would only take a few lines of JavaScript to get up and running.

Realistically, we would want to make some changes. For example, we probably shouldn't store passwords in plaintext like they are presented in the data export. We would also want to think about what we want our query results should look like, and model the data based on that.

Sources