Last updated: Thursday 30th March 12:14pm
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 a description of the Pokémon database.
We give both an ER model and an SQL schema.
The database contains a large number of tables and
relationships.
We summarise what each table represents and the
kind of information it holds here.
More information is given in the downloadable
schema.
- Pokemon
-
This table describes general aspects of each Pokémon, including:
its unique ID (a combination of a Pokédex number and a variation
number), its name, its species, its growth rate, its basic properties
(hit points, speed, etc.), and so on.
- Games
-
This table indicates which region a particular game occurs in.
The game ID is also used as part of a Pokédex, and an Encounter.
- Types
-
Each Pokémon has at least one type (e.g. fire, water, ghost, flying).
Some Pokémon may have two types.
All Moves also have a type.
- Abilities
-
Pokémon have a large range of possible abilities
(e.g. flame body, gooey, iron fist, neuroforce).
A description of each ability is contained in the effect column of this table.
Each Ability a Pokémon knows is given in the Knowable_Abilities table.
- Moves
-
Pokémon aso have a large range of possible moves they can make
(e.g. blizzard, block, bounce, etc.).
Each move has an associated category, power and accuracy.
Pokémon can potentially learn more move during a game.
Each move a Pokémon can learn given in the Learnable_Moves table.
- Evolutions
-
Some Pokémon can change form,
and this table describes the starting form and final form.
What conditions are needed before this change can occur,
is given in the Evolution_Requirements table.
- Requirements
-
Some changes (evolutions, encounters, learnable moves) require certain
pre-conditions before they can occur.
The Requirements table gives a list of possible pre-conditions
which can be applied to the various table associated with "changes".
- Encounters
-
Encounters describe where you might find a Pokémon under certain circumstances,
how likely is the encounter,
and at what level the Pokémon may be.
- Egg Groups
-
Pokémon can breed, but only with other Pokémon in the same Egg Group.
ER Models
The following ER diagrams show the major components of the Pokémon database:
ER diagram of Pokémon relations
Attributes have been removed to make the relations more readable
ER diagram of Pokémon attributes
Relations have been removed to make the attributes more readable
SQL Schema
The following is the SQL schema used in building the Pokémon database: