1
我想执行查询,select * from comments_by_post where post_id ='postid'; 我设计意见表如下 -cassandra评论表数据建模
CREATE TABLE comments_by_post (
post_id text,
posted_timestamp timestamp,
actor_id text,
comment_id text,
actor_info frozen<actor>,
actor_type text,
comment text,
PRIMARY KEY (post_id, posted_timestamp, actor_id, comment_id)
) WITH CLUSTERING ORDER BY (posted_timestamp DESC, actor_id ASC, comment_id ASC)
一切顺利,但问题是当演员更新他/她的信息,我怎样才能更新actor_info然后,因为要更新我需要提供POST_ID的信息, posted_timestamp和actor_id,这对于一次更新一行信息是不可行的。什么可能是最佳表格。
问题是更新actor_info,我将不得不提供posting_timestamp,还有actor_id。 –
你能为演员提供定义吗? – Horia