NOSQL数据存储+ KV缓存

发布于 2025-02-10 08:19:09 字数 622 浏览 0 评论 0原文

我正在建立一个系统存储促销活动和一系列促销元数据。

一开始,数据看起来像: 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文