Database Systems (Spring 2011) - Important News

(back to course main page)

  • 29/03/2011, Finding a group partner

    A list of all the "ungrouped" students..

  • 09/03/2011, A note on aggregation

    PLEASE read the following note as it required for your first hw..

    Note that when using an aggregation function (e.g. max, min..) you cannot select "more" fields unless they are "grouped by". If you do select such fields, then the result is undefined: In Oracle, the query does not compile, while in MySQL the result is the undefined. For example consider the following table:

    id    num    
    210
    311
    412

    For the query SELECT max(num) FROM table the result is

    12

    However, when adding a field (not in the "group by", as in this example), the result is undefined: SELECT id, max(num) FROM table the result is (in MySQL)

    212
    Note that to receive the correspond id, you would need to create another query (nesting). Also note that sometimes you might get the "true" answer (in this example, if you change the "max" to "min") by chance. The query is nevertheless wrong (i.e. you wont get the points in your hw)..

  • 13/02/2011

    Welcome to the course :)