The paper surveys some relevant issues related to data management in pervasive environments. Particularly, it focuses on the compression of semantic annotations for building so called Semantic Web of Things. An approach is proposed to achieve good compression ratios, to maintain compression effectiveness and finally to query compressed data without requiring expensive decompression phases. Experimental results prove the goodness of the proposed framework.