Coding / Programming Videos

Post your favorite coding videos and share them with others!

(x-post mongoDB) How to deal with an infinite number of possible schemas? (due to permutations of attributes) : javascript

Source link

We are trying to build a database based on data that looks like this: (for example)

The attributes are the items that customers bought


  • Attribute1(muffin): 5

  • Attribute3(butter): 1

  • Attribute6(milk): 2


As you can imagine, the store has over 100+ (but finite) number of items that a customer can buy. We do have a list of all the possible items that someone can buy.

Due to permutations of possible attributes and individual behavior, the customers cannot be categorized into pre-defined types (i.e. fruit-only buyers, dairy-only buyers etc.)

How can we build such a database?

We are using SailsJS and MongoDB

Source link


Leave a Reply

Please Login to comment
Notify of
Translate »