Home icon

Advanced data modeling: Using user-defined types and Protocol Buffers for Amazon Keyspaces

Database Blog



This article demonstrates how to model complex data in Amazon Keyspaces using user-defined types (UDTs) and Protocol Buffers, comparing their strengths and use cases for a real estate property management system.

  • User-defined types (UDTs) provide native CQL integration with server-side schema validation and field-level querying capabilities
  • UDTs support up to eight nesting levels, 256 per region, and 50 per table with a 25 KB schema size limit
  • Protocol Buffers offer schema evolution, compact binary serialization, and cross-language compatibility stored as BLOB fields
  • UDTs require the frozen keyword for nested UDTs and collections but don't support ALTER TYPE after creation
  • Protobuf provides forward/backward compatibility and decoupled application schemas but lacks server-side validation and requires full-object reads for updates
  • Choose UDTs for stable schemas with field-level queries; choose Protobuf for evolving schemas and multi-store portability

Amazon Keyspaces supports both approaches for modeling complex data, enabling developers to select the best solution based on schema stability, query patterns, and evolution requirements.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Oct 31
2024
Amazon Keyspaces (for Apache Cassandra) now supports User-Defined Types
Mar 24
2025
Amazon Keyspaces (for Apache Cassandra) adds Multi-Region support for User Defined Types (UDTs)
Jul 28
2026
Migrate to Amazon Keyspaces with zero downtime using ZDM Proxy
Jul 17
2026
Eclipse Dataspace Components on AWS: Data sharing fundamentals

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.