user defined data types in Cassandra

时间:2015-05-12 22:39:59

标签: cassandra

I’ve a query regarding data modelling in Cassandra, would appreciate some suggestions here.

We’re trying to build a multi-tenant application where we expect data structure to be defined by the users. A user may define a data source, number of fields, their data types, ordering etc. and then upload data based on this structure. How can we design such an application on top of Cassandra since it doesn’t support a list of mixed data types. The current collection types are Map (same types)/Set/List (same type). Moreover, is it possible to query data based on the user defined entities?

Presently, we're thinking of maintaining a single Map and convert all the values into blob before storing. It doesn't definitely allow to query (only with CONTAINS clause), but helps to structure the problem. Any other potential methods?

1 个答案:

答案 0 :(得分:0)

很难准确掌握你想要实现的目标但是我能理解的是,我认为地图/设置/列表方法不足以让你遇到性能问题。 UDT在这方面是类似的。它们总是作为一个整体加载/读取,就像它们是一个blob。

阅读Collections了解详情。