The CreatorCon Call for Content is officially open! Get started here.

Data storage in base table and extended table

Vipin Verma3
Tera Contributor

When a table is extended, it inherits all the columns from the table it is extending. When we store data in extended table, records are created in base table as well. My question is on the data stored for columns that are in the base table. The data is only stored in the base table, or it is stored both in base table and extended table? 

 

If data is stored in both tables base and extended, then what is the reason of keeping the data in both tables?

1 ACCEPTED SOLUTION

Bert_c1
Kilo Patron

And if you are interested in how Servicenow Database Schema design works on popular parent tables (task and cmdb) see:

 

Table Extensions and Classes

 

SQL Joins are used to link parent-child table records.  And for tables where there are "lots" of records and child tables, database performance suffers the more Joins are used to access the records.

View solution in original post

3 REPLIES 3

Bert_c1
Kilo Patron

Child tables inherit columns from the parent table. When creating records in a child table, the record will exist in both the parent and child table. the record in the parent table with have column values for that table and the record in the child table will have column values defined for that table. General Relational Database design.

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

The data can be found in both, in the parent table you will find the data only for the columns that are present in the parent table.

Reason is just how database table relationship work, this is not duplication od data if that is where you are thinking.

-Anurag

Bert_c1
Kilo Patron

And if you are interested in how Servicenow Database Schema design works on popular parent tables (task and cmdb) see:

 

Table Extensions and Classes

 

SQL Joins are used to link parent-child table records.  And for tables where there are "lots" of records and child tables, database performance suffers the more Joins are used to access the records.