Giter VIP home page Giter VIP logo

movie-database's Introduction

Unit 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/add-movie route successfully adds a movie when tested using Insomnia. (post)

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

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

  • It's done when the /api/movie-reviews route successfully gets all movies and the associated reiviews. (get)(join)

  • It's done when the /api/review/:id route successfully updates a review pertaining to a specific movie. (put)


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.


ยฉ 2022 Trilogy Education Services, LLC, a 2U, Inc. brand. Confidential and Proprietary. All Rights Reserved.

movie-database's People

Contributors

mccoydidericksen avatar j-pohahau5 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.