New to noSQL and particularly Firebase. I have a list of articles being retrieved from Firebase with this basic structure:
{
"Items" : [ {
"ArticleID" : 0,
"Title" : "Article1",
"Teaser" : "Lorem Ipsum Dolor",
"PublishDate" : "2017-05-23",
"ArticleText" : "Some article text here...",
"Category" : "Sports"
},
{
"ArticleID" : 1,
"Title" : "Article2",
"Teaser" : "Lorem Ipsum Dolor",
"PublishDate" : "2017-05-22",
"ArticleText" : "Some article text here...",
"Category" : "World"
},
{
"ArticleID" : 2,
"Title" : "Article3",
"Teaser" : "Lorem Ipsum Dolor",
"PublishDate" : "2017-05-23",
"ArticleText" : "Some article text here...",
"Category" : "US News"
}
],
"UserActions" : [
{
"UID" : "3049873049870987x87098",
"ArticleID" : 0,
"Read" : true,
"Liked" : true,
"Saved" : false
},
{
"UID" : "3049873049870987x87098",
"ArticleID" : 2,
"Read" : true,
"Liked" : false,
"Saved" : false
}
]
}
As a registered user is viewing/browsing the articles, we need to know if they've already read the article, liked it, or saved it for later reading so we can show the appropriate icon next to the article.
I'm not sure if I'm structuring this correctly. Something tells me I'm diving into old relational db habits here.