Skip to main content Skip to complementary content

Creating a database

Create a database containing data about movies.

Before you begin

You have installed MySQL Server and MySQL Workbench.

About this task

In this use case, you will use your API to read and write data about movies in a database.

Procedure

  1. Open MySQL Workbench and open a local connection.
  2. Create a new schema named moviecatalog, for example.
  3. In this schema, create a new table named movies with the following query:
    CREATE TABLE moviecatalog.movies (movieId int, title varchar(255), releaseYear int, director varchar(255), price float)
  4. In this table, you can:
    • Insert new data using an INSERT INTO query, for example:
      INSERT INTO moviecatalog.movies VALUES (1, "La La Land", 2016, "Damien Chazelle", 4.99)
    • Import the movies_data.csv file.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!