Skip to main content

SureNetwork Global Database Schema

The SureNetwork Global service owns the platform-level relational database. All tables are version-controlled via Liquibase XML changelogs in SC/SureNetwork-Global/network-global-service/src/main/resources/db/changelog/schema/ — one XML file per table.

Database: PostgreSQL
Migration tool: Liquibase
Primary keys: SERIAL / auto-increment integers for most tables; VARCHAR natural keys where appropriate (e.g. tenant.name)
Schema source: SC/SureNetwork-Global/network-global-service/src/main/resources/db/changelog/db.changelog-schema.xml

The schema is grouped into five domain areas.


1. Identity and Access​

Covers the multi-tenant authentication boundary, platform users, user roles, and hub-based access control.


2. Person​

Covers the person entity and all person-scoped sub-entities: contact info, addresses, organisation membership, tenancy, signing certificates, and clinical profile.


3. Organisation​

Covers the organisation entity and its sub-entities: addresses, contacts, clinical classification, customer codes, tenant membership, and network roles.


4. Project​

Covers the project entity and all project-scoped relationships: applications, clinical metadata, conditions, connectors, editors, hubs, roles, sponsors, and person/organisation membership.


5. Clinical and Provider​

Covers provider taxonomies, NPI identifiers, credentials, therapeutic areas, experience records, and reference tables.


Complete Table Reference​

All 50 tables with full column lists.

Expand full table reference

tenant​

ColumnTypeConstraints
nameVARCHARPK
server_nameVARCHARNOT NULL
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

tenant_user​

ColumnTypeConstraints
idINTEGERPK, auto-increment
tenant_nameVARCHARNOT NULL, FK → tenant.name (CASCADE)
person_idINTEGERNOT NULL, FK → person.id
typeVARCHARNOT NULL
usernameVARCHARNOT NULL, UNIQUE with tenant_name
activeBOOLEANNOT NULL
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

user_role​

ColumnTypeConstraints
idINTEGERPK, auto-increment
codeVARCHARNOT NULL, UNIQUE with type, tenant_name
nameVARCHARNOT NULL
typeVARCHARNOT NULL
descriptionVARCHAR
tenant_nameVARCHARNOT NULL, FK → tenant.name (CASCADE)
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

tenant_user_role​

ColumnTypeConstraints
user_idINTEGERPK, FK → tenant_user.id (CASCADE)
role_idINTEGERPK, FK → user_role.id

user_role_sub_role​

ColumnTypeConstraints
role_idINTEGERPK, FK → user_role.id (CASCADE)
sub_role_idINTEGERPK, FK → user_role.id (CASCADE)

role​

ColumnTypeConstraints
idINTEGERPK, auto-increment
nameVARCHARNOT NULL, UNIQUE with tenant_name
descriptionVARCHAR
tenant_nameVARCHARNOT NULL, FK → tenant.name (CASCADE)
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

hub​

ColumnTypeConstraints
idINTEGERPK, auto-increment
nameVARCHARNOT NULL
descriptionVARCHAR
tenant_nameVARCHARNOT NULL, FK → tenant.name (CASCADE)
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

hub_role​

ColumnTypeConstraints
hub_idINTEGERPK, FK → hub.id (CASCADE)
role_idINTEGERPK, FK → role.id

hub_user_role​

ColumnTypeConstraints
hub_idINTEGERPK, FK → hub.id (CASCADE)
user_role_idINTEGERPK, FK → user_role.id

gadget​

ColumnTypeConstraints
idINTEGERPK, auto-increment
hub_idINTEGERNOT NULL, FK → hub.id (CASCADE)
nameVARCHARNOT NULL
typeVARCHARNOT NULL
alignmentVARCHAR
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

thumbnail​

ColumnTypeConstraints
idINTEGERPK, auto-increment
contentBYTEANOT NULL

person​

ColumnTypeConstraints
idINTEGERPK, auto-increment
domainVARCHARNOT NULL
first_nameVARCHARNOT NULL
middle_nameVARCHAR
last_nameVARCHARNOT NULL
genderCHAR(1)
titleVARCHAR
job_roleVARCHAR
descriptionVARCHAR
emailVARCHARNOT NULL, UNIQUE
time_zoneVARCHAR
verification_statusVARCHAR
commentsVARCHAR
thumbnail_idINTEGERFK → thumbnail.id
created_dateTIMESTAMP
modified_dateTIMESTAMP
versionINTEGER

person_address​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id
address_idINTEGERPK, FK → address.id (CASCADE)

person_contact​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id
contact_idINTEGERPK, FK → contact.id (CASCADE)

person_organization​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)
organization_idINTEGERPK, FK → organization.id (CASCADE)

person_tenant​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)
tenant_nameVARCHARPK, FK → tenant.name (CASCADE)

person_organization_role​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)
role_idINTEGERPK, FK → role.id (CASCADE)

address​

