District 25
NEBridge - Database Documentation: location and structure

1. Location: All tables, views, scripts, and configurations are currently stored in two locations – the webmaster's home computer and wavada.org, which is stored and maintained on an iPower server on which the webmaster rents space. The two locations are kept in synch through use of redundant data entry. Interactive changes such as entry of familiar names and email addresses, and recording unsubscribed and deceased players are only recorded on wavada.org.

2 .Tools: The local version uses WAMP (windows-based MySQL, Apache, and php), which can be downloaded for free to any Windows-based computer. Before installing it, be sure that the system requirements, which include patches from Microsoft, are installed. The remote version uses XAMP (Unix-based MySQL, Apache, and php), which is provided by and supported by iPower. The two implementations are nearly identical. One major exception is that Unix is case-sensitive in many cases in which Windows is not.

2.1 The implementation of Apache and MySQL require nothing special. The implementatition of MySQL on the remote server allows only a limited number of queries per hour. The number is large, but it is not quite large enough to handle the monthly update of the players table.

2.2 The php implementations are similar enough in both versions that no discrepancies have impeded work. The person who maintain the scripts needs to be familiar with php and HTML as well as, to a lesser extent, Javascript and CSS (cascading  style sheets). All of these are thoroughly documented on the Internet.

3. Structure:

3.1 The primary table is named players. It has one entry for each ACBL member. Records are NOT removed when players become inactive or even deceased. The table currently has more than 200,000 entries. It has the following subtables (linked through the player number) and views:

3.1.1 The attendance table has one entry per player per D25 tournament (including sectionals and grassroots events) or NABC tournament. This table includes players from outside the districts.

3.1.2 The D25_points table has one entry per year per player who has attended a D25-sponsored event. This does not include unit-sponsored sectionals.

3.1.3 The advancement table has one entry per D25 player for each rank achieved.

3.1.4 The winners table has one entry for each player who has won a strat or a flight at a D25-sponsored tournament.

3.1.5 The winners_link_winners table has one entry for each player in a photo on the Winners Board for each event in each D25-sponsored tournament.

3.1.6 The players_date_points table has one record per D25 player per month.

3.1.7 The actives view has one record for each player who meets the following criteria:

3.1.7.1 More than 0 masterpoints

3.1.7.2 Was included in the last roster

3.1.7.3 Has 0 in the deceased_YYYYMMDD field

3.1.7.4 Does not have Y in the email_rejected field

3.1.7.5 Does not have N in the oktoemail field

3.1.7.6 Email is not blank, Confidential@acbl.org, or BadAddress@acbl.org.

3.1.8 The D25_actives view has one record for each player currently in District 25 who meets the above criteria.

3.2 The following tables are used for the purposes specified.

3.2.1 The tournaments table has one record for each event in any tournament used by the attendance table.

3.2.2 The BestInClass table contains one record for each D25 player with some masterpoints this year. It is populated by a program on the BridgeDatabaseMenu.php menu. It is used after each event detailing the standings in the player's category.

3.2.3 The clubs table has one record per club. It is populated by a program on the BridgeDatabaseMenu.php menu. It is used for emails to clubs about the NAP qualifying games.

3.2.4 The other_attendance table was origniallly designed to record attendance by players who are not in the database. Its most important use currently is to discover errors in the file used to populate the attendance table.

3.2.5 The specs table contains various pieces of information that are used to make data entry easier.

3.2.6 The winners_link table contains one record for each webpage that contains photos of winners. It is populated by programs on the BridgeWBMenu.php menu.

3.2.7 The strat_winners table contains one record for each strat of each event that any player won at a D25 tournament. A strat of a team event with four players on the winning team will have four records in this table. It is populated by programs on the BridgeWBMenu.php menu, and it is used by programs on that menu to create web pages and the emails sent to players whose photos are winning.

4 The following folders should be created under a folder named Database that lives in a folder named District25:

4.1 ACBLScore_LZH (one subfolder per year)

4.2 Advancements

4.3 Best_in_Class (one subfolder per year)

4.4 Clubs

4.5 D25 (one subfolder per year)

4.6 NABC (one subfolder per year)

4.7 NAP

4.8 Rosters (one subfolder per year with one subfolder per moth in each)

4.9 scripts

4.10 Unit108 (one subfolder per year)

4.11 Unit113 (one subfolder per year)

4.12 Unit126 (one subfolder per year)

4.13 Unit145 (one subfolder per year)

4.14 Unit150 (one subfolder per year)

4.15 Unit175 (one subfolder per year)

4.16 Unit189 (one subfolder per year)

4.17 Unit196 (one subfolder per year)