Your Guide to Understanding Primavera P6 Database Schema

Your Guide to Understanding Primavera P6 Database Schema

11 min read

Understanding Primavera P6 Database Schema: A Comprehensive Guide

Primavera P6 by Oracle is one of the most widely used project management tools in industries like construction, oil & gas, infrastructure, and manufacturing. While most users interact with P6 through its graphical user interface, a deeper understanding of the Primavera P6 database schema is essential for power users, IT teams, and integration specialists.

In this blog, we’ll explore what the P6 database schema is, why it’s important, and how you can use it to enhance reporting, automation, and integration efforts.

What is the Primavera P6 Database Schema?

Primavera P6 stores all its data in a relational database—typically Oracle or Microsoft SQL Server. The database schema refers to the structure of this database: how tables are defined, how they relate to each other, and what kind of data they hold.

When you create or update a project in the P6 interface, these changes are reflected in the underlying database tables. Understanding this schema allows users to:

  • Generate custom reports and dashboards.
  • Automate repetitive tasks.
  • Integrate Primavera with other enterprise tools (e.g., SAP, Power BI).
  • Troubleshoot and audit project data.

Key Components of the P6 Schema

The Primavera P6 database contains hundreds of tables, but some are more frequently used than others. Here are a few critical ones:

Table NameDescription
PROJECTStores high-level project metadata.
TASKContains individual activity (task) details.
RSRCContains resource definitions.
TASKRSRCLinks tasks and resources (assignments).
UDFTYPEHolds definitions of user-defined fields (UDFs).
UDFVALUEStores the values of those UDFs.
CALENDARProject and resource calendars.
WBSWork Breakdown Structure details.
ACTVTYPE, ACTVCODEActivity codes and their types.

These tables are linked through primary keys and foreign keys, often using columns like proj_id, task_id, wbs_id, and rsrc_id.

Primavera P6 Database Schema Documentation

Below is the detailed schema documentation for the Primavera P6 database.

Table of Contents

Project Management Tables

PROJECT

Stores main project information including project name, dates, and status.

ColumnTypeDescription
PROJ_IDINTEGERPrimary key for project
EPS_IDINTEGEREnterprise Project Structure ID
PROJ_NAMETEXTProject name
PARENT_PROJ_IDINTEGERParent project ID for hierarchical projects
PROJ_SHORT_NAMETEXTShort name for the project
GUIDTEXTGlobally unique identifier
OBS_IDINTEGEROrganizational Breakdown Structure ID
CURRENT_PROJ_STATUSTEXTCurrent status of the project
PLANNED_START_DATEDATETIMEPlanned start date
PLANNED_END_DATEDATETIMEPlanned end date
ACT_START_DATEDATETIMEActual start date
ACT_END_DATEDATETIMEActual end date

PROJWBS

Project Work Breakdown Structure - hierarchical organization of project elements.

ColumnTypeDescription
WBS_IDINTEGERPrimary key for WBS element
PROJ_IDINTEGERProject ID this WBS belongs to
PARENT_WBS_IDINTEGERParent WBS ID for hierarchical structure
SEQ_NUMINTEGERSequence number for ordering
WBS_NAMETEXTName of the WBS element
WBS_SHORT_NAMETEXTShort name for the WBS element
STATUS_CODETEXTStatus code
WBS_LEVELINTEGERLevel in the WBS hierarchy

TASK

Individual activities or tasks within projects.

ColumnTypeDescription
TASK_IDINTEGERPrimary key for task
PROJ_IDINTEGERProject ID this task belongs to
WBS_IDINTEGERWBS ID this task belongs to
TASK_NAMETEXTName of the task
TASK_TYPETEXTType of task
DURATION_TYPETEXTDuration type (Fixed Units, Fixed Duration, etc.)
PHYS_COMPLETE_PCTREALPhysical completion percentage
ACT_START_DATEDATETIMEActual start date
ACT_END_DATEDATETIMEActual end date
LATE_START_DATEDATETIMELate start date
LATE_END_DATEDATETIMELate end date
EARLY_START_DATEDATETIMEEarly start date
EARLY_END_DATEDATETIMEEarly end date
TARGET_START_DATEDATETIMETarget start date
TARGET_END_DATEDATETIMETarget end date
REM_LATE_START_DATEDATETIMERemaining late start date
REM_LATE_END_DATEDATETIMERemaining late end date
TOTAL_FLOAT_HR_CNTREALTotal float in hours
FREE_FLOAT_HR_CNTREALFree float in hours

TASKPRED

Task predecessors - defines relationships between tasks.

ColumnTypeDescription
TASK_PRED_IDINTEGERPrimary key for task predecessor relationship
TASK_IDINTEGERTask ID
PRED_TASK_IDINTEGERPredecessor task ID
PROJ_IDINTEGERProject ID
PRED_PROJ_IDINTEGERPredecessor project ID
PRED_TYPETEXTPredecessor type (Finish-Start, Start-Start, etc.)
LAG_HR_CNTREALLag time in hours

TASKRSRC

Task resources - links tasks to resources assigned to them.

ColumnTypeDescription
TASKRSRC_IDINTEGERPrimary key for task resource assignment
TASK_IDINTEGERTask ID
RSRC_IDINTEGERResource ID
PROJ_IDINTEGERProject ID
REMAIN_QTYREALRemaining quantity
TARGET_QTYREALTarget quantity
REMAIN_COSTREALRemaining cost
TARGET_COSTREALTarget cost
ACT_QTYREALActual quantity
ACT_COSTREALActual cost

TASKUSER

Links tasks to users.

ColumnTypeDescription
TASK_IDINTEGERTask ID (Primary key)
USER_IDINTEGERUser ID (Primary key)
PROJ_IDINTEGERProject ID

Resource Management Tables

RSRC

Resources (people, equipment, materials).

ColumnTypeDescription
RSRC_IDINTEGERPrimary key for resource
PARENT_RSRC_IDINTEGERParent resource ID for hierarchical resources
RSRC_NAMETEXTResource name
RSRC_SHORT_NAMETEXTShort name for the resource
RSRC_TITLE_NAMETEXTResource title
EMAIL_ADDRTEXTEmail address
OFFICE_PHONETEXTOffice phone number
RSRC_TYPETEXTResource type (Labor, Material, etc.)
AUTO_COMPUTE_ACT_FLAGTEXTAuto compute actuals flag
OBS_IDINTEGEROrganizational Breakdown Structure ID

RSRCROLE

Resource roles.

ColumnTypeDescription
RSRC_IDINTEGERResource ID (Primary key)
ROLE_IDINTEGERRole ID (Primary key)
PROF_IDINTEGERProficiency ID
EFFECTIVE_DATEDATETIMEEffective date of the role assignment

RSRCRATE

Resource rates (costs).

ColumnTypeDescription
RSRC_RATE_IDINTEGERPrimary key for resource rate
RSRC_IDINTEGERResource ID
COST_PER_QTYREALCost per quantity
COST_PER_QTY2REALSecondary cost per quantity
COST_PER_QTY3REALTertiary cost per quantity
COST_PER_QTY4REALQuaternary cost per quantity
COST_PER_QTY5REALQuinary cost per quantity
EFFECTIVE_DATEDATETIMEEffective date of the rate

Calendar and Time Management Tables

CALENDAR

Calendar definitions.

ColumnTypeDescription
CLNDR_IDINTEGERPrimary key for calendar
CLNDR_NAMETEXTCalendar name
CLNDR_TYPETEXTCalendar type
DAY_HR_CNTREALHours per day
WEEK_HR_CNTREALHours per week
MONTH_HR_CNTREALHours per month
YEAR_HR_CNTREALHours per year
BASE_CLNDR_IDINTEGERBase calendar ID

CALENDARS

Calendar assignments.

ColumnTypeDescription
CLNDR_IDINTEGERCalendar ID
OBS_IDINTEGEROBS ID
PROJ_IDINTEGERProject ID
RSRC_IDINTEGERResource ID

CALENDARDATA

Calendar detailed data.

ColumnTypeDescription
CLNDR_DATA_IDINTEGERPrimary key for calendar data
CLNDR_IDINTEGERCalendar ID
SEQ_NUMINTEGERSequence number
DAY_OF_WEEKINTEGERDay of week (1-7)
START_DATEDATETIMEStart date
END_DATEDATETIMEEnd date
START_TIMEINTEGERStart time (minutes from midnight)
END_TIMEINTEGEREnd time (minutes from midnight)
SHIFT_IDINTEGERShift ID
WORK_FLAGTEXTWork flag (Y/N)

Organizational Structure Tables

OBS

Organizational Breakdown Structure.

ColumnTypeDescription
OBS_IDINTEGERPrimary key for OBS element
PARENT_OBS_IDINTEGERParent OBS ID for hierarchical structure
OBS_NAMETEXTOBS name
OBS_DESCRBLOBOBS description
SEQ_NUMINTEGERSequence number

ACCOUNT

Account information.

ColumnTypeDescription
ACCT_IDINTEGERPrimary key for account
PARENT_ACCT_IDINTEGERParent account ID for hierarchical accounts
ACCT_SEQ_NUMINTEGERAccount sequence number
ACCT_NAMETEXTAccount name
ACCT_SHORT_NAMETEXTShort name for the account
ACCT_DESCRBLOBAccount description

ROLES

User roles in the system.

ColumnTypeDescription
ROLE_IDINTEGERPrimary key for role
PARENT_ROLE_IDINTEGERParent role ID for hierarchical roles
SEQ_NUMINTEGERSequence number
ROLE_NAMETEXTRole name
ROLE_SHORT_NAMETEXTShort name for the role
DEF_COST_QTY_LINK_FLAGTEXTDefault cost quantity link flag
DEF_COST_PER_QTYREALDefault cost per quantity
DEF_MAX_QTY_PER_HRREALDefault maximum quantity per hour

User Management Tables

USERS

User accounts.

ColumnTypeDescription
USER_IDINTEGERPrimary key for user
GLOBAL_FLAGTEXTGlobal flag
EMAIL_TYPETEXTEmail type
USER_NAMETEXTUsername
PROF_IDINTEGERProficiency ID
CURR_IDINTEGERCurrency ID
GUIDTEXTGlobally unique identifier
EMAIL_SRV_USER_NAMETEXTEmail server username
OFFICE_PHONETEXTOffice phone number
ACTUAL_NAMETEXTActual name of the user
EMAIL_SEND_SERVERTEXTEmail send server
EMAIL_ADDRTEXTEmail address
EMAIL_SRV_PASSWDTEXTEmail server password (encrypted)
PASSWDTEXTUser password (encrypted)
ALL_RSRC_ACCESS_FLAGTEXTAll resource access flag

USERDATA

User-specific data.

ColumnTypeDescription
USER_DATA_IDINTEGERPrimary key for user data
USER_IDINTEGERUser ID
TOPIC_NAMETEXTTopic name
USER_DATABLOBUser data

USERCOL

User-defined columns.

ColumnTypeDescription
USER_COL_IDINTEGERPrimary key for user column
TABLE_NAMETEXTTable name
LOGICAL_DATA_TYPETEXTLogical data type
USER_COL_NAMETEXTUser column name
USER_COL_LABELTEXTUser column label

USERSET

User settings.

ColumnTypeDescription
NAMESPACETEXTNamespace (Primary key)
SETTING_NAMETEXTSetting name (Primary key)
SETTING_VALUETEXTSetting value
USER_IDINTEGERUser ID (Primary key)
USERSET_BLOBBLOBUser settings blob

USESSION

User sessions.

ColumnTypeDescription
SESSION_IDINTEGERPrimary key for session
LOGIN_TIMEDATETIMELogin time
LAST_ACTIVE_TIMEDATETIMELast active time
HOST_NAMETEXTHost name
USER_IDINTEGERUser ID
PROCESS_NUMINTEGERProcess number
APP_NAMETEXTApplication name
HARD_DRIVE_CODETEXTHard drive code
DB_ENGINE_TYPETEXTDatabase engine type
OS_USER_NAMETEXTOperating system username
VDB_INSTANCE_GUIDTEXTVirtual database instance GUID
SPIDINTEGERSystem process ID

Configuration and System Tables

ADMIN_CONFIG

Administrative configuration.

ColumnTypeDescription
CONFIG_NAMETEXTConfiguration name (Primary key)
CONFIG_TYPETEXTConfiguration type
FACTORY_VERSIONTEXTFactory version
LAST_CHANGE_DATEDATETIMELast change date
CONFIG_VALUETEXTConfiguration value
CONFIG_DATABLOBConfiguration data

UDFTYPE

User-defined field types.

ColumnTypeDescription
UDF_TYPE_IDINTEGERPrimary key for UDF type
TABLE_NAMETEXTTable name
UDF_TYPE_NAMETEXTUDF type name
UDF_TYPE_LABELTEXTUDF type label
LOGICAL_DATA_TYPETEXTLogical data type
SUPER_FLAGTEXTSuper flag
INDICATOR_EXPRESSIONTEXTIndicator expression
SUMMARY_INDICATOR_EXPRESSIONTEXTSummary indicator expression
FORMULATEXTFormula

UDFVALUE

User-defined field values.

ColumnTypeDescription
UDF_TYPE_IDINTEGERUDF type ID (Primary key)
FK_IDINTEGERForeign key ID (Primary key)
PROJ_IDINTEGERProject ID
UDF_DATEDATETIMEUDF date value
UDF_NUMBERREALUDF number value
UDF_TEXTTEXTUDF text value
UDF_CODE_IDINTEGERUDF code ID
TABLE_NAMETEXTTable name

VIEWPROP

View properties.

ColumnTypeDescription
VIEW_IDINTEGERPrimary key for view
USER_IDINTEGERUser ID
PROJ_IDINTEGERProject ID
VIEW_TYPETEXTView type
VIEW_NAMETEXTView name
VIEW_DATABLOBView data

Deletion and Reference Tables

REFRDEL

Reference deletion.

ColumnTypeDescription
DELETE_DATEDATETIMEDelete date
TABLE_NAMETEXTTable name
PK1TEXTPrimary key 1
PK2TEXTPrimary key 2
PK3TEXTPrimary key 3
PK4TEXTPrimary key 4
PROJ_IDINTEGERProject ID

DLTACCT, DLTACTV, DLTOBS, DLTROLE, DLTRSRC, DLTRSRL, DLTUSER

Deletion tracking tables for various entities.

ColumnTypeDescription
SESSION_IDINTEGERSession ID
[ENTITY]_IDINTEGEREntity ID (e.g., ACCT_ID, ACTV_CODE_ID, etc.)

PKXREF

Primary key cross-reference.

ColumnTypeDescription
SYSTEM_IDINTEGERSystem ID
CONTEXT_NAMETEXTContext name
PK1INTEGERPrimary key 1
PK2INTEGERPrimary key 2
OLD_PK1INTEGEROld primary key 1
OLD_PK2INTEGEROld primary key 2
OLD_STRTEXTOld string
NEW_STRTEXTNew string
ADD_DATEDATETIMEAdd date

Common Fields

Most tables in the database include these standard fields:

ColumnTypeDescription
CREATE_DATEDATETIMECreation date
CREATE_USERTEXTUser who created the record
UPDATE_DATEDATETIMELast update date
UPDATE_USERTEXTUser who last updated the record
DELETE_SESSION_IDINTEGERSession ID when record was deleted
DELETE_DATEDATETIMEDate when record was deleted

These fields are used for auditing and tracking changes to records in the database.

Reporting and Querying the P6 Database

Example: Get All Activities for a Project

sql
SELECT t.task_id, t.task_name, t.status_code, w.wbs_name, p.proj_short_name FROM task t JOIN wbs w ON t.wbs_id = w.wbs_id JOIN project p ON t.proj_id = p.proj_id WHERE p.proj_short_name = 'DELHI_METRO_PHASE3';

This query retrieves all tasks for a project named "DELHI_METRO_PHASE3" along with their WBS names and status.

⚠️ Note: Querying directly on a live P6 production database should be done with read-only access and with proper IT approvals.

Benefits of Understanding the Schema

  1. Custom Reporting: Build targeted reports using SQL or integrate with tools like Power BI or Tableau.
  2. Data Validation: Cross-check user-entered data with standard metrics.
  3. Integration: Sync P6 with ERP systems or other project tools using ETL pipelines.
  4. Audit Trails: Identify who changed what and when—especially useful for claims and disputes.

Accessing the Schema Documentation

Oracle published a complete schema in a public-facing manual, which is available on the link link on Oracle Doc website. Additionally we can:

  • Use SQL Developer or SSMS to browse tables, columns, and relationships.
  • Install a data modeling tool (like ER/Studio or dbForge Studio) to generate ER diagrams.
  • Reference unofficial resources and community wikis that offer schema diagrams.

Tips for Working with the P6 Schema

  • Use aliases when writing complex joins.
  • Filter by delete_session_id IS NULL to exclude soft-deleted records.
  • Be cautious with UPDATE and DELETE operations—prefer to work on reporting replicas.
  • Keep a data dictionary handy. Create your own if needed.

Real-World Use Cases

  • Progress Tracking Dashboards: Pull live activity and resource status for executive dashboards.
  • Earned Value Analysis: Calculate CPI/SPI based on planned vs. actual cost and schedule data.
  • Time-Phased Forecasts: Extract time-distributed data for advanced forecasting.

Final Thoughts

While Primavera P6 offers powerful out-of-the-box capabilities, unlocking its full potential requires going under the hood. Familiarity with the P6 database schema is a superpower for schedulers, project controllers, and IT professionals alike.

Whether you're building a custom dashboard, integrating with enterprise systems, or validating data for a high-stakes claim—the database is your ally.