phase4_schema_cw

Player (player_name, player_id) Primary Key (player_id) no attributes should be NULL

Game (game_id, game_version, game_date, game_runtime, game_score, game_player_id) Primary Key (game_id) Foreign Key (game_player_id) References Player (player_id) no attributes should be NULL

GamePiece (gp_id, gp_name, gp_built_time, gp_death_time, game_id) Primary Key (gp_id, gp_game_id) Foreign Key (game_id) References Game (game_id) all attributes (except for gp_death_time) should not be NULL

Ship (ship_id, gp_id) Primary Key (ship_id) Foreign Key (gp_id) References GamePiece (gp_id) no attributes should be NULL

Enemy (enemy_id, enemy_level, gp_id) Primary Key (enemy_id) Foreign Key (gp_id) References GamePiece (gp_id) no attributes should be NULL

Weapon (weapon_id, gp_id, owner_ship_id) Primary Key (weapon_id) Foreign Key (gp_id) References GamePiece (gp_id) Foreign Key (owner_ship_id) References GamePiece (gp_id) no attributes should be NULL

Missle (missle_id, missle_damage, gp_id, owner_weapon_id) Primary Key (missle_id) Foreign Key (gp_id) References GamePiece (gp_id) Foreign Key (owner_weapon_id) References GamePiece (gp_id) no attributes should be NULL

Hits (missle_id, hit_ship_id, health_of_hit_ship, time) Primary Key (missle_id) Foreign Key (missle_id) References Missle (missle_id) no attributes should be NULL