NOSQL数据存储+ KV缓存
我正在建立一个系统存储促销活动和一系列促销元数据。
一开始,数据看起来像: pasterion_name,pasterion_content,pasterion_location。 我将使用prosepion_name
+ proportion_location
查询数据
,将来可能会有与新的促销事件相关的额外查询属性,例如pasterion_category
。 ..等。我计划将数据存储在诸如DynamoDB之类的NOSQL数据库中,因此我无需使用任何额外的属性迁移表模式。
我有多个数据管道获取促销信息。为了使查询有效,将所有参考字段串联成键(ex:pasterion_location
+ proportion_category
+ pasterion_name
)和存储他们到另一个KV缓存。还是我应该继续向新字段添加索引(例如dynamodb中的pasterion_category
)?
将来最多可能会有10到20个新领域。当检测到新字段时,DynamoDB是否可以将它们存储为第二个索引?或者,只需在后端实现密钥构图逻辑并将其存储在另一个缓存中就很容易。
I am building a system stores the promotion activities and bunch of promotion meta data.
At the beginning, the data looks like:
promotion_name, promotion_content, promotion_location.
And I will query the data with promotion_name
+ promotion_location
In the future, there could be extra query attributes associated with the new promotion events like promotion_category
... etc. I plan to store the data in a NoSQL database like DynamoDB, so I do not need to migrate the table schema with any extra attributes.
I have multiple data pipelines fetching the promotion information. To make the query efficient, would it make sense to concatenate all the reference fields as key (ex: promotion_location
+ promotion_category
+ promotion_name
) and store them to another K-V cache. Or should I keep adding indexes to the new field (like promotion_category
) in DynamoDB?
There're probably going to be at most 10 ~ 20 new fields in the future. Is it possible that DynamoDB can store them as 2nd index when a new field being detected? Or it's easy to just implement key composition logic in backend and store in another cache.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论