Aralin 1Pagpili ng partition key at sort key patterns para sa mga gawa at kasaysayan (composite keys, prefixes)Matututunan kung paano pumili ng epektibong partition at sort key patterns para sa mga gawa at item ng kasaysayan. Galugarin ang composite keys, key prefixes, at mga tradeoffs sa disenyo na nakakaapekto sa query flexibility, scalability, at write distribution sa mga production system.
Composite key design para sa mga gawa at item ng kasaysayanPaggamit ng key prefixes upang i-grupo ang mga kaugnay na task recordsPagdidisenyo ng keys para sa pantay na write at read distributionPatterns para sa time-ordered task history queriesAralin 2Mga pagsasaalang-alang sa Backup, restore, at point-in-time recovery para sa task data at history logsMatututunan kung paano protektahan ang mga task at history data gamit ang mga backup at recovery options. Unawain ang on-demand backups, point-in-time recovery, restore workflows, at kung paano magdisenyo ng mga schema at proseso na sumusuporta sa ligtas, testable recovery.
Pag-activate at pamamahala ng point-in-time recoveryPaglikha at pag-restore ng on-demand backupsPagdidisenyo ng restore workflows para sa mga task tablePag-test ng recovery at pag-minimize ng data lossAralin 3Pag-serialize ng Data at attribute types: strings, numbers, maps, lists, booleans, at tradeoffs para sa complex attributesGalugarin ang mga DynamoDB attribute types para sa task data, kabilang ang strings, numbers, maps, lists, at booleans. Matututunan ang mga serialization strategies para sa complex fields, tradeoffs para sa nested structures, at kung paano nakakaapekto ang mga pagpili sa indexing at query costs.
Paggamit ng scalar types para sa core task attributesMaps at lists para sa flexible metadata fieldsPag-imbak ng timestamps at numeric countersTradeoffs ng nested at complex attributesAralin 4Pagdidisenyo ng Item attribute: task item schema na may types (taskId, title, description, status, updatedAt, metadata)I-define ang malinaw na schema para sa mga task item, kabilang ang mga identifier, title, description, status, timestamps, at metadata. Matututunan ang mga pagpili ng type, required versus optional fields, at mga pattern na sumusuporta sa ebolusyon nang hindi kailangan ng migrations.
Core fields: taskId, title, at descriptionPagmo-model ng status at updatedAt nang consistentPagdidisenyo ng flexible metadata structuresSchema evolution nang hindi gumagamit ng heavy migrationsAralin 5Pagmama-map ng Access patterns: queries para sa single task, task history na in-order ayon sa oras, paglilimsa ng recent tasks, pagination strategiesI-map ang mga tunay na access patterns sa DynamoDB queries para sa mga gawa at histories. Matututunan na i-query ang single task, kunin ang ordered history, maglista ng recent tasks, at i-implement ang pagination gamit ang key conditions, filters, at maingat na sort key design.
Pag-query ng single task at ang pinakabagong state nitoPagkuha ng task history na in-order ayon sa timestampPaglilimsa ng recent o active tasks nang efficientPagination gamit ang LastEvaluatedKey at limitsAralin 6Primary key at secondary index strategies: GSIs at LSIs para sa alternative queries (by status, by user)Magdisenyo ng primary keys at secondary indexes upang suportahan ang mga alternative queries, tulad ng by status o user. Matututunan kung kailan gagamitin ang GSIs versus LSIs, mga pagpili ng index key, projected attributes, at kung paano nakakaapekto ang mga indexes sa cost at throughput.
Pagpili ng primary keys para sa main task accessPagdidisenyo ng GSIs para sa status-based queriesIndexes para sa pag-query ng tasks by user o ownerProjection choices at index cost impactsAralin 7Pagmo-model ng conditional updates at optimistic concurrency gamit ang ConditionalExpression at attribute_exists/attribute_not_existsMag-model ng ligtas na concurrent updates sa mga gawa gamit ang DynamoDB conditions. Matututunan ang optimistic concurrency gamit ang version attributes, ConditionalExpression, at attribute_exists checks upang maiwasan ang lost updates at ipatupad ang business rules.
Version attributes para sa optimistic concurrencyPaggamit ng ConditionalExpression sa updatesPaggamit ng attribute_exists at attribute_not_existsPaghawak ng conditional check failures nang ligtasAralin 8Pagdidisenyo ng Item attribute: history item schema na may types (taskId, eventId, status, previousStatus, changedBy, timestamp, reason)Magdisenyo ng matibay na schema para sa mga task history item, kabilang ang mga identifier, status transitions, audit fields, at reasons. Matututunan kung paano pumili ng attribute types, ipatupad ang consistency, at suportahan ang efficient queries at analytics sa task lifecycle events.
Core identifiers: taskId at eventId choicesPagmo-model ng status at previousStatus transitionsPagkuha ng changedBy, timestamp, at reasonPagpili ng attribute types para sa history fieldsAralin 9Pagpili ng DynamoDB table at rationale para sa single-table vs multi-table designsUnawain kung kailan gagamitin ang single DynamoDB table versus multiple tables para sa task tracking. I-compare ang isolation, cost, at operational complexity, at matututunan kung paano i-align ang table design sa microservices, ownership, at access patterns.
Kailan ang single table ang angkop sa task tracking needsKailan ang multiple tables ang mas magandang pagpiliPagmo-model ng ownership at service boundariesCost, limits, at operational tradeoffsAralin 10Mga pinakamahusay na gawain sa DynamoDB: capacity modes, write patterns, conditional writes, atomic counters, transactions, at TTL para sa lumang history entriesI-apply ang mga pinakamahusay na gawain sa DynamoDB sa mga task tracking workloads. I-compare ang capacity modes, magdisenyo ng efficient write patterns, gumamit ng conditional writes, atomic counters, transactions, at TTL upang pamahalaan ang lumang history entries at kontrolin ang storage growth.
Pagpili sa pagitan ng on-demand at provisioned capacityPagdidisenyo ng write patterns para sa hot task itemsPaggamit ng conditional writes at atomic countersTransactions at TTL para sa aging history data