I have 2 questions
1)what is the difference between uvm_transaction and uvm_sequence_item?
2)How can we access a variable in a uvm_object which was set using uvm_config_db from a uvm_component, i mean as per the syntax of set method we need to provide absolute or relative path in the uvm component hierarchy but the objects are not the part of this hierarchy?
(1) class uvm_sequence_item extends uvm_transaction;
(2) a sequence belongs always to a sequencer, becaus it will be executed on a sequencer. You can use this relationship tp pass data through the config_db to a sequence. It looks like this
Your question is very vague. You asked what the difference was, and the answer is that uvm_sequence_item is extended from uvm_transaction. Therefore it has all the additional methods that are in the extended class, but not in the base class.