Appendix F. MySQL tables

This briefly covers the tables in use by GenieGate.

You'll notice they all begin with the letters ua_ this should ease problems sharing GenieGate with other applications on the same database, unless the other applications happen to use tables that begin with ua_.

Table F-1. MySQL tables

TablePurpose
ua_groupGroup definitions and names
ua_membersLinks users with groups.
ua_psectProperty sections
ua_prnamProperty definition
ua_prnamProperty definitions
ua_propStores user properties.
ua_usersUser accounts

The actual fields aren't covered here, you should look at the tables directly to see what they are. (if you're reading this, you're probably already doing that)

Most of it is fairly straight-forward. However, multiple sections are supported for properties and might warrant further explanation. ua_psect contains the section definitions. This table contains the field sid which maps to a numeric section ID. This is used for categorizing properties into sections.

The table ua_prnam contains the actual property names. These have prid and sid, sid is joined with ua_psect, to obtain the section name. The field prid is a globally unique number for this property.

Finally, prid is used to retrieve the actual users property from ua_prop

The purpose of doing it "the long way" is that numbers can be indexed and stored much more efficiently than strings, it would not make sense to store a long property name several times over for each user.