Skip to content

Instantly share code, notes, and snippets.

@rogerwschmidt
Last active June 28, 2019 18:36
Show Gist options
  • Select an option

  • Save rogerwschmidt/f8660b26e76a17a3dbed30067ce955f4 to your computer and use it in GitHub Desktop.

Select an option

Save rogerwschmidt/f8660b26e76a17a3dbed30067ce955f4 to your computer and use it in GitHub Desktop.

Revisions

  1. rogerwschmidt revised this gist Mar 22, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion mondodb.md
    Original file line number Diff line number Diff line change
    @@ -17,7 +17,7 @@
    ## Install mongodb
    ```
    brew install mongodb
    mongodb
    mongo
    ```

    ## Explain the differences between a database, collection, and a record
  2. rogerwschmidt revised this gist Mar 22, 2019. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion mondodb.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    # Mongodb + express instructor notes

    ## Objectives
    * Define what mongodb is, and why it is useful
    * Install mongodb
    * Explain the differences between a database, a collection, and a record
    * Add records to a collection
  3. rogerwschmidt revised this gist Mar 22, 2019. 1 changed file with 6 additions and 3 deletions.
    9 changes: 6 additions & 3 deletions mondodb.md
    Original file line number Diff line number Diff line change
    @@ -15,15 +15,18 @@
    * [express-mongo-book-case solution](https://github.com/rogerwschmidt/express-mongo-book-case/tree/solution)
    * https://mongoosejs.com/docs/models.html

    ## Define what mongodb is, and why it is useful
    * Look

    ## Install mongodb
    ```
    brew install mongodb
    mongodb
    ```

    ## Explain the differences between a database, collection, and a record
    * Read over https://docs.mongodb.com/manual/core/databases-and-collections/
    * What is a mongodb database?
    * What is a mongodb collection?
    * What is a mongodb record?
    * How do the above terms compare to a RDB?

    ## Add records to a collection
    * Add a new book to the books collection/schema using the post request
  4. rogerwschmidt created this gist Mar 22, 2019.
    44 changes: 44 additions & 0 deletions mondodb.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,44 @@
    # Mongodb + express instructor notes

    ## Objectives
    * Define what mongodb is, and why it is useful
    * Install mongodb
    * Explain the differences between a database, a collection, and a record
    * Add records to a collection
    * Get all records in a collection
    * Get one record from a collection
    * Delete one record from a collection
    * Update one record in a collection

    ## Resources
    * [express-mongo-book-case](https://github.com/rogerwschmidt/express-mongo-book-case)
    * [express-mongo-book-case solution](https://github.com/rogerwschmidt/express-mongo-book-case/tree/solution)
    * https://mongoosejs.com/docs/models.html

    ## Define what mongodb is, and why it is useful
    * Look

    ## Install mongodb
    ## Explain the differences between a database, collection, and a record
    * Read over https://docs.mongodb.com/manual/core/databases-and-collections/
    * What is a mongodb database?
    * What is a mongodb collection?
    * What is a mongodb record?

    ## Add records to a collection
    * Add a new book to the books collection/schema using the post request

    ## Get all records in a collection
    * Get all books from the books collections/schema

    ## Get one record from a collection
    * Get one book by id from the books collections/schema

    ## Delete one record from a collection
    * Delete one book by id from the books collections/schema

    ## Update one record in a collection
    * Update one book by id from the books collections/schema

    ## Update views counter on get one
    * Update the get one route to find and update one record by id