I am confusing about operation id. Is it unique within the network or within a transaction?
In other words, will it be enough to store only OperationId in DB or should the Primary Key be a complex (TransactionId + OperationId)
Stellar Stack Exchange is a question and answer site for developers and users of Stellar and the Stellar Distributed Exchange. It only takes a minute to sign up.Sign up to join this community
OperationId is unique within the network, so you need not to pair it with TransactionId. (TransactionId is also known as TransactionHash.)
You may consider OperationId a better choice for primary key, if the transactions contain more than one operation.
The operation details endpoint provides information on a single operation. The operation ID provided in the id argument specifies which operation to load. https://www.stellar.org/developers/horizon/reference/endpoints/operations-single.html
operations endpoint returns just one operation (if found).