INFRASTRUCTURE LEARNINGINFRASTRUCTURE LEARNING
インフラ大全インフラ大全IT INFRASTRUCTURE / LEARNING
Infrastructure learning guide
Find a lesson or lab/

Esc to close · Search terms stay on your device

LEARNING日本語

Topic lessonTopic: AWS databases: design, comparison and connectivity

RDS vs DynamoDB: choose by SQL, data relationships and access patterns

Compare RDS and DynamoDB using relationships, required reads, update boundaries and the existing application. SQL versus NoSQL, or large versus small, is not enough to decide. Use order-management and cart examples to distinguish selection reasons from remaining validation.

What you will learn

Use business reads, writes and migration requirements to explain candidate choices and unresolved checks for RDS and DynamoDB.

Prerequisite

For readers familiar with RDS engines/responsibilities and DynamoDB keys/Query. Cases are fictional; no databases are created, migrated or benchmarked.

Align requirements before comparing product names

Evaluate the same requirements through two designs
Evaluate the same requirements through two designs1: Business reads and writes — Inspect existing SQL and relationships — Relations, SQL, updates. 2: Business reads and writes — Design keys from required reads — Keys and access patterns12Business reads andwritesRelations, SQL,updatesKeys and accesspatternsEvaluate the same requirements through two designs1: Business reads and writes — Inspect existing SQL and relationships — Relations, SQL, updates. 2: Business reads and writes — Design keys from required reads — Keys and access patterns12Business readsand writesRelations, SQL,updatesKeys and accesspatterns
  1. Business reads and writes → Relations, SQL, updatesInspect existing SQL and relationships
  2. Business reads and writes → Keys and access patternsDesign keys from required reads
Business reads and writes
Results, frequency, freshness and update boundaries.
Relations, SQL, updates
Evaluate an RDS engine and data structure.
Keys and access patterns
Design DynamoDB keys, indexes and writes.

The diagram identifies design questions, not a verdict that one side is always correct or faster. Both can implement some workloads; compare redesign and operational work as well.

Keep comparison dimensions aligned
DimensionFor an RDS candidateFor a DynamoDB candidate
RelationshipsTables, PK/FK constraints, joins and selected-engine featuresItems/keys, colocated data and updates to duplicated attributes
ReadsRequired SQL, indexes, plans, workload and resultsGetItem/Query, indexes and any required Scan cost
UpdatesTransactions, constraints and locks under engine-specific behaviorSingle-item changes, conditional operations and supported multi-item transactions
FreshnessDatabase/replica destination, isolation and read behaviorTable/LSI/GSI destination and supported consistency options
Existing applicationSQL, features, drivers and RDS management restrictionsAccess-layer, key, item and index changes, with migration verification
Cost and operationsDeployment/capacity, storage, I/O, backups, transfer and operationsCapacity mode, items/indexes, skew, storage and read/write workload

Example B1: order management with existing SQL and relationships

Fictional ShopOps uses SQL Server with related Customers, Orders and OrderLines tables. Placing an order updates related data, while staff change reporting conditions over time. A requirement is to retain existing SQL and database behavior where practical.

What B1 requirements imply
RequirementReason to evaluate RDS for SQL ServerStill verify
Retain T-SQL and related tablesEvaluate migration within the supported scope of the same SQL Server engineVersion/edition/features, OS dependencies and ordinary RDS restrictions
Update related data togetherCheck whether engine constraints and transaction design can be retainedActual SQL, locking, load and failure outcomes
Changing reporting requirementsEvaluate SQL/index changes for new questionsPlans, indexes, data volume, cost and operations

For the same result, compare how data is associated

Fictional Customers
customer_idregion
101North
202South
Fictional Orders: total PAID points by region
order_idcustomer_idstatuspoints
41101PAID1200
42101PENDING800
43101PAID600
44202PAID400

With these supplied rows, associate customer regions through customer_id and sum only PAID orders: North=1800 and South=400. A join/aggregate design differs from duplicating region on orders or maintaining aggregate items; the latter must define what stays correct when data changes.

Example B2: a keyed cart and predictable access

Fictional CartView retrieves the current cart by customer_id, lists that customer’s items and updates quantities conditionally. Reads and update boundaries are explicit, and the application access layer can be designed for them.

Why evaluate DynamoDB, and what remains to design
RequirementCandidate rationaleRequired checks
Known customer-specific readsAccess can map clearly to PK/SK and QueryOther lists/search/analytics, indexes and pagination
Concurrent quantity changesEvaluate supported conditional updatesMulti-item update boundaries, failures and retries
Immediate confirmation displayAlign authoritative keys with freshness needsDo not treat eventual GSI reads as guaranteed current
Increasing accessEvaluate key design and capacity modeHot keys, item size, measured workload and cost

RDS can also implement a cart. DynamoDB is a candidate when its design fits the access requirements, not because avoiding SQL is always faster or cheaper. New cross-customer searches can require new indexes, aggregates or responsibilities for another service.

Do not infer atomicity or freshness from a product label

Specify two different requirements down to the read path
RequirementMeaningCheck
AtomicityWhether grouped updates succeed or fail as a unitEngine/transaction scope in RDS; supported transactional operations and limits in DynamoDB
Freshness/consistencyWhich completed changes a read must reflectActual destinations: RDS replicas/isolation or DynamoDB tables/LSIs/GSIs

Record selection reasons and assumptions to validate

  1. Write concrete reads, writes, relationships and consistency needs.
  2. Identify existing SQL/features to retain and application changes allowed.
  3. Design keys/tables/indexes/updates/read paths for each candidate.
  4. Align data volume, workload, availability/recovery and cost assumptions.
  5. Validate representative operations, failure outcomes, performance and cost; record the decision.

The small examples do not finalize a real deployment decision. RDS still requires engine/configuration choices; DynamoDB still requires access/update design and operation. If these two do not cover the workload, consult the AWS database decision guide for other candidates.

Match requirements to selection reasons

Choose an option to see the result and explanation.

B1 needs to retain SQL Server SQL/features. What is a reasonable first candidate?
Read the answer and reason

Answer: Evaluate RDS for SQL Server against versions, features and management restrictions. · Consider engine continuity while checking unsupported dependencies.

What are B1 PAID points totals by region?
Read the answer and reason

Answer: North=1800, South=400. · Associate customers and sum PAID orders 41/43/44 only.

Is “DynamoDB has no multi-item transactions” a correct reason to reject it?
Read the answer and reason

Answer: No; check supported transactional operations and constraints. · The NoSQL category alone does not decide atomicity.

B2 now needs cross-customer predicate searches. Does choosing DynamoDB remove further design work?
Read the answer and reason

Answer: No; reevaluate indexes, access design, load and cost. · Changed requirements require reassessing the supporting design.

Check, then explain in your own words

  1. Explain B1/B2 candidate choices beyond scale.
  2. Verify North=1800/South=400.
  3. Separate atomicity from read-path freshness.
  4. Retain migration/performance/cost checks as acceptance conditions.
Check your understanding: Does choosing RDS remove B1 index design, or choosing DynamoDB remove B2 operational design?

Neither. Separate provider-managed tasks from business-specific SQL/keys/indexes, access, consistency, cost and recovery decisions.

Product selection does not replace the design and validation needed to meet requirements.

Sources and conditions checked

The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.