Back to Pyxis Home

Pyxis Database Specification

Chris and I decided to start working on the database design tonight. I created a number of initial tables and committed a backup of their configuration in commit [73].

The general structure with these tables allows us to define relations among the various aspects of the game. I plan to fill this page with specifics for why certain tables are implemented as matching tables . I also want to add a discussion of which columns should and should not be indexed (for performance considerations). The primary goal of this work, however, is to enable us to develop a persistent world suitable for testing simulation ideas. MySQL will serve as our means of communication from the universe (written in C++) and the client-side (written in PHP/Flash).

Sample Data

SELECT f.name AS faction, g.name AS guild, o.username AS player, fl.name AS fleet, sq.name AS squad, si.name AS ship
FROM factions f, guilds g, overlords o, fleets fl, squads sq, ships si
WHERE o.username='wbic16'
  AND f.id=g.faction_id
  AND g.id=o.guild_id
  AND fl.overlord_id=o.id
  AND sq.fleet_id=fl.id
  AND si.squad_id=sq.id;

Running this on mercia as of 2008-03-25 results in:

factionguildplayerfleetsquadship
DevelopersAlpha Devwbic16Will's pwnzr fleetNumero Uno SquadBig Gun Express

1 row fetched in 0.0049 seconds