Skip to main content
Sep 6, 2018 8:35 AM UTC
Solved

Best practices for modelling Semantic DB Queries

Hi,

 

I have gone through the TWX data modelling and the concepts are pretty clear.
But, i could not find a clear solution when it comes to modelling external entities like Semantic DB in TWX data model.
I will try to phrase my question here;

1. I have 3 robots on the edge (with 3 different functionalities).

2. I have a Graph DB, where i store my data (like creating an order at Robot1, shutting down Robot2 etc.)

3. So, I have a set of Queries which handles basically the CRUD operations in my DB.

 

Now, the question is where to place these queries.

1. In a master Thing (central Thing), which handles all DB related activities.

OR

2. In a Thing Shape on individual Robot Thing Template layers (like getRobot2StatusFromDB() service).

 

Please provide your ideas on the best practices.

Thanks in advance

PaiChungAnswer
Sep 6, 2018 6:28 PM UTC

Generally speaking I have the base queries in the DB Thing with the System user applied to it for Runtime security.

then i have a wrapper service in the shape/template of the Robot to invoke those queries with the proper validated input parameters.

2 replies

PaiChungAnswer
Sep 6, 2018 6:28 PM UTC

Generally speaking I have the base queries in the DB Thing with the System user applied to it for Runtime security.

then i have a wrapper service in the shape/template of the Robot to invoke those queries with the proper validated input parameters.

Rahul_RajAuthor
Sep 7, 2018 8:28 AM UTC

Thanks a lot. Sounds to me the best approach.