Creating views using db.createCollection

Hi Team,

This is with respect the lecture on views in Chapter 5 (Miscellaneous aggregation) M121. There are two ways to create view as described in the lecture

Option 1 : db.createview(,, ,);
Option 2: db.createCollection(,);

Can you help me understand by providing an example to create views using option 2 i.e., db.createCollection.

Hello @Laks

you will find all needed information here. In case a question remains, please add it to your post. Helping hands are available.

Regards,
Michael

1 Like

Thanks for the pointers @Michael, This is helpful.

1 Like