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)
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).