Skip to main content

DynamoDB SQL Vs PostgreSQL Vs MongoDB

 Choosing the right database for your project can be a challenging task, especially when dealing with a large dataset. Recently, Axcito was approached by a client who wanted to perform a Proof of Concept (POC) on which database to use for their very large dataset, which they intended to open via public APIs. In this article, we will discuss how Axcito approached the decision-making process for selecting the appropriate database for the client's needs.

Decision Drivers


Axcito had several decision drivers for selecting the appropriate database for the client, which included:

  • Delivering quickly is very important
  • Data model might change over time
  • Data will be used for analytics and/or machine learning
  • Should be easy to manage (Managed service is preferred)

Considered Alternatives

Axcito evaluated several database alternatives, which included:

  • DynamoDB
  • SQL (MySQL or PostgreSQL)
  • MongoDB

 

Pros and Cons of the Alternatives


DynamoDB:

The client had already used DynamoDB in the project, and they loved it for its speedy retrieval when required, which was critical for their mobile app performance. However, DynamoDB is not flexible when new data access patterns are created, which is the case for this dataset. Additionally, it might be a total new tech to learn for developers, and there is minimal tooling to play with it locally. DynamoDB could get expensive quickly if more reads occur, and once you have data in Dynamo, it might be challenging to move the data to a different type of storage.

SQL (MySQL or PostgreSQL):

SQL is almost familiar to all developers, and there are AWS managed RDBMS services like Aurora. It is easy to retrieve data and create new indexes, and automatic minor software patching ensures that the PostgreSQL software powering your deployment stays up-to-date with the latest minor patches. However, whenever data model changes, there will be database changes and backend code changes. Additionally, it is not a global database, since you only have one master database, resulting in increased latency when being further away from the region where the database is deployed.

MongoDB:

MongoDB is a document database that keeps semi-structured data along with its description in the document format, and it has a dynamic schema for new/unstructured data. It is easy to retrieve data and create new indexes, and data can be flexibly stored without having a pre-defined structure. However, it is not a good fit for complex queries as there is no standard interface in NoSQL for handling queries, and it is not an AWS managed service, which would require managing the platform for it.

Decision Outcome


After the POC, Axcito gave up on DynamoDB since data access patterns were not consistent, and it required more proficiency. At the time, there was no managed AWS service for MongoDB. Axcito decided to design a new database in AWS managed PostgreSQL with a database backup plan and migrate the current data to the new database, mostly manually. The team agreed to maintain quality documentation from design to tool around the database and placed the RDS database in a private subnet to ensure security. Access to the database with a GUI tool became complex, and access to the database CLI was through Session manager. The team also considered moving to Aurora for better performance globally.

Conclusion


Choosing the right database for your project is critical to its success. Axcito's decision to use PostgreSQL was based on the client's needs and the decision drivers for the project. The team considered several alternatives before settling on PostgreSQL, which was the best fit for the project. We hope this article helps you in your decision-making process for your next project. If you need help, feel free to reach out to Axcito.

Comments

Popular posts from this blog

Axcito expands pesence in Sri Lanka with a new development center

    We are thrilled to announce the opening of our new development center and office in Sri Lanka, marking a significant milestone for Axcito as a global company. This expansion reinforces our commitment to innovation, growth, and collaboration as we continue to serve our customers worldwide. While Axcito'ss main headquarters remains in the USA, we also have teams located in Australia and Sri Lanka. The new office allows us to grow our Sri Lankan team and operations, providing an ideal training environment, especially for interns and recent graduates. Our previous office in Maharagama, Sri Lanka remains as our operation office for Sri lankan team. The new larger space features meeting rooms and areas for teams to collaborate effectively, essential as we hire more staff in Sri Lanka. This physical office space is invaluable for interns, who gain hands-on experience working in a professional environment, enriching their learning and development. Additionally, having a dedicated ...

How to fine tune the Marketing Strategy

  Achieve Your Business Goals with Expert Guidance Are you feeling stuck with your current marketing strategies or frustrated by lack of results? You’re not alone. Many businesses struggle to get the desired outcomes from their marketing efforts. Whether it’s low engagement rates, poor conversion metrics or whether not knowing where to start. Recently, we had the opportunity to help a mid-sized mobile phone dealership that was facing several marketing challenges hindering its growth. They have a robust product line and a beautifully designed official website. Despite these strengths, they struggled with low engagement rates, poor conversion metrics, and uncertainty in strategic planning. Determined to overcome these obstacles, they partnered with Axcito to revamp their marketing efforts. This case study highlights the transformative steps taken and the remarkable results achieved through this collaboration. 1. Identify Problem Areas During our initial consultation, the owner of the...

A Message from Axcito: Our Apologies for the Lack of Blog Posts

It's been a while since we last posted on our blog, and we wanted to apologize to all our followers for the long silence. Rest assured that we have been keeping ourselves very busy, and we have some exciting news to share. Since our last blog post, Axcito has been growing faster than ever as a full global team. Our team has expanded to mainly in three countries - USA, Sri Lanka, and Australia - and each entity operates independently. Nevertheless, we work together globally and support each other as needed. But some of the clients and some members are from different counties. In the past few months, we have been involved in several exciting projects. Our focus has been on web and mobile application development, software quality assurance, cyber security and penetration testing, and SEO projects. We are pleased to announce that we have been recognized as one of the best mobile app development firms and top professional eCommerce agencies in USA, Sri Lanka, and Australia. Our team is ...