Skip to content

SQL vs. NOSQL Database

Justin Wilcox edited this page Jun 7, 2022 · 7 revisions

Original Plan

When I started creating the data model for TextTrader, I had envisioned using some kind of SQL-based database. The reason for this was my familiarity with SQL and the data structure of them. All of the data models, user testing, prototyping, and planning were done with the idea that a SQL database would be used for the project. But as with most aspects of development, the plans changed.

Switching to NoSQL

While completing the API development course (BIT 465) at Cascadia College, we practiced development with two frameworks: API-Gateway with Lambda and Django REST Framework. Due to the time constraints and ease of use of API-Gateway, I decided to go with it for the development of the API. API-Gateway uses DynamoDB by default because of the AWS integration. We also only learned to use API-Gateway with DynamoDB as well, and DynamoDB has free options whereas to create an RDS instance for API-Gateway would be costly. With these considerations in mind, I decided to try my hand at integrating the NoSQL database into the project instead.

New Setup

When first switching to DynamoDB I dropped all the tables in favor of using one table to store all the data as is recommended in all DynamoDB documentation. However, that process was difficult to code for, and after much researching and talking with my mentor I switched to a multi-table setup using 2 tables. One to store all the user information and one for all the book information. You can find the model for the new setup at the bottom of the data models section in this wiki.

Clone this wiki locally