What is Mongoose and how is it used?
Mongoose is an ODM (Object Data Modeling) library for MongoDB in Node.js. It provides:
- Schema-based data modeling
- Validation
- Middleware (hooks)
- Easy querying and relationship management
You define schemas and models to interact with MongoDB more intuitively.