Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 2.19 KB

adr-07-database-selection-strategy.md

File metadata and controls

37 lines (24 loc) · 2.19 KB

ADR-07: Database Selection Strategy

Status

Adopted

Context

The trip management dashboard requires an efficient, scalable, and reliable database system to store and manage user data, reservations, travel details, and analytics. The primary paradigms are:

  • SQL: Relational databases like PostgreSQL and MySQL which offer structured data storage using tables.
  • NoSQL: Non-relational databases like Cassandra and MongoDB which are typically more scalable and offer flexible data models.
  • Mixed Strategy: Using a combination of both SQL and NoSQL databases based on specific use cases and requirements.

Decision

A Mixed Strategy is chosen for the trip management dashboard due to:

  1. Data Variety: Different aspects of the application, such as user profiles, trip details, and analytical data, may have varied storage requirements.
  2. Scalability: While NoSQL databases like Cassandra offer high write scalability, SQL databases might be preferred for complex queries and transactional data.
  3. Flexibility: Leveraging the strengths of both database types allows for a more flexible data strategy.
  4. Optimized Cost: Some data, like analytical data, might be more cost-effectively stored in NoSQL, while transactional data might benefit from the robustness of SQL.
  5. Performance: Certain operations can be more performant on one type of database than the other.

Consequences

Pros:

  • Best of Both Worlds: Can utilize the specific strengths of each database type.
  • Flexibility for Future: As application needs evolve, having a mixed strategy provides flexibility.
  • Performance Optimizations: Can ensure optimal performance for diverse application needs.

Cons:

  • Increased Complexity: Managing multiple databases can introduce complexity.
  • Data Synchronization: Ensuring consistency between different databases can be challenging.
  • Operational Overhead: More effort required for backup, maintenance, and monitoring of multiple databases.