Tables & data model
Everything in ServiceNow is a record in a table, master this and the rest clicks.
ServiceNow is, at heart, a relational database with a workflow engine and UI on top. Every incident, user, CI, catalog item and even every configuration record is a row in a table.
- Core vocabulary
- Table extension, the Task hierarchy
- Field types that matter
- References and dot-walking
- The dictionary and attributes
ServiceNow is, at heart, a relational database with a workflow engine and UI on top. Every incident, user, CI, catalog item and even every configuration record is a row in a table. Master the data model, tables, fields, the dictionary, table extension, references and dot-walking, and the rest of the platform stops being a collection of features and becomes one coherent system.
Core vocabulary
Table extension, the Task hierarchy
Tables can extend a parent, inheriting all its fields and adding their own, classic object-oriented inheritance, in the database. The most important example is task:
This inheritance has real consequences you will use constantly:
- A report, business rule or ACL written on
taskautomatically applies to every child. - A reference field of type "Task" can point at an incident or a change, they share the parent type.
- Physically, ServiceNow can store extended tables in the parent's table (table-per-hierarchy), which is why
taskis a huge table.
Field types that matter
References and dot-walking
A reference field stores a sys_id and shows the target display value. Because references chain, you can dot-walk across relationships in filters, reports and scripts without a second query:
The dictionary and attributes
Every field is defined in sys_dictionary: its type, length, default value, and attributes (mandatory, read-only, display, and many advanced flags). The dictionary is the ground truth beneath forms, field-level rules like data policies and field ACLs build on top of it. A field made mandatory in the dictionary is mandatory everywhere, unconditionally; that is a bigger hammer than a conditional data policy.
Special table families to recognise
Common mistakes
- Confusing the label (what users see) with the internal name (what scripts use).
- Comparing a reference field to a display value in a script instead of its sys_id.
- Creating a standalone table for a unit of work instead of extending
taskand inheriting its process. - Ignoring string field max-length and silently truncating imported data.
- Over-using dot-walking in hot code where a stored value would be far faster.