About the WMDB

The contents of the Wellesley Movie Database (WMDB), like the Internet Movie Database (IMDB), is pretty intuitive:

  • There are movies and people.
  • A movie has a list of actors (its cast).
  • A movie also has a person who is the director.
  • In the WMDB, a movie can only have one director.
  • Not every person is an actor. Some might be directors. A person can be both: Clint Eastwood, for example.
  • We will treat the word "actor" as covering all people who act, regardless of gender. (So, just "actors" not "actors and actresses").
  • Actors have a list of movies that they have acted in. This is sometimes called the actor's filmography.

Those are some important entities in the database.

I ask CS 304 students to add movies and people. CS 304 students are called staff, and the database keeps track of staff as well. Each movie and each person records what staff member added it to the database.

Let's talk about each entity in just a little bit more detail.

Staff

Staff (CS 304 students) entities are pretty simple. They have a name and an associated ID number, called a UID (user ID). Scott Anderson has UID=1. Karyn Benson, who took this course many years ago, is UID=2, etc.

Later in the course, we'll talk about passwords and stuff like that.

Staff are stored in a table called, unsurprisingly, staff.

Person

Each person is fairly simple as well. They have the following information:

  • Name
  • birthdate

In addition, each person has a integer ID. This allows us to store two different people who happen to have the same name, so we can talk about person 17 versus person 42, even if they have the same name and birthdate. (Unlikely, but it's possible.)

The ID number is called nm. This is mnemonic for name.

Each person also keeps track of who (what staff member) added them to the database. This is done by storing the UID of that staff member. The UID is stored in a database column called addedby.

This information is stored in a table called person.

Movie

Movies have a title, a year of release, and a director. The director is specified not by name but by the NM of the person who directed, so you can use the NM to look up the name, birthdate and other info about the movie's director.

Each movie has an integer ID. This allows us to distinguish between two different movies with the same title (such as "Hamlet"). The ID is called tt, which is mnemonic for title.

As with people, there is also a column for addedby that is the UID of the person who added the movie.

This information is stored in a table called movie.

Credit

There is a table that stores acting credits (remember that the list of actors and other people shown at the end of a movie are called the credits). That is, it's a set of pairs, (NM,TT), where NM is the ID of the person (actor) and TT is the ID of the movie that the person acted in.

So, a row like (123, 456) says that the person with ID 123 acted in the movie with ID 456.

This information is stored in a table called credit.

Remember that actors and directors are different. The credit table stores acting credits, not directing. A movie's sole director is stored directly in the movie table as the NM of the director.

Entity Relationship Diagram

We can visualize these tables and their relationships with an "Entity-Relationship" (ER) diagram. We'll talk about this in more detail later in the course:

The Wellesley Movie Database (WMDB)

Joins

While each of these tables is useful in itself, they are more powerful in combination. For example, we can find the filmography of a person and the cast of a movie, by using joins: we join the person, credit and movie table to get that information.

Content

One of the things I like about the WMDB is that its contents are collaborative and are built by you: by students in CS 304. (Well, by us, since I've certainly added quite a few entries.) Thus, the contents reflect you.

I love learning about movies and actors from 304 students. It gives me a (tiny) insight into things you enjoy and value. I can look for those movies and put them on my personal watch-list. It's also fun when I discover movies or actors that you and I both like.

George Clooney

I will refer to George Clooney many times in this class. What accounts for my unhealthy obsession with the man? Is it because he's so good-looking, at least for a man as old as I am? (He's actually slightly older, though born the same year as I was.)

No, it's because, just by chance, his IMDB identifying number is 123. Here's the IMDB link for George Clooney: https://www.imdb.com/name/nm0000123/. Notice the URL.

So, when I need an example, I use him. Nothing more nefarious than that.