mongodb is a nosql database, which contains db,collection and document, and compare with relation database, db->schema, collection->table, document->records.
how to install mongodb in macbook, please follow below steps.
step1: brew install mongodb
step2: brew services list
step3: brew services start mongodb ---start mongodb
step4: mongo ---connect to mongodb