Advanced Mongo/Mongoose


Advanced Mongo/Mongoose

1. Why would a developer choose to make data models?

Data models are the building plans which help build a conceptual model and set the relationship between data items. Data models help a developer understand how a database will be built, and so that it is done in a way that makes sense.

2. What purpose do CRUD operations serve?

  • Create: Creates a new record within a data model / database.
  • Read: Reads records from a data model / database.
  • Update: Updates records in a data model / database.
  • Delete: Deletes a record from a data model / database.

3. What kind of database is Postgres? What kind of database is MongoDB?

  • Postgres is an object-relational SQL database
  • MongoDB is an document-oriented NoSQL database used for high volume data storage.

4. What is Mongoose and why do we need it?

Mongoose provides a straight-forward, schema-based solution to model your application data. It includes built-in type casting, validation, query building, business logic hooks and more, out of the box.

5. Describe how NoSQL Databases scale horizontally

NoSQL Databases are designed to expand horizontally, meaning that you scale by adding more machines in your pool of resources. Relational Databases scale vertically, meaning they scale by increasing server hardware power

6. Give one strong argument for and against NoSQL Databases

  • for: NoSQL has no schema, meaning the format of the data saved can be changed at any time.
  • Against: NoSQL is open source, and no two NoSQL databases are equal. Meaning you have to learn each version if you plan on switching around databases.

Take my foodiejournal.com as example, it has blogers, recipes and ingradians. each recipes saved on this website would belongs to a unique bloger, and the recipe contains many different ingradians.

8. Name 3 cloud based NoSQL Databases

  • Oracle NoSQL Database
  • DynamoDB by Amazon Web Services
  • Atlas: MongoDB Company