Tuesday, November 19, 2013

SQL Movie Database

I started on the database for list of movies people like and I got pretty far. I made 2 files, 1 to make the tables and another to insert values. This is it so far.
Tables
Values

When you select the likes table you currently get people's ID's matched with the ID's of movies they like.

sqlite> select * from likes;
3|1
1|2
2|2
3|3



I'll also add some more values later.

1 comment:

  1. Awesome! Please add:

    INSERT INTO PERSON (PersonID, Fname, Lname)
    VALUES (13, "Jeff", "Elkner");
    INSERT INTO LIKES (PersonID, MovieID)
    VALUES (13, 1);

    This is *way* cool! I see you are using foreign key constraints. Which resource did you use to learn about that?

    ReplyDelete