on 09-23-2014 10:16 AM
Table with measurements
ID | ValueToMeasure | MeasuredValue | AreValuesInRangeStatus |
Id1 | ValueToMeasure1 | ||
Id2 | ValueToMeasure2 | ||
… | … | … | … |
ID | ValueToMeasure | MeasuredValue | AreValuesInRangeStatus |
Id1 | ValueToMeasure1 | 1300 | |
Id2 | ValueToMeasure2 | 1800 | |
… | … | … | … |
ID | ValueToMeasure | MeasuredValue | AreValuesInRangeStatus |
Id1 | ValueToMeasure1 | 1300 | Ok |
Id2 | ValueToMeasure2 | 1800 | Not ok |
… | … | … | … |
Am I right that there should be Odata CRUDQ operations like below?:
Please comment this approach with pointing good practices. Maybe i should change approach ?
I thought about Function import operation (it could be one call instead of 2) and 3)), but Function import support only simple type as input.
BR
Lucas
ValueToMeasure is an entity or a property here? What about MeasuredValue
Providing your data model in detail can help you to get useful answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Lucas,
In my opinion the below would be the standard approaches which i will follow based on the use cases u have shared.
I am assuming things here to just share my ideas.
Assuming ID as key.
I will create a single entity to accomplish this which will have all the properties as below.
ID - make it as a Key
ValueToMeasure
MeasuredValue
AreValuesInRangeStatus
1) Client reads dataset “ValueToMeasureSet” :
For this use case,
a. Implement READ/Get_Entity.
b. Since we may have more than once entries, say
ID1
ID2
...
ID-n
I will operate my READ in BATCH mode and get the results.
2) Client updates data set to serwer:
For this use case,
a. Implement UPDATE/UPDATE_ENTITY.
b. Since we may have multiple entries to be updated, say
ID1 , ValueToMeasure1, MeasuredValue1
ID2 , ValueToMeasure2, MeasuredValue2
...
ID-n , ValueToMeasure-n, MeasuredValue-n
I will operate my Update in BATCH mode and update all the entries.
3) Client wants to know AreValuesInRangeStatus, client reads dataset one more time
For this case,
I will use the approach which i shared in the 1st use case.
Where i will READ all those updated values in a BATCH mode by just passing ID's.
--------------------------------------------------------------------------
I can also think if feasible U can Club ur UPDATE and READ operation in a BATCH mode ( Batch Retrieval & Change Set ).
Where update and read for all the entries will happen in a single request ( i mean multiple operations [update,read] in a single payload )
Regards,
Ashwin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.