cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

infotable vs datatable

SOLVED
Highlighted
Amethyst

infotable vs datatable

I wonder the difference between the infotable and the datatable.
When should I use an infotable and a datatable?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: infotable vs datatable

I can't give you a  100% sure recipe for when to use Infotable or when to use a DataTable, but in a nutshell:

-both have columns (defined in a DataShape)

-Infotable is an in-memory ThingWorx primitive type: it always holds in RAM all its data. Reading that data does not result in a disk read.

-DataTable is an on-disk ThingWorx more complex structure: it always stores data on disk. Reading that data will always result in a disk read.

 

As a consequence:

-do not store large amounts of data in an Infotable. Since the data you put in an Infotable is always kept in RAM it could consume the server memory very fast. Especially when you start working in ThingWorx it's good to try to use as less Infotables as possible, just because you risk writing some code that will "explode" the row count.

Personally I use Infotables for mappings/associations needed for UI (for example: PropertyName->Display Friendly Property Name).

-do not store very frequently used data in DataTables. Imagine that for any read you need to go on the disk -> no go in some usecases.

 

So, Infotable is a  flexible primitive type, like an Array, while the DataTable is the direct equivalent of a Table in an SQL server.

 

PS: Please don't forget to read the articles my colleague mentioned. My explanation is just a very small starter in this area.

View solution in original post

5 REPLIES 5
Highlighted

Re: infotable vs datatable


Hi @JackEom.

 

Please review the following pages from the Help Center for details of each:

 

Infotables

Data tables

 

If you have further questions after reviewing this information, please let us know.

 

Regards.

 

--Sharon

Highlighted

Re: infotable vs datatable

Yeah Thank you. but I already check this.

I know their definition. I wonder when should I use the infotable? or data table.

 

In short, I wonder about each advantage.

 

Thank you.

 

 

Highlighted

Re: infotable vs datatable

Hi @JackEom.

 

Please check out this post and let us know if you still have questions.

 

This article may also be of interest.

 

Regards.

 

--Sharon

Highlighted

Re: infotable vs datatable

I can't give you a  100% sure recipe for when to use Infotable or when to use a DataTable, but in a nutshell:

-both have columns (defined in a DataShape)

-Infotable is an in-memory ThingWorx primitive type: it always holds in RAM all its data. Reading that data does not result in a disk read.

-DataTable is an on-disk ThingWorx more complex structure: it always stores data on disk. Reading that data will always result in a disk read.

 

As a consequence:

-do not store large amounts of data in an Infotable. Since the data you put in an Infotable is always kept in RAM it could consume the server memory very fast. Especially when you start working in ThingWorx it's good to try to use as less Infotables as possible, just because you risk writing some code that will "explode" the row count.

Personally I use Infotables for mappings/associations needed for UI (for example: PropertyName->Display Friendly Property Name).

-do not store very frequently used data in DataTables. Imagine that for any read you need to go on the disk -> no go in some usecases.

 

So, Infotable is a  flexible primitive type, like an Array, while the DataTable is the direct equivalent of a Table in an SQL server.

 

PS: Please don't forget to read the articles my colleague mentioned. My explanation is just a very small starter in this area.

View solution in original post

Highlighted

Re: infotable vs datatable

oh thank you for the detail answer.

Everyone's answers are a great help to me.

 

 

 

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum!