Models of software components at different levels of abstraction, component interfaces, contracts, implementations and publications are important for component-based design. Refinement relations among models at the same level and between different levels are essential for model-driven development of components. Classical refinement theories mainly focus on verification and put little attention on design. Therefore, most of them are not suitable for component-based model-driven development (CB-MDD). To address this issue, in this paper, we propose two refinement relations for CB-MDD, that is a trace-based refinement and a state-based refinement. The former comprises a trace refinement between contracts and components and an alternating trace refinement between publications; while the latter comprises a data refinement between contracts and components, and an alternating data refinement between publications. Both of the two refinement relations are discussed in the framework of rCOS, which is a formal model of component and object systems. These refinement relations provide different granularity of abstraction and can capture the intuition that a refined component provides "more" and "better" services to the environment. We also show how to extend these refinement relations to allow us to compare contracts, components and publications with different interfaces by exploiting the primitive operator internalizing over contracts, components and publications.