Mordavia has an immediate need for an online system where the organisers can share information about who is playing at our events and who has paid.
I’m going to write a system to handle this, and make it generic so that it can be used by other NZLARPS projects too. I picture that it will eventually be located on the www.nzlarps.org website and form a part of the integrated database on there.
So for those other programmers out there, that means it will need to be not only generic, but also extensible. See the LARPS website content topic for discussion of the functionality that might be wanted on the NZLARPS website.
I’m going to write up a spec for the database tables here, for those with as technical bent to critique. Please do make suggestions for improvements.
It’ll be a MySQL database with a PHP script frontend.
TABLE: project
This table will contain projects run within NZLARPS. For example, Mordavia and Executive Decision will be projects. A project can have a number of events, that will be stored in the “Event” table. For example, Mordavia: Solstice would be stored there. In some cases a project will only have one event (e.g. possibly the Epic Greek larp), however it will still have one project record with the event record under it.
Data from each project record will eventually be displayed on its own page, as a public description of what that project is about. At that point the project may want to have it’s own look and feel, which is why the project has a link to it’s own PHP template page. If blank a default will be used. The template will include things like colours, layout, fonts, and logos.
project_id - int - PRIMARY KEY
owner_id - int - foreign key to user table
treasurer_id - int - foreign key to user table
name - varchar(100)
short_description - varchar(1000)
long_description - text
closed - int
template - varchar(100)
approved - bit
TABLE: event
This table will contain events run under a project. For example, Mordavia: Solstice would be stored here.
Data from each Event record will eventually be displayed on its own page, as a public description of the details of that event. Look and feel will be inherited from the
event_id - int - PRIMARY KEY
project_id - int - foreign key to project table
organiser_id - int - foreign key to user table
treasurer_id - int - foreign key to user table
name - varchar(100)
short_description - varchar(1000)
long_description - text
cancel_decision_time -varchar(100)
cancelled - int
publicise_participant_statistics - int
template - varchar(100)
image_url - varchar(100)
start_time - varchar(100)
end_time - varchar(100)
venue - varchar(100)
directions - text
cost - varchar(255)
minimum_age_in_years - int
what_to_bring - text
additional_image_url - varchar(100) - may be used for maps showing directions / picture of organisers fs
additional_description - text - may be used for additional text after block of event details
Okay, and here’s where I get to a sticky point. We’ve got projects, and we’ve got events run in the projects. However, what I really need at this stage isn’t all that stuff (that’s for future use), it’s a way of making a list of participants at events for use by the organisers.
The sticky bit is, how should the participant data be entered. I see two options, although there may be others:
-
Create a “participant” table. Link every participant to one event, include all the data about their relation to that event (what they’re playing, we’re they have paid) in that one record and get the organisers to manually enter all the details for all the participants for each event. This is very simple to implement. However, over time there will be an awful lot of data reproduction, as the same participants get entered into multiple events within a project, not to mention events in different projects.
-
Wouldn’t it be nicer if the organisers could just select from a list of existing participants in the database, and only add new ones when they’re really new? In this design there’s a “user” table (something the system will need anyway for the organisers), and all participants in events get entered into it. It would have a many-to-many relationship with the “event” table via a “participation” table that lists the details of the user’s participation in the event (what they’ve paid, etc). This is really generic and adaptable, and minises repeated data. The tricky aspect of this is that sometimes users would need to get created by event organisers, rather than the user themself. And if the user later wants to create an account to do something on the site (like run their own events, or have a “home page”) things get messy because a user with their name exists, and how do they take control of it?
Thoughts appreciated.