Homework

1. One more ERD...

  • Create an ERD (on paper, paint, photoshop, whatever...) for Instagram
  • Take a photo with your camera / save it to your 05.../your_name/ folder as instagram_erd.png
  • You should have the following tables:
    • Users
    • Photos
    • Hashtags
  • Unsure how to use Instagram? Ask a classmate or look it up!

2. Migrations

  • Create a migrations.sql for your Instagram ERD!
  • So create a database, connect to it, and add tables!

3. Migrations

  • Create a migrations.sql for each of the four applications you had to model today!
  • So create a database, connect to it, and add tables!
  • Those apps are...
    • Paypal: users, purchases, gifts
    • Facebook: users, likes, status_updates
    • Huffington Post: sections, articles, authors
    • Reddit: users, subreddits, votes

4. Adding and Querying Data

  • In a file called add_query.sql...
  • Create a new script with these commands (after testing these commands in the database).
  • In one of your database migrations created below, insert 10 rows of data into each table.
  • Select the first item of each table.
  • Select all of the items in a table.

results matching ""

    No results matching ""