Administrator access

Enter the site-wide access code to view pgfacts.org.

Simple gate for now; not a full login system.
Contact Us
Work In Progress: database/main-tables.md The database tables and the information they hold.

Main Tables

This page describes the 25 tables listed in the database’s SystemTables catalog and shows representative rows. The TableType values are the classifications used by the project. Lookup sections show every row defined by the current seed scripts. Other examples come from the supplied schema extract when available; rows labeled Illustrative explain the table’s shape and are not live database records.

TablenameTableTypePurpose
SystemTablesSystemLists database tables with their catalog category and order.
SystemSettingsSystemStores application and database settings.
NumbersSystemStores integers from 1 through 1,000 for utility use.
ErrorLogSystemRecords database messages and errors.
RouteTypeLookupNames the kinds of menu destinations.
VisitorTypeLookupDefines visitor audiences.
ContentTypeLookupClassifies content documents.
FormatTypeLookupDefines content block formats and file extensions.
MimeTypeLookupDefines media types and rendering characteristics.
WorkflowStatusLookupDefines content workflow states.
MasterMenuMenuHolds the imported source menu.
TestHarnessMenuStores menu test cases and results.
MenuItemMenuHolds the website's navigation items and route targets.
PortalMenuMenuHolds visitor-specific portal tiles.
BoardMemberMenuHolds board member names, roles, biographies, and images.
ContentDocumentContentHolds a page's content description and publication state.
ContentElementContentHolds text, media, or file content blocks.
StagingDocumentStagingHolds a content document being prepared.
StagingElementStagingHolds content blocks being prepared.
RegistrationRegistrationHolds a person's email, visitor type, and participation choices.
ContactRegistrationHolds contact and address details for a registration.
NewsletterRegistrationConnects a newsletter to its content and dates.
EmailRegistrationHolds an email subject, body, and sent date.
EmailRecipientRegistrationConnects an email to a registered recipient.
EmailAttachmentRegistrationHolds a file attached to an email.

System tables

SystemTables

Catalog of the 25 tables classified on this page. This is a representative sample; the complete list appears above.

TableNameTableTypeSortOrder
SystemTablesSystem11
VisitorTypeLookup22
MenuItemMenu33
ContentDocumentContent41
RegistrationRegistration61

SystemSettings

Stores typed settings such as site configuration, menu source, and feature choices. These rows are from the database project’s baseline settings.

SettingKeySettingTypeSettingGroupSettingValue
SITE_NAMESTRINGSYSTEMAllThingsPG
MASTER_MENUSTRINGSYSTEMC:\ATPG\Master_Menu.csv
ENABLE_REGISTRATIONBOOLEANAPPLICATIONTRUE
DEFAULT_PAGE_SIZEINTEGERGLOBALVAR25
SUPPORT_EMAILSTRINGGLOBALVARsupport@allthingspg.org

Numbers

Contains the integers 1 through 1,000.

Number
1
2
3
…
1,000

ErrorLog

Records routine name, message, severity, parameters, and execution context. Illustrative row:

ProcedureNameErrorMessageLogLevelLogDate
Populate_MenuItemsExample validation messageERRORExample timestamp

Lookup tables

RouteType

Identifies how a menu item is opened. All current seed values:

CodeDescriptionFolderSortOrder
VVisitorVisitor1
CContentContent2
PPagePage3
RRedirectRedirect4

VisitorType

Defines the visitor types available to the site. All current seed values:

CodeDescriptionSortOrderIsDefault
PPatient10
CCaregiver20
MProvider30
DPharmaceutical40
VGuest51

ContentType

Classifies a content document. All current seed values:

CodeNameDescriptionSortOrder
AArticleLong-form educational content1
NNewsItemNews updates and announcements2
FFAQQuestion and answer pairs3
TTestimonialPatient and caregiver stories4
PProfileBoard members, staff, medical experts5
EEventEvents, webinars, fundraisers6
LLinkExternal resource or reference8
RResearchClinical trial or research study9
XExternalExternal file10
GGalleryImage gallery metadata11
DDocumentPDF or downloadable file reference12
UUnknownContent has not been populated99

FormatType

Defines a content block’s format and associated file extensions. All current seed values:

CodeNameDescriptionFileTypes
TTextPlain Text.txt
RRTFRich Text.rtf
HHTMLWeb Page Markup.html, .htm
EEPUBElectronic Pub.epub
PPDFPortable Doc.pdf
MMDMarkdown.md
JJSONJSON.json
IIMAGEBinary Image.gif, .jpg, .svg, .webp, .png
AAUDIOBinary Audio.mp3, .wav, .ogg
WWORDMS Word Document.docx, .docm, .dotx, .dotm
SEXCELMS Spreadsheet.xls, .xlsx
NPPTPowerpoint.ppt, .pptx, .pps, .ppsx, .pot, .potx, .pptm, .ppsm, .potm
GGDOCGoogle Document.gdoc
DOPENOpen Document.odt
?UNKNOWNUnknown.bin

MimeType

Identifies the media type and whether content is text, binary, or renderable. All current seed values:

CodeFormatTypeNameDescriptionTextBinaryRenderable
TTTXTtext/plain101
MMMDtext/markdown101
HHHTMLtext/html101
CHHTMtext/htm101
RRRTFapplication/rtf100
JJJSONapplication/json100
EEEPUBapplication/epub+zip010
PPPDFapplication/pdf011
IIJPGimage/jpeg011
NIPNGimage/png011
FIGIFimage/gif011
SISVGimage/svg+xml101
WIWEBPimage/webp011
AAMP3audio/mpeg011
UAWAVaudio/wav011
QAOGGaudio/ogg011
DWDOCXapplication/vnd.openxmlformats-officedocument.wordprocessingml.document010
XWDOCMapplication/vnd.ms-word.document.macroEnabled.12010
YWDOTXapplication/vnd.openxmlformats-officedocument.wordprocessingml.template010
ZWDOTMapplication/vnd.ms-word.template.macroEnabled.12010
LSXLSapplication/vnd.ms-excel010
KSXLSXapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet010
!NPPTapplication/vnd.ms-powerpoint010
@NPPTXapplication/vnd.openxmlformats-officedocument.presentationml.presentation010
#NPPSapplication/vnd.ms-powerpoint010
$NPPSXapplication/vnd.openxmlformats-officedocument.presentationml.slideshow010
%NPOTapplication/vnd.ms-powerpoint010
^NPOTXapplication/vnd.openxmlformats-officedocument.presentationml.template010
&NPPTMapplication/vnd.ms-powerpoint.presentation.macroEnabled.12010
*NPPSMapplication/vnd.ms-powerpoint.slideshow.macroEnabled.12010
+NPOTMapplication/vnd.ms-powerpoint.template.macroEnabled.12010
GGGDOCapplication/vnd.google-apps.document010
ODODTapplication/vnd.oasis.opendocument.text010
B?BINapplication/octet-stream010

WorkflowStatus

Defines the content workflow stage. All current seed values:

CodeTitleDescriptionSortOrder
DDraftContent is newly curated or created1
RReviewContent needs review2
AApprovedContent has been approved but not published3
XRejectedContent has been rejected4
PPublishedContent has been published5
SStagingContent is linked to a staged menu item6

MasterMenu

Imported source menu entries, including hierarchy labels, route, audience, description, and notes. Illustrative row:

MenuIDParentChildTitleMenuTypeRouteTypeRouteTargetVisitorMask
1WelcomeWelcomePV/visitor?target=GuestPCMDV

TestHarness

Stores menu validation cases and their expected/actual results. Illustrative row:

TestIDTitleRouteTypeExpectedActualIsError
1WelcomeVPASSPASS0

The navigation records used by the site. For content routes, RouteTarget contains the associated ContentDocumentID. The examples below are grouped by route type and come from the supplied menu extract.

Visitor routes (V)

MenuItemIDParentMenuItemIDTitleRouteTargetVisitorMask
1NULLWelcome/visitor?target=GuestPCMDV
21Patient/visitor?target=PatientPCMDV

Content routes (C)

MenuItemIDTitleRouteTargetVisitorMaskContentDocumentIDIsPublished
8About PG/content?target=1PCMDV10
25Emotional Journey/content?target=18P180
32Emotional Journey/content?target=25C250
39Early Diagnosis/content?target=32M320

Page routes (P)

MenuItemIDTitleRouteTargetVisitorMask
72Clinic Finder/page?target=clinicfinder.cshtmlPCMDV

Redirect routes (R)

MenuItemIDTitleRouteTargetVisitorMask
74All Things Pyoderma 4.2k members/redirect?target=https://www.facebook.com/groups/368163159232PCMDV

The repeated Emotional Journey title represents general, patient, and caregiver pages with separate menu and content IDs. The content rows shown are unpublished placeholders, not authored articles.

PortalMenu

Stores tiles shown for individual visitor types: title, short description, icon path, and linked menu item. Illustrative row:

MenuItemIDTitleDescriptionIconPathVisitorType
25Emotional JourneyUnderstand the emotional impact of PG — from fear and frustration to strength and acceptance./img/portal-icons/Patient.svgP

BoardMember

Stores board member names, roles, positions, descriptions, photos, and display order. These names and roles come from the database seed procedure.

NameRolePositionPictureFileNameSortOrder
Dr. Alex Ortega LoayzaFounderMedical DirectorFounder.jpg1
Corlis Watkins-NassPresidentMarketingPresident.jpg2
Dave DePottieChairmanInformation TechnologyChairman.jpg3

Content tables

ContentDocument

One document-level record is associated with a menu item. Current extract examples are placeholders with ContentType U (Unknown), WorkflowStatus D (Draft), and IsPublished 0.

ContentDocumentIDMenuItemIDContentTypeDescriptionWorkflowStatusIsPublished
18UAbout PGD0
1825UEmotional JourneyD0
2532UEmotional JourneyD0

ContentElement

Stores a content block’s format, media type, block information, and text, binary, or file content. No authored content elements appear in the supplied extract. Illustrative row:

ContentElementIDContentDocumentIDFormatTypeMimeTypeBlockInfoTextContent
11HH{"block":"body"}Example page text

Staging tables

StagingDocument

Holds a content document while it is being prepared. No staging rows are included in the supplied extract. Illustrative row:

StagingDocumentIDStagingMenuItemIDContentTypeDescriptionWorkflowStatus
18AAbout PG draftS

StagingElement

Holds a text, media, or file block associated with a staged document. Illustrative row:

StagingElementIDStagingDocumentIDWorkflowStatusFormatTypeMimeTypeTextContent
11SHHExample staged text

Registration tables

Registration

Stores the email address, visitor type, optional account credentials, and participation preferences. Illustrative row:

RegistrationIDEmailVisitorTypeIsMemberIsVolunteerIsNewsLetterIsFundraisingIsActive
1person@example.orgP00101

Contact

Stores a registrant’s name and optional contact and address details. Illustrative row:

ContactIDRegistrationIDFirstNameLastNameCityStateProvinceCountry
11ExamplePersonPortlandOregonUnited States

Newsletter

Connects a content document to a newsletter description and its distribution and publication dates. Illustrative row:

NewsletterIDContentDocumentIDDescriptionNewsletterTypeDistributionDatePublishDate
110Community research updateN2026-10-012026-10-01

Email

Stores the subject and body of a message and when it was sent. Illustrative row:

EmailIDSubjectBodyTextSentDate
1Research updateA short message to registered recipients.2026-10-01

EmailRecipient

Connects a message to a registration and can record when it was sent. Illustrative row:

EmailRecipientIDEmailIDRegistrationIDDateSent
1112026-10-01

EmailAttachment

Stores an attached file’s name, type, and binary contents; it may also refer to a newsletter. Illustrative row:

EmailAttachmentIDEmailIDNewsLetterIDFileNameFileType
111newsletter.pdfapplication/pdf

Other SQL project tables

These supporting, migration, audit, and legacy tables are not assigned a TableType in SystemTables. Their examples are illustrative because the supplied data extract does not include rows for them.

EmailRequest

Holds a requested message, its processing state, and the resulting EmailID when processed.

EmailRequestIDRegistrationIDRequestTypeSubjectIsProcessedProcessedEmailID
11NResearch update0—

MasterMenu_Stage

Menu-import staging rows with a load order and source menu fields.

LoadOrderParentChildSubMenuTypeRouteTypeRouteTarget
1WelcomeParentV/visitor?target=Guest

MasterMenuStage

Holds imported menu fields in the second menu-import staging table.

MenuIDParentChildSubMenuRouteTypeRouteTargetVisitorMask
1WelcomeV/visitor?target=GuestPCMDV

Stores menu-specific test cases, expected outcomes, and processing results.

TestIDCategoryTitleRouteTypeExpectedResultIsError
1MENUWelcomeVPASS—0

MigrationDocument

Holds captured legacy page titles, content classifications, descriptions, and metadata.

MigrationDocumentIDMenuTitleContentTypeDescriptionMetaData
1About PGALegacy About PG page{}

MigrationElement

Holds a captured text or media block associated with a legacy document.

MigrationElementIDMigrationDocumentIDFormatTypeMimeTypeTextMigration
11HHExample legacy page content

MigrationMapping

Connects an old menu title to its destination MenuItemID and records whether the match is correct.

MigrationMappingIDOldMenuTitleMenuItemIDIsCorrect
1About PG81

PublishedNewsletter

Records newsletter delivery forms and an optional recipient or URL reference.

PublishedNewsletterEmailRecipientIDURLIsEmailIsHtmlIsFlyer
11/newsletters/research-update110

save_menuitem

Contains a second set of menu-item fields. The project does not document its specific use; illustrative row:

MenuItemIDParentMenuItemIDTitleRouteTypeRouteTargetVisitorMaskIsActive
1—WelcomeV/visitor?target=GuestPCMDV1

StagingMenuItem

Holds a menu hierarchy and routes before they become active MenuItem records.

StagingMenuItemIDParentMenuItemIDTitleRouteTypeRouteTargetVisitorMaskSortOrder
1—WelcomeV/visitor?target=GuestPCMDV1

SystemSettings_Audit

Keeps prior setting values and the dates they were last updated and audited.

AuditIDSettingIDSettingKeySettingTypeSettingValueAuditDate
11SITE_NAMESTRINGAllThingsPGExample timestamp

For field definitions, constraints, and foreign keys, see the database schema.

Back to top