Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NoSQL Hands-on Learning

Live-coded for the Clean Coders software engineering book club for a hands-on demonstration of how easy it is to get up and running with modern NoSQL databases, showing basic usage of different NoSQL database types.

Installation

  1. Clone

    git clone https://github.com/camball/nosql-learning
  2. Install dependencies (ensure you have Python ^3.13 and Poetry installed on your machine)

    poetry install

MongoDB (Document Store)

  1. Install MongoDB

    brew tap mongodb/brew
    brew update
    brew install mongodb-community@8.0
  2. Start a local instance of MongoDB in the background

    brew services start mongodb-community@8.0

Tip

With the above command, MongoDB will stay running on the machine until it is manually stopped—even across system reboots. You can stop the service with brew services stop mongodb-community.

  1. Add documents to MongoDB and query for them

    poetry run mongo

Redis (Key-value Store)

  1. Install Redis

    brew install redis
  2. Start a local instance of Redis in the background

    brew services start redis

Tip

Like our MongoDB instance, starting Redis this way will stay running on the machine until it is manually stopped, and can be stopped with brew services stop redis.

  1. Store a key/value pair in Redis and retrieve that key's value

    poetry run redis

Dgraph (Graph Database)

  1. Ensure the Docker Desktop app is open on your machine (install with brew install --cask docker if needed)

  2. Pull Dgraph image (per Dgraph's instructions)

    docker pull dgraph/dgraph:latest
  3. Run a standalone Dgraph cluster

    docker run -it -p 8080:8080 -p 9080:9080 -v ~/dgraph:/dgraph dgraph/standalone:latest
  4. Add some graph nodes and query for them via GraphQL

    poetry run dgraph
graph TD
    A(name: Alice) -->|follows| B(name: Bob)
    B -->|follows| C(name: Charlie)
    C -->|follows| A
    A -->|follows| C
    D(name: David) -->|blocks| C
Loading

About

Hands-on NoSQL demo for the Clean Coders software engineering book club.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Contributors

Languages