ibm-watson-data-lab / shopping-list

A series of Offline First shopping list demo apps, each built using a different stack.
https://ibm-watson-data-lab.github.io/shopping-list/
68 stars 20 forks source link

Interoperable Data Model #81

Closed bradley-holt closed 6 years ago

bradley-holt commented 7 years ago

An interoperable data model has been outlined here: https://github.com/ibm-watson-data-lab/shopping-list#interoperability

Please provide feedback on this design as comments on this ticket.

vabarbosa commented 7 years ago

would it be useful to include some sort of count or size to the Shopping List which indicates the number of items in the shopping list?

bradley-holt commented 7 years ago

@vabarbosa Good suggestion! I'm inclined to do this using a _count reduce function (which I can add to the README), rather than including it as metadata within a shopping list. This way the shopping list document does not need to be updated every time that a shopping list item is added or removed from the shopping list. What are your thoughts on that?

vabarbosa commented 7 years ago

@bradley-holt works for me. i started thinking the same shortly after i submitted the comment.

bradley-holt commented 7 years ago

I've made several changes to the data model to account for only using Mango and not map/reduce for queries. The reason for this is that Cloudant Sync does not support map/reduce and also that it is best to avoid map/reduce in PouchDB. The least common denominator here is Mango.

Specific changes include:

bradley-holt commented 7 years ago

I've made a few more changes to the data model: