Skip to content

Instantly share code, notes, and snippets.

@rblalock
Created October 24, 2011 20:03
Show Gist options
  • Select an option

  • Save rblalock/1309990 to your computer and use it in GitHub Desktop.

Select an option

Save rblalock/1309990 to your computer and use it in GitHub Desktop.
Sample nosql
{
"title" : "A blog post",
"author" : "Kristina",
"content" : "...",
"tags" : ["MongoDB", "Map/Reduce", "Recipe"]
}
// RDMS
// 5 tables:
// people, cities, cars, car_cities, car_people
//NoSQL
// 1 collection: 'cities' with 2 attributes: 'people and cars'
Cities = {
'LA': {
people: {
'Rick': {
'location': 'Hollywood',
'status': 'Jugando futbol'
},
'Alan': {
'location': 'West Side',
'isDrunk': true
},
'Dawson': {
'driving': true,
'isDrunk': false,
'car': 'Ferrari'
}
},
cars: ['Ferrari', 'Audi', 'Honda']
},
'Mountain View': {
people: {
'Kincy': {
'working': true
}
},
cars: ['Ford']
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment