我有许多以下格式的日志记录
a_id, b_id, c_id, count, x_id, y_id, z_id
对象关系如下
a has_many b
b has_many c
c has_many y
y has_many z
我正在寻找运行以下查询,哪些数据库(关系或任何)结构可以对大量数据进行建模/运行这些查询。
find count for a certain a_id
find count for a certain a_id and set of associated b_id(s)
find count for a set of a_id(s) and set of associated b_id(s)
find count for a certain a_id, b_id and set of associated c_id(s)
find count for a certain a_id, set of b_id(s) and set of associated c_id(s)
find count for a certain x_id
find count for a certain x_id and set of associated y_id(s)
...