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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Data Model Implementation Guide Part 3

100% helpful (2/2)

Data Model Implementation Guide Part 3

 

Step 7: Unique Components Thing Templates

 

All of the shared component groups have been created. The next stage is creating the unique component group of ThingTemplates. Each of the below sections will cover one ThingTemplate, how the final property configuration should look, and any other aspects that should be added. The breakdown for the unique component group ThingTemplates is as follows:

IoTProductMgmt_0-1659126824758.jpeg

 

Robotic Arm Properties

 

The properties for the RoboticArm ThingTemplate are as follows:

Name

Base Type

Aspects

Data Change Type

TimeSincePickup

NUMBER, Min Value: 0

Persistent and Logged

ALWAYS

Axis1

String

Persistent and Logged

VALUE

Axis2

String

Persistent and Logged

VALUE

Axis3

String

Persistent and Logged

VALUE

ClampPressure

NUMBER, Min Value: 0

Persistent and Logged

ALWAYS

ClampStatus

String

Persistent and Logged

ALWAYS

 

Your properties should match the below configurations.

IoTProductMgmt_1-1659126824762.png

 

Pneumatic Gate Properties

 

The properties for the PneumaticGate ThingTemplate are as follows:

Name

Base Type

Aspects

Data Change Type

GateStatus

String

Persistent and Logged

ALWAYS

 

Your properties should match the below configurations.

IoTProductMgmt_2-1659126824765.png

 

Conveyor Belt Properties

 

The properties for the ConveyorBelt ThingTemplate are as follows:

Name

Base Type

Aspects

Data Change Type

BeltSpeed

INTEGER, Min Value: 0

Persistent and Logged

ALWAYS

BeltTemp

INTEGER, Min Value: 0

Persistent and Logged

ALWAYS

BeltRPM

INTEGER, Min Value: 0

Persistent and Logged

ALWAYS

 

Your properties should match the below configurations.

IoTProductMgmt_3-1659126824768.png

 

Quality Control Camera

 

Properties

 

The properties for the QualityControlCamera ThingTemplate are as follows:

Name

Base Type

Aspects

Data Change Type

QualityReading

INTEGER, Min Value: 0

Persistent and Logged

ALWAYS

QualitySettings

String

Persistent and Logged

ALWAYS

CurrentImage

IMAGE

Persistent and Logged

ALWAYS

 

Your properties should match the below configurations.

IoTProductMgmt_4-1659126824770.png

 

Event

 

Create a new Event named BadQuality. Select AlertStatus as the Data Shape. Your Event should match the below configurations:

IoTProductMgmt_5-1659126824773.png

 

 

Step 8: Data Tables and Data Shapes

 

For the Data Model we created, an individual DataTable would be best utilized for each products, production orders, and maintenance requests. Utilizing DataTables will allow us to store and track all of these items within our application. In order to have DataTables, we will need DataShapes to create the schema that each DataTable will follow. This database creation aspect can be considered a part of the Data Model design or a part of the Database Design. Nevertheless, the question of whether to create DataTables is based on the question of needed real time information or needed static information. Products, production orders, and maintenance requests can be considered static data. Tracking the location of a moving truck can be considered a need for real time data. This scenario calls for using DataTables, but a real time application will often have places where Streams and ValueStreams are utilized (DataShapes will also be needed for Streams and ValueStreams).

NOTE: The DataShapes (schemas) shown below are for a simplified example. There are different ways you can create your database setup based on your own needs and wants.

DataTable Name

DataShape

Purpose

MaintenanceRequestDataTable

MaintenanceRequest

Store information about all maintenanced requests created

ProductDataTable

ProductDataShape

Store information about the product line

ProductionOrderDataTable

ProductionOrderDataShape

Store all information about production orders that have been placed

 

Maintenance Requests DataShape

 

The maintenance requests DataShape needs to be trackable (unique) and contain helpful information to complete the request. The DataShape fields are as follows:

Name

Base Type

Additional Info

Primary Key

ID

String

NONE

YES

Title

String

NONE

NO

Request

String

NONE

NO

CompletionDate

DATETIME

NONE

NO

 

Unless you’ve decided to change things around, your DataShape fields should match the below configurations.

IoTProductMgmt_6-1659126824775.png

 

Products DataShape

 

The product DataShape needs to be trackable (unique) and contain information about the product. The DataShape fields are as follows:

Name

Base Type

Additional Info

Primary Key

ProductId

String

NONE

YES

Product

String

NONE

NO

Description

String

NONE

NO

Cost

