Database Specs - KazztheCajun/petfoodweb GitHub Wiki

Database Specifications

My main goal for the database was to provide a single point of reference for my Server to correctly direct data to the various platforms users will use for my app. I used a MongoDB Atlas cluster to manage the storage and retrieval of data from the database. Inside the database, I created 3 collections to manage the saved homes, saved users, and saved food items.

CRUD Operations:

My server performs these CRUD operations on the database:

  • Add a new home to 'Homes' collection in the database.
  • Update a loaded home with new information generated in the front end.
  • Add a new user to the 'Users' collection in the database.
  • Update a signed in user when they create a new home in the front end.
  • Retrieve a list of homes a signed in user has access to.
  • Load a specific home a signed in user has access to.

Once I get my Pet Food Item database up and running, the server will also:

  • Add a new Food Item to the "FoodItems" collection
  • Update an existing Food Item in the collection.
  • Delete a discontinued Food Item from the collection.

JSON models:

Below is a draft of the JSON templates for the collections in my database, to give an idea of how I arranged my data: