i using spring data cassandra
, having trouble understanding how data model should be. understand cassandra tables denormalized means if have customer object looks this
{ name: "test customer", address: { city: "new york", state: "ny" } }
the corresponding pojos
@table public class customer { @primarykey //just using key example private string name; private address address; } public class address { private string city; private string state; }
so want store customer objects have way retrieve address object associated customer object. of common strategies handle this.
should using composite/compound key in way or create separate pojo can store attributes both objects in denormlized form or other way. hints appreciated.
in cassandra tables created on query want perform (query driven model). please share query or set of queries want perform on table.
Comments
Post a Comment