Skip to content

Instantly share code, notes, and snippets.

@phatduckk
Created June 12, 2009 19:43
Show Gist options
  • Save phatduckk/128866 to your computer and use it in GitHub Desktop.
Save phatduckk/128866 to your computer and use it in GitHub Desktop.
// a sample representation of a user in Cassandra
usersTable = { // table for user data
'phatduckk' : { // row w/ key "phatduckk"
'addresses' : { // column family of type "Super"
"work" : { "street" : "12345 Main street", 'city': "San Francisco", "state" : "CA", "zip": "90210" }, // column family
"home" : { "street" : "7 Foobar street", 'city': "San Mateo", "state" : "CA", "zip": "94666" } // column family
},
'socialNetworks' : { // column family of type "Super"
"com.digg" : {"url" : "http://digg.com/users/phatduckk", "rss": "http://digg.com/users/phatduckk"}, // column family
"com.twitter" : {"url" : "http://twitter.com/phatduckk", "rss": "http://twitter.com/phatduckk?output=rss"}, // column family
"com.facebook" : {"url" : "http://facebook.com/user.php?id=xxx", "rss": "http://facebook.com/user.php?id=xxx&output=rss"} // column family
},
'profile' : { // column family of type "Standard"
"username" : "phatduckk", // column
"email" : "arin@example.com", // column
"id" : "0123456789012345678901234567890123456789", // column
"numFriends" : "666" // column
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment