The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Understanding table relationship and columns of tables that extend another

SB87
Tera Expert

I know that the 'incident' table extends the 'task' table. However some things are still unclear to me.

Take my example:

  • Both incident and task contains the following column: "number"
  • When using RestAPI explorer on each individual table (for the same sys_id) it returns "INC0010805"

Is this not a form of duplication i.e. the table columns and values reside in both the incident table and the task table? Or, is the incident table partially a view i.e. it displays values from the task table + columns and values that belong to the incident table only?

 

 

 

1 ACCEPTED SOLUTION

Ratnakar7
Mega Sage
Mega Sage

Hi @SB87 ,

 

The 'incident' table extending the 'task' table means that the 'incident' table inherits all the fields and functionality of the 'task' table, while also having its own specific fields and functionality.

In your example, both the 'incident' and 'task' tables have a column called "number". This is not a duplication of data, but rather an inheritance of the column from the 'task' table to the 'incident' table. When a new incident is created, it will have a unique 'number' value generated for it, just like any other task.

When you query the 'incident' table using the REST API explorer and get the value "INC0010805", this is the value of the 'number' field for that particular incident. This value is stored in the 'incident' table, but is also inherited from the 'task' table.

The 'incident' table is not a view of the 'task' table. It is a separate table that extends the 'task' table and has its own unique fields and functionality. When you query the 'incident' table, you will get all the fields and values specific to the 'incident' table, as well as the fields and values inherited from the 'task' table.

 

If my response helps you to resolve the issue close the question by Accepting solution and hit 👍thumb icon. From Correct answers others will get benefited in future.

 

Thanks,

Ratnakar

View solution in original post

1 REPLY 1

Ratnakar7
Mega Sage
Mega Sage

Hi @SB87 ,

 

The 'incident' table extending the 'task' table means that the 'incident' table inherits all the fields and functionality of the 'task' table, while also having its own specific fields and functionality.

In your example, both the 'incident' and 'task' tables have a column called "number". This is not a duplication of data, but rather an inheritance of the column from the 'task' table to the 'incident' table. When a new incident is created, it will have a unique 'number' value generated for it, just like any other task.

When you query the 'incident' table using the REST API explorer and get the value "INC0010805", this is the value of the 'number' field for that particular incident. This value is stored in the 'incident' table, but is also inherited from the 'task' table.

The 'incident' table is not a view of the 'task' table. It is a separate table that extends the 'task' table and has its own unique fields and functionality. When you query the 'incident' table, you will get all the fields and values specific to the 'incident' table, as well as the fields and values inherited from the 'task' table.

 

If my response helps you to resolve the issue close the question by Accepting solution and hit 👍thumb icon. From Correct answers others will get benefited in future.

 

Thanks,

Ratnakar