I was asked this question in an interview and don't know the answer. "You are designing a monogdb schema to support queries to include lookups. What should you do?"
The options are
Create a multicolumn index on
a) key value used as primary and foreign key
b) foreign key and most unique column
[ b was my answer because i thought it would avoid collisions. Intereviewer disagreed, didn't tell me the answer.]
OR-
c) Create an index on the key value used as the foreign key
d) Create an index on the key value used as primary key
Interviewer wouldn't tell me more info. about the db. It was like he was reading from a book.