Skip to content

lapuzshawn/Mini-Movie-Database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Module 12 Mini-Project: Movie Database

In this mini-project, you will build Rest API routes for creating, retrieving, and deleting movies from a MySQL database.

User Stories

  • As a user, I want to create a new database.

  • As a user, I want to store movie names and reviews in the database in two separate table.

  • As a user, I want to see a list of all movies.

  • As a user, I want to be able to create and delete a movie.

  • As a user, I want to return a list of all the reviews and the associated movie name.

Acceptance Criteria

  • It's done when movie_db is created and contains a movies and reviews table.

  • It's done when movie_db has been seeded with data.

  • It's done when the /api/movies route renders a list of all movies.

  • It's done when the /api/add-movie route successfully adds a movie when tested using Insomnia.

  • It's done when the /api/update-review route successfully updates a movie when tested using Insomnia.

  • It's done when the /api/movie/:id route deletes a route when tested using Insomnia.


Assets

Design the following database schema that contains two tables:

The database schema includes a movies table and a reviews table, linked by the movie id.


Notes

To test your routes you will use Insomnia. If you have not already downloaded it, you will need to visit the Insomnia download page and do so.

Refer to the documentation:

Insomnia documentation on getting started

Express.js documentation on routing

MySQL documentation on joins

npm documentation on MySQL2

💡 Hints

How can you link your movies and reviews tables?

How can you execute a query in an Express.js server using the npm MySQL2 package?

🏆 Bonus

If you have completed this activity, work through the following challenge with your partner to further your knowledge:

  • How can you add a route to update a review?

Use Google or another search engine to research this.


© 2023 edX Boot Camps LLC. Confidential and Proprietary. All Rights Reserved.

About

# Module 12 Mini-Project: Movie Database

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published