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

Alice:

  • Attribute1(muffin): 5

  • Attribute3(butter): 1

  • Attribute6(milk): 2

Bob:

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

Bookmark(0)
 

Leave a Reply

Please Login to comment
  Subscribe  
Notify of
Translate »