ColumnTypeConstraints
idINTEGERPK, auto-increment
typeVARCHAR(4)NOT NULL
first_lineVARCHAR
second_lineVARCHAR
cityVARCHAR
stateVARCHAR(2)
provinceVARCHAR
post_codeVARCHAR
countryVARCHAR(2)NOT NULL

address_location​

ColumnTypeConstraints
address_idINTEGERPK, FK → address.id (CASCADE)
latitudeDOUBLENOT NULL
longitudeDOUBLENOT NULL

contact​

ColumnTypeConstraints
idINTEGERPK, auto-increment
emailVARCHAR
phoneVARCHAR
mobile_phoneVARCHAR
faxVARCHAR

signature​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)
appearanceVARCHARNOT NULL
created_dateTIMESTAMPNOT NULL

signer​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)
statusVARCHARNOT NULL
status_dateDATE
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

signer_certificate​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)
mime_typeVARCHARNOT NULL
contentBYTEANOT NULL
issue_dateDATENOT NULL
created_dateTIMESTAMPNOT NULL

person_clinical​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)

person_study​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)
study_idVARCHARPK (trigger-enforced FK → ctgov.studies)

organization​

ColumnTypeConstraints
idINTEGERPK, auto-increment
domainVARCHARNOT NULL
nameVARCHARNOT NULL
other_nameVARCHAR
labelVARCHAR
website_urlVARCHARUNIQUE
email_domainsVARCHAR[]
descriptionVARCHAR
time_zoneVARCHAR
commentsVARCHAR
thumbnail_idINTEGERFK → thumbnail.id
review_statusVARCHARNOT NULL
created_dateTIMESTAMP
modified_dateTIMESTAMP
versionINTEGER

organization_address​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization.id
address_idINTEGERPK, FK → address.id (CASCADE)

organization_contact​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization.id
contact_idINTEGERPK, FK → contact.id (CASCADE)

organization_tenant​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization.id (CASCADE)
tenant_nameVARCHARPK, FK → tenant.name (CASCADE)

organization_clinical​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization.id (CASCADE)
typeVARCHARNOT NULL

organization_customer​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization.id (CASCADE)
codeVARCHARNOT NULL
nameVARCHARNOT NULL

organization_role​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization.id (CASCADE)
role_idINTEGERPK, FK → role.id (CASCADE)

organization_therapeutic_area​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization_clinical.organization_id (CASCADE)
mesh_idVARCHARPK, FK → medical_subject_heading.id
ordinalSMALLINTNOT NULL

organization_provider_identifier​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization_clinical.organization_id
provider_identifier_idINTEGERPK, FK → provider_identifier.id (CASCADE)
ordinalSMALLINTNOT NULL

organization_provider_taxonomy​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization_clinical.organization_id
provider_taxonomy_idINTEGERPK, FK → provider_taxonomy.id (CASCADE)
ordinalSMALLINTNOT NULL

project​

ColumnTypeConstraints
idINTEGERPK, auto-increment
domainVARCHARNOT NULL
nameVARCHARNOT NULL
owner_idINTEGERFK → person.id
countriesVARCHAR[]
start_dateDATE
end_dateDATE
descriptionVARCHAR
thumbnail_idINTEGERFK → thumbnail.id
tenant_nameVARCHARNOT NULL, FK → tenant.name (CASCADE)
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

project_application​

ColumnTypeConstraints
project_idINTEGERPK, FK → project.id (CASCADE)
applicationVARCHARPK
sure_clinical_idVARCHAR

project_clinical​

ColumnTypeConstraints
project_idINTEGERPK, FK → project.id (CASCADE)
identifierVARCHAR
protocol_idVARCHAR
indicationVARCHAR
product_nameVARCHAR
product_typeVARCHAR
overall_statusVARCHAR
enrollment_statusVARCHAR
phaseVARCHARNOT NULL
regulatory_agencyVARCHAR
registry_idVARCHAR
registry_urlVARCHAR
study_idVARCHAR

project_condition​

ColumnTypeConstraints
project_idINTEGERPK, FK → project_clinical.project_id (CASCADE)
mesh_idVARCHARPK, FK → medical_subject_heading.id
ordinalSMALLINTNOT NULL

project_connector​

ColumnTypeConstraints
project_idINTEGERPK, FK → project.id (CASCADE)
connectorVARCHARPK

project_editor​

ColumnTypeConstraints
project_idINTEGERPK, FK → project.id (CASCADE)
person_idINTEGERPK, FK → person.id (CASCADE)

project_hub​

ColumnTypeConstraints
project_idINTEGERPK, FK → project.id (CASCADE)
hub_idINTEGERPK, FK → hub.id (CASCADE)

project_role​

ColumnTypeConstraints
idINTEGERPK, auto-increment
nameVARCHARNOT NULL
descriptionVARCHAR
project_idINTEGERNOT NULL, FK → project.id (CASCADE)
role_idINTEGERFK → role.id
uploadBOOLEANNOT NULL
shareBOOLEANNOT NULL
deleteBOOLEANNOT NULL
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

project_role_template​

ColumnTypeConstraints
idINTEGERPK, auto-increment
nameVARCHARNOT NULL
descriptionVARCHAR
role_idINTEGERFK → role.id
uploadBOOLEANNOT NULL
shareBOOLEANNOT NULL
deleteBOOLEANNOT NULL
tenant_nameVARCHARNOT NULL, FK → tenant.name (CASCADE)
created_dateTIMESTAMPNOT NULL
modified_dateTIMESTAMPNOT NULL
versionINTEGERNOT NULL

project_sponsor​

ColumnTypeConstraints
project_idINTEGERPK, FK → project.id (CASCADE)
organization_idINTEGERPK, FK → organization.id (CASCADE)
ordinalSMALLINTNOT NULL

organization_project​

ColumnTypeConstraints
organization_idINTEGERPK, FK → organization.id (CASCADE)
project_idINTEGERPK, FK → project.id (CASCADE)
project_role_idINTEGERFK → project_role.id

person_project​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)
project_idINTEGERPK, FK → project.id (CASCADE)
project_role_idINTEGERFK → project_role.id
experienceBOOLEANNOT NULL

credential​

ColumnTypeConstraints
idINTEGERPK
acronymVARCHARNOT NULL
categoryVARCHARNOT NULL
degreeVARCHARNOT NULL
descriptionVARCHAR

person_credential​

ColumnTypeConstraints
person_idINTEGERPK, FK → person.id (CASCADE)
credential_idINTEGERPK, FK → credential.id
ordinalSMALLINTNOT NULL

experience​

ColumnTypeConstraints
idINTEGERPK, auto-increment
person_idINTEGERNOT NULL, FK → person.id (CASCADE)
typeVARCHARNOT NULL
organization_idINTEGERNOT NULL, FK → organization.id
roleVARCHARNOT NULL
start_dateDATENOT NULL
end_dateDATE
locationVARCHAR
descriptionVARCHAR

experience_certification​

ColumnTypeConstraints
experience_idINTEGERPK, FK → experience.id (CASCADE)
person_idINTEGERNOT NULL, FK → person.id
dateDATENOT NULL
descriptionVARCHAR

professional_organization​

ColumnTypeConstraints
idINTEGERPK
acronymVARCHARNOT NULL
nameVARCHARNOT NULL

person_professional_organization​

ColumnTypeConstraints
person_idINTEGERPK, FK → person_clinical.person_id (CASCADE)
professional_organization_idINTEGERPK, FK → professional_organization.id
ordinalSMALLINTNOT NULL

taxonomy​

ColumnTypeConstraints
idINTEGERPK, auto-increment
codeVARCHAR(10)NOT NULL, UNIQUE
groupingVARCHARNOT NULL
classificationVARCHARNOT NULL
specializationVARCHAR
definitionVARCHAR

provider_taxonomy​

ColumnTypeConstraints
idINTEGERPK, auto-increment
taxonomy_idINTEGERNOT NULL, FK → taxonomy.id
primaryBOOLEANNOT NULL
stateVARCHAR(2)
countryVARCHAR(2)NOT NULL

provider_license​

ColumnTypeConstraints
provider_taxonomy_idINTEGERPK, FK → provider_taxonomy.id (CASCADE)
numberVARCHARNOT NULL
confirmedBOOLEANNOT NULL

provider_license_content​

ColumnTypeConstraints
provider_license_idINTEGERPK, FK → provider_license.provider_taxonomy_id (CASCADE)
nameVARCHARNOT NULL
mime_typeVARCHARNOT NULL
contentBYTEANOT NULL

provider_identifier​

ColumnTypeConstraints
idINTEGERPK, auto-increment
identifierVARCHARNOT NULL
issuerVARCHARNOT NULL
stateVARCHAR(2)
countryVARCHAR(2)NOT NULL

person_provider_taxonomy​

ColumnTypeConstraints
person_idINTEGERPK, FK → person_clinical.person_id
provider_taxonomy_idINTEGERPK, FK → provider_taxonomy.id (CASCADE)
ordinalSMALLINTNOT NULL

person_provider_identifier​

ColumnTypeConstraints
person_idINTEGERPK, FK → person_clinical.person_id
provider_identifier_idINTEGERPK, FK → provider_identifier.id (CASCADE)
ordinalSMALLINTNOT NULL

medical_subject_heading​

ColumnTypeConstraints
idVARCHARPK
headingVARCHARNOT NULL
tree_numbersVARCHAR[]NOT NULL
synonymVARCHAR

person_therapeutic_area​

ColumnTypeConstraints
person_idINTEGERPK, FK → person_clinical.person_id (CASCADE)
mesh_idVARCHARPK, FK → medical_subject_heading.id
ordinalSMALLINTNOT NULL

Schema Source Files​

FilePurpose
SC/SureNetwork-Global/network-global-service/src/main/resources/db/changelog/db.changelog-schema.xmlMaster Liquibase changelog — includes all schema files
SC/SureNetwork-Global/network-global-service/src/main/resources/db/changelog/schema/Individual table XML files (50 files, one per table)