Category Archives: Database

SmartPlant Foundation – Database Queries – 3/3

This is part 3 of a 3-part series on how to query the SPF database.

In part 1, I gave an overview of the SPF database model, and showed how to write a simple query to return all objects of a specific type, starting from a given interface. This showed the DATAOBJ (object) and DATAOBJIF (interface) tables.

In part 2 I showed how to get two properties for those objects, using the DATAOBJPR (property) table.

In this post, part 3, I will show how to get a related object via the DATAREL (relationship) table.

Continue reading

SmartPlant Foundation – Database Queries – 2/3

This is part 2 of a 3-part series on how to query the SPF database.

In part 1, I gave an overview of the SPF database model, and showed how to write a simple query to return all objects of a specific type, starting from a given interface. This showed the DATAOBJ (object) and DATAOBJIF (interface) tables.

In this post, I show how to get two properties for those objects, using the DATAOBJPR (property) table.

In part 3, I show how to get a related object via the DATAREL (relationship) table.

Continue reading

SmartPlant Foundation – Database Queries – 1/3

This is part 1 of a 3-part series on how to query the SPF database.

In this post, I give an overview of the SPF database model, and show how to write a simple query to return all objects of a specific type, starting from a given interface. This shows the DATAOBJ (object) and DATAOBJIF (interface) tables.

In part 2, I show how to get two properties for those objects, using the DATAOBJPR (property) table.

In part 3, I show how to get a related object via the DATAREL (relationship) table.

Continue reading