CSA Database Schema and Tables 2 — Questions and Answers
Question 1: In ServiceNow, what does the 'sys_id' field represent in every table?
- A sequential auto-increment integer primary key
- A globally unique 32-character hexadecimal identifier (Correct answer)
- A user-assigned numeric reference number
- A hash of the record's field values
Correct answer: A globally unique 32-character hexadecimal identifier
The sys_id is a 32-character GUID (globally unique identifier) automatically assigned to every record in every ServiceNow table.
Question 2: Which ServiceNow table stores all table definitions and metadata about tables themselves?
- sys_db_object (Correct answer)
- sys_dictionary
- sys_metadata
- sys_table_schema
Correct answer: sys_db_object
The sys_db_object table stores metadata about all tables defined in the ServiceNow instance, including table name, label, and parent.
Question 3: What is the purpose of the 'sys_dictionary' table in ServiceNow?
- It stores language translation strings
- It defines field-level metadata such as type, max length, and attributes for each column (Correct answer)
- It maps table names to their database equivalents
- It logs all schema change history
Correct answer: It defines field-level metadata such as type, max length, and attributes for each column
The sys_dictionary table contains one row per field per table, storing the field's data type, length, default value, and other attributes.
Question 4: When you extend a table in ServiceNow, records in the child table are stored:
- Only in the child table with all columns duplicated
- In both the parent and child tables, with sys_id linking them (Correct answer)
- Only in the parent table
- In a separate archive table
Correct answer: In both the parent and child tables, with sys_id linking them
ServiceNow uses table inheritance where a child record has a row in the parent table (for inherited fields) and a row in the child table (for extended fields), joined by sys_id.
Question 5: Which field type should you choose in ServiceNow when you need to store a reference to another record in a different table?
- String
- Integer
- Reference (Correct answer)
- Glide List
Correct answer: Reference
The Reference field type stores the sys_id of a record in a specified target table and displays the record's display value.
Question 6: What does the 'sys_class_name' field indicate on a record in a table hierarchy?
- The CSS class applied to the form
- The actual table (class) the record belongs to within the inheritance hierarchy (Correct answer)
- The Java class used to process the record
- The workflow state classification
Correct answer: The actual table (class) the record belongs to within the inheritance hierarchy
sys_class_name stores the specific extended table name the record belongs to, allowing ServiceNow to reconstruct the full record from the hierarchy.
Question 7: In ServiceNow, a 'Many-to-Many' relationship between two tables is typically implemented using:
- A Reference field on one of the tables
- A Glide List field directly on one table
- A dedicated junction/relationship table
- Both B and C are valid approaches (Correct answer)
Correct answer: Both B and C are valid approaches
ServiceNow supports M2M relationships via Glide List fields (which store multiple sys_ids) or via explicit junction tables; both are valid, with junction tables preferred for richer relationship data.
In ServiceNow, what does the 'sys_id' field represent in every table?