mongodb - Cassandra data model to store embedded documents -


in mongodb can able store embedded documents collection.then, how store embedded documents cassandra??? sample json representation???

userprofile = { name: "user profile", dave jones: {    email: {name: "email", value: "dave@email.com", timestamp: 125555555},    username: {name: "username", value: "dave", timestamp: 125555555} }, paul simon: {    email: {name: "email", value: "paul@email.com", timestamp: 125555555},    phone: {name: "phone", value: "4155551212", timestamp: 125555555},    username: {name: "username", value: "paul", timestamp: 125555555} } } 

if document nesting level not deep, can use user defined types c* 2.1.

i suggest rethink schema more flat form like:

create table profiles ( name text, name2 text, email text, username text, ts timestamp, primary key (name,name2) // compound primary key! )


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -