Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • Madrid
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Table extension and classes

Log in to subscribe to topics and get notified when content changes.

Table extension and classes

Enable one or more child tables to share fields and records with a parent table. Administrators and application developers can only extend tables during table creation.

Administrators and application developers typically extend tables to create a set of related records that share information. For example, in the base system, the Task and the Configuration Item tables have multiple extensions:
Table 1. Sample extended tables in the base system
Original table Related tables extended from original table
Task [task]
  • Incident [incident]
  • Problem [problem]
  • Change Request [change_request]
Configuration Item [cmdb_ci]
  • Application [cmdb_ci_appl]
  • Computer [cmdb_ci_computer]
  • Database [cmdb_ci_database]

A table that extends another table is called a child class, and the table it extends is the parent class. A table can be both a parent and child class both extending and providing extensions for other tables. A parent class that is not an extension of another table is called a base class.

Administrators can use these tools to see the relationships between classes.
  • Schema map
  • System dictionary
  • Tables module
Extending a table:
  • Links the new table to the extending table.
  • Creates system fields in the new table.
  • Creates one or more database tables to store the parent and child classes. The number of tables the system creates depends upon the extension model selected during table creation.

Extension models

The Now Platform offers these extension models.
  • Table per class
  • Table per hierarchy
The extension model determines these attributes.
  • The number of database tables created
  • The derivation of fields from parent classes
  • The replication of records from child classes

Table per class

Tables created
Creates a separate database table for the parent class and each child class.
Fields derived from parent class
Child classes derive fields from parent classes. For example, the Service Contract [ast_service] table derives fields from the Contract [ast_contract] table.
Dictionary records created for parent class
A parent class has a Dictionary record for the collection and for each field that can be derived from it. For example, the Contract [ast_contract] table has 59 Dictionary records, which define the table and its fields.
Dictionary records created for child classes
Each child class only has Dictionary entries for fields unique to the class. For example, the Service Contract [ast_service] table only has four Dictionary records, which are not already defined in the Contract [ast_contract] table.
Records replicated
The parent class replicates each record stored in its child classes. Each child class only stores records unique to the class. Replicated records have the same Sys ID value in each table. The system replicates any change you make to a child record to the matching record in the parent table. For example, Contract [ast_contract] table replicates records from the Lease [ast_lease], Service Contract [ast_service], and Warranty [ast_warranty] tables. When you update a Service Contract record, the system also updates the same record in the Contract table.

Table per hierarchy

Tables created
Creates one database table for the parent class, which stores all records for the parent and child classes. Child classes do not have separate database tables.
Fields derived from parent class
Child classes derive fields from parent classes. For example, the Incident table derives fields from the Task table.
Dictionary records created for parent class

A parent class has a Dictionary record for the collection and for each field that can be derived from it. For example, the Task table is a parent class that has 66 Dictionary records, which define the table and its fields.

The Dictionary entry for the parent class contains a sys_class_name column whose value indicates which child class each record belongs to. For example, Incident records have a sys_class_name value of incident, and change records have a sys_class_name value of change.

Dictionary records created for child classes
Each child class only has Dictionary entries for fields unique to the class. For example, the Incident table only has 22 Dictionary records, which are not already defined in the Task table.
Records replicated
Record replication is not needed, because the parent class stores all records that belong to the hierarchy. For example, the Task table contains all records from its child classes such as the Change, Incident, and Problem tables.
Feedback