MPCS 53001: Assignment 4

Online homework and project due by 11:59pm on Tuesday, October 29, 2013

Step 3 of Your TBP

The third part of the TBP project is to design and run some interesting queries involving joins and aggregation. Please, choose your queries carefully and add comments that describe the purpose of each query. Most of your queries should correspond to actions or functionality that your TBP app may implement. For example, you may want to find all users that follow at least one twitterer that you follow.
  1. Develop and test at least six SQL queries involving joins. Please, generate a script file called joins3.sql with all of your queries.
  2. Develop and test at least six SQL queries involving aggregation. Please, generate a script file called aggrs3.sql with all of your queries.

    When you write the join and aggregation queries, consider the functionality of your TBP app. Try to write queries that will be useful in implementing some features of your TBP app. For example, displaying the tweets of all of the users someone follows will involve a join while listing the number of followers for any user will be require an aggregation query.

  3. Develop and test at least two each of the four types of SQL data modification commands: insert a single tuple, insert a subquery, delete, update. Please, generate a script file called mods3.sql with all of your modifications.

Please, create a new directory in your project directory on the CS server called hw4 and move all of the relevant files there including joins3.sql, aggrs3.sql, mods3.sql. Please make sure that all of the relevant files and no others are in that directory.

The instructions on how to submit your project can be found here.

Note that if you made any changes to your database schema or instance by modifying the files you submitted for hw3 you should commit those changes to your hw3 svn repository as well. We will not re-grade them but will use them to create and populate your database, so we can test your hw4 submission.


Problem Set

You will complete the problem set using Gradiance (http://www.newgradiance.com/).

The name of the homework is MPCSDB-Aut13 HW4. There are 11 questions in this homework - 10 regular questions and one extra credit one (about outer joins). All questions in this problem set are multiple choice. However, to answer them correctly you will need to work out their long (general) answers. A correct answer is worth 3 points. You lose a point for each incorrect answer. You can attempt the problem set as many times as you like; only your highest score will count. You do not have to solve the challenge question to receive full credit but if you get it wrong you will lose a point. Note that you will probably get slightly different questions each time you attempt the problem set.

The due date for the Gradiance part of the homework is 11:59pm on Tuesday, October 29, 2013.