COMP3311 23T1 Assignment 2
Fixes, Updates and Clarifications
Database Systems
Last updated: Thursday 6th April 9:57pm
Most recent changes are shown in red ... older changes are shown in brown.

[Assignment Spec]  [Database Design]  [Examples]  [Testing]  [Submitting]  [Fixes+Updates]


Introduction

This document contains descriptions for any fixes to solve minor bugs that people might find in the supplied code/database.
Each fix is tagged with a timestamp, which is when I fixed it in the supplied code.
If you collected the code/database after that time, it will already have the relevant fix included.




Fix #1: (30th March 8:00am)
Fix Eevee evolutions

The Evolution Requirements for the Eeveelutions were incorrect.
Re-Download the Pokémon database Dump file to get updated data.

Fix #2: (30th March 12:00pm Midday)
Rename the "Type_Effectivenesses" table to "Type_Effectiveness"
Rename the "Learnable_Moves.Lerns" attribute to "Learnable_Moves.Learn"

I have been informed that "Effectivenesses" and "Lerns" are not real words.
Instead of bribing a dictionary publisher to add them to the dictionary, Instead we have renamed the table and attribute.
Re-Download the Pokémon database Dump file to get updated schema.

Fix #3: (31st March 10:00am)
Corrected generation of foreign keys in the "Encounter_Requirements" table
Corrected generation of late game Encounters

A bug in the script that generated the "Encounters" table meant that late game encounters were not added to the table.
There should now be a far greater number of encounters in the table.
Incorrectly migrating a previous update to the "Requirements" table meant that the foreign keys were not correctly referenced in the "Encounter_Requirements" table.
Foreign keys in the "Encounter_Requirements" table should now correctly reference the "Requirements" table.
Re-Download the Pokémon database Dump file to get updated data.

Fix #4:
Added clarification for the order of output from the Possible Evolutions Script
(31st March 3:30pm)

The Possible Evolutions Script previously had ambiguous output for ORed requirements.
This has now been clarified, but specifying that ORed requirements should be ordered by the Evolitions.ID attribute.

Fix #5:
Corrected generation of Learnable_Moves tables for Pokémon with multiple forms
(2nd April 3:00am)

A bug in the script that generated the "Learnable_Moves" table stopped variation forms from inheriting the moves of their base form.
Re-Download the Pokémon database Dump file to get updated data.

Fix #6:
Added additional clarification for the order of output from the Possible Evolutions Script
Added additional clarification for the order of output from the Attack Damage Script
(2nd April 3:00am)

Added additional clarification for how floating point numbers should be rounded in the Attack Damage and Possible Evolutions Scripts.
Attack Damage should be rounded to 1 decimal places before truncating to an integer.
Possible Evolutions should be rounded to 4 decimal places and the value may be +/- 0.0001 of the expected value.

Fix #7:
Added clarification for the my_pokemon Script
(2nd April 6:00pm)

10 games not 5 should be shown to the user.
Pokemon can only learn moves from the previously selected game, not just any move.
The menu() function was not included in the ZIPed my_pokemon files. It has now been added.
Added a comment to the my_pokemon files about using random numbers in PostgreSQL.
Re-Download the provided file ZIP to get updated files.

Fix #8:
Fixed Example Output for the Attack Damage Script
Added clarification on rounding for the Attack Damage Script
Added autotest instructions
(5th April 7:30am)

The sample solution had a multiplication by 0 error causing very low damage values.
This has now been fixed and the example output has been updated.
The Attack Damage Script should use Double Precision Floating Point numbers during calculations, then case to Numeric for rounding.
The autotests page has been created with instructions for running autotest on ass2.

Fix #9:
Fixed Case Insensitive Comparisons
In the Attack Damage script, the case where either the attacking pokemon doesn't learn any moves or all moves deal 0 damage is not an error
(7th April 7:00am)

Changed many TEXT attributes to store text in Title-case, the same case as python's str.title() function.
the case where either the attacking pokemon doesn't learn any moves or all moves deal 0 damage was previously listed as an error, but it is a valid (if empty) result, and should not be considered an error (and should not be printed to stderr).
Re-Download the Pokémon database Dump file to get updated data.