About PtGolf.us

PtGolf.us Data Structure

PtGolf.us also has a simple data structure implemented in a relational database. There are six tables in the database

The top structure is Club (or Course) that describes a physical location where groups of players play. Clubs can have many groups. Quotas (average points pulled during a set number of Rounds) are managed by Groups. If a Player plays with different groups, their points are managed by the rules of that group. There is a concept of Club Players to allow you add a player from another group to your group.
Groups (belongs to Club)
Group can set up some basic rules: How many rounds are used to compute the quota, options to drop high and low scores from those rounds, rounding or truncating the computed quota and a few other options. Groups own Players and Events which owns Rounds.
When you vist or login to a group, all other tables belong to that group and are limited to only those recoreds owned by the group.
Players (Group Players)
Players have four required attributes: Name, Quota, Date Last Played and Tee (you can manage Quotas by Tee!).
You optionally can add Phone and a few other contact items to the players record.
Events are the controlling structure in PtGolf and only consists of a Date a Status, and an optional field that manages side games.
Once an Event is created, Players can be added to the Event (think Current Play List). This is done by linking an empty Round between the Event and the Player. The Event has a status of 'Scheduled' at this point.
Once all the players are added, you can Form Teams - again using either random or seeded methods. Teams can consist of 1, 2, 3, or 4 players. Having teams with only one player allow for individual play. After teams are formed the status changes to 'Pending' and Team numbers are added to the empty Round. You can add late player before the round is scored and adjust or re-form the teams. You can print out a score card if you have a printer available.
At the completion of the round, you enter scores for the teams/players, by team (either one at a time or all at once).
Once all teams/players are scored, the Event status is changed to 'Scored', quotas are recomputed and you are done. There are methods available to correct any mistake made in scoring.
Rounds belong to a Player and an Event. While it replicates the last 10 scores of PTGOLF, it does a little more. The basic use of rounds is to compute quota(s). Just like PTGOLF, it has points pulled and a Date. Since we've added Teams and it is linked to Events, it can compute who won the Event and store how much they won. Whether you use this feature it is up to you. More on Rounds later.
You must be logged into the system to change any information. This is controlled by Users who belong to the group. Users have roles which control what they can and can't do. Each group must have at least one user with a 'coordinator' role. That user can then call what are called CRUD actions on above table. CRUD stands for C(reate, R(ead, U(date and D(estroy.

At this point, the basic functions of PTGOLf have been replicated in PtGolf using concepts that were not available in 1980 (estimated creation of PTGOLF). Everything is not in one record of each player.

You can find out more information about the six tables by clicking on the table name.