NUMBER

Minimum: 0

NO

 

Unless you’ve decided to change things around, your DataShape fields should match the below configurations.

IoTProductMgmt_7-1659126824777.png

 

Production Order DataShape

 

The production order DataShape needs to be trackable (unique), contain information that would allow the operator and manager to know where it is in production, and information to help make decisions. The DataShape fields are as follows:

Name

Base Type

Additional Info

Primary Key

OrderId

String

NONE

YES

Product

InfoTable: DataShape: ProductDataShape

NONE

NO

ProductionStage

String

NONE

NO

OrderDate

DATETIME

NONE

NO

DueDate

DATETIME

NONE

NO

 

Unless you’ve decided to change things around, your DataShape fields should match the below configurations.

IoTProductMgmt_8-1659126824786.png

 

 

Step 9: SystemConnections Implementation

 

We have created the ThingTemplates and ThingShapes that will be utilized within our Data Model for creating instances (Things). Before we finish the build out of our Data Model, let's create the Services that will be necessary for the MaintenanceSystem and ProductionOrderSystem Things.
 
 This guide will not cover the JavaScript and business logic aspect of creating an application. When complete with the below sections, see the Summary page for how to create that level of definition.
 

IoTProductMgmt_9-1659126824788.png

 


 

Maintenance System

 

This is the system managed by the maintenance user and geared towards their needs.
 

Properties

 

The properties for the MaintenanceSystem Thing are as follows:  
 

Name

Base Type

Aspects

Data Change Type

 MaintEngineerCredentials

 PASSWORD

 Persistent

 VALUE

 
 Your properties should match the below configurations.
 
 

IoTProductMgmt_10-1659126824792.png

 


 

Services 

 

The Services for the MaintenanceSystem Thing are as follows:  

 Service Name

 Parameters

 Output Base Type

Purpose 

 GetAllMaintenanceRequests

 NONE

 InfoTable: MaintenanceRequest

 Get all of the maintenance requests filed for the maintenance user.

 GetFilteredMaintenanceRequests

 String: TitleFilter

 InfoTable: MaintenanceRequest

 Get a filtered version of all maintenance requests filed for the maintenance user.

 UpdateMaintenanceRequests

 String: RequestTitle

 NOTHING

 Update a maintenance request already in the system.

 
 Use the same method for creating Services that were provided in earlier sections. Your Services list should match the below configurations.
 

IoTProductMgmt_11-1659126824795.png

 

Production Order System

 

This is the system utilized by the operator and product manager users and geared towards their needs.
 

Services

 

The Services for the ProductionOrderSystem Thing are as follows:  

 

 Service Name

 Parameters

Output Base Type 

 AssignProductionOrders

String: Operator, String: ProductOrder 

NOTHING 

 CreateProductionOrders

 String: OrderNumber, String: Product, DATETIME: DueDate

 NOTHING

 DeleteProductionOrders

 String: ProductOrder

 NOTHING

 GetFilteredProductionOrders

 String: ProductOrder

 InfoTable: ProductionOrder

 GetProductionLineList

 NONE

 InfoTable: ProductDataShape

 GetUnfilteredProductionOrders

 NONE

 InfoTable: ProductionOrder

 MarkSelfOperator

 NONE

 BOOLEAN

 UpdateProductionOrdersOP

 String: ProductOrder, String: UpdatedInformation

 NOTHING

 UpdateProductionOrdersPM

 String: ProductOrder, String: UpdatedInformation

 NOTHING

 
Use the same method for creating Services that were provided in earlier sections. Your Services list should match the below configurations.
 

IoTProductMgmt_12-1659126824801.png

 


 

Challenge Yourself  

 
Complete the implementation of the Data Model shown below by creating the Thing instances of the ThingTemplates we have created. When finish, add more to the Data Model. Some ideas are below.  
 

IoTProductMgmt_13-1659126824807.png

 


 
Ideas for what can be added to this Data Model:

#

 Idea

 1

Add users and permissions 

 2

 Add Mashups to view maintenance requests, products, and production orders

 3

 Add business logic to the Data Model

 

Step 10: Next Steps  

 

Congratulations! You've successfully completed the Data Model Implementation Guide.

This guide has given you the basic tools to:

  • Create Things, Thing Templates, and Thing Shapes
  • Add Events and Subscriptions

 

The next guide in the Design and Implement Data Models to Enable Predictive Analytics learning path is Create Custom Business Logic.

 

Version history
Last update:
‎Aug 19, 2022 10:07 AM
Updated by:
Contributors