Created
December 17, 2015 00:04
-
-
Save udacityandroid/6770270e7b3fd26f046f to your computer and use it in GitHub Desktop.
Firebase - Lesson 4 - New Database Schema Design
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"sharedWith" : { | |
"<list pid>" : { | |
"<person to share with email>" : { | |
"email" : "the user's encoded email; this should match the key", | |
"hasLoggedInWithPassword" : true, | |
"name" : "the first and last name of the user", | |
"timestampJoined" : { | |
"timestamp" : 1447801490493 | |
} | |
} | |
} | |
}, | |
"shoppingListItems" : { | |
"<shopping list pid>" : { | |
"<item pid>" : { | |
"bought" : true, | |
"boughtBy" : "the encoded email of the user who bought the item", | |
"itemName" : "the item's human readable name", | |
"owner" : "the encoded email of the item's creator" | |
} | |
} | |
}, | |
"userFriends" : { | |
"<user email>" : { | |
"<friend email>" : { | |
"email" : "the user's encoded email; this should match the key", | |
"hasLoggedInWithPassword" : true, | |
"name" : "the first and last name of the user", | |
"timestampJoined" : { | |
"timestamp" : 1447801490493 | |
} | |
} | |
} | |
}, | |
"userLists" : { | |
"lylafish@gmail,com" : { | |
"<list pid>" : { | |
"listName" : "the human readable name for the shopping list", | |
"owner" : "the encoded email of the list owner", | |
"timestampCreated" : { | |
"timestamp" : 1448321875922 | |
}, | |
"timestampLastChanged" : { | |
"timestamp" : 1448322115479 | |
}, | |
"usersShopping" : { | |
"<shopper email>" : { | |
"email" : "the user's encoded email; this should match the key", | |
"hasLoggedInWithPassword" : true, | |
"name" : "the first and last name of the user", | |
"timestampJoined" : { | |
"timestamp" : 1447801490493 | |
} | |
} | |
} | |
} | |
}, | |
"onecooldude@gmail,com" : { | |
"<list pid>" : { | |
"listName" : "the human readable name for the shopping list", | |
"owner" : "the encoded email of the list owner", | |
"timestampCreated" : { | |
"timestamp" : 1448321875922 | |
}, | |
"timestampLastChanged" : { | |
"timestamp" : 1448322115479 | |
}, | |
"usersShopping" : { | |
"<shopper email>" : { | |
"email" : "the user's encoded email; this should match the key", | |
"hasLoggedInWithPassword" : true, | |
"name" : "the first and last name of the user", | |
"timestampJoined" : { | |
"timestamp" : 1447801490493 | |
} | |
} | |
} | |
} | |
}, | |
"swordstress@gmail,com" : { | |
"<list pid>" : { | |
"listName" : "the human readable name for the shopping list", | |
"owner" : "the encoded email of the list owner", | |
"timestampCreated" : { | |
"timestamp" : 1448321875922 | |
}, | |
"timestampLastChanged" : { | |
"timestamp" : 1448322115479 | |
}, | |
"usersShopping" : { | |
"<shopper email>" : { | |
"email" : "the user's encoded email; this should match the key", | |
"hasLoggedInWithPassword" : true, | |
"name" : "the first and last name of the user", | |
"timestampJoined" : { | |
"timestamp" : 1447801490493 | |
} | |
} | |
} | |
} | |
}, | |
"americanguyw1521@gmail,com" : { | |
"<list pid>" : { | |
"listName" : "the human readable name for the shopping list", | |
"owner" : "the encoded email of the list owner", | |
"timestampCreated" : { | |
"timestamp" : 1448321875922 | |
}, | |
"timestampLastChanged" : { | |
"timestamp" : 1448322115479 | |
}, | |
"usersShopping" : { | |
"<shopper email>" : { | |
"email" : "the user's encoded email; this should match the key", | |
"hasLoggedInWithPassword" : true, | |
"name" : "the first and last name of the user", | |
"timestampJoined" : { | |
"timestamp" : 1447801490493 | |
} | |
} | |
} | |
} | |
} | |
}, | |
"users" : { | |
"<user email>" : { | |
"email" : "the user's encoded email; this should match the key", | |
"hasLoggedInWithPassword" : true, | |
"name" : "the first and last name of the user", | |
"timestampJoined" : { | |
"timestamp" : 1447801490493 | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment