A method comprising: receiving, at a catalog server , a database command that references items in a sharded table, which is a relational table that has been sharded into a plurality of shards; wherein the sharded table stores semi-structured items, the semi-structured items including encoded data that requires decoding information to decode the encoded data; wherein the semi-structured items are self-contained relative to a particular level of granularity in that the decoding information for decoding the encoded data in all semi-structured items in each chunk of a plurality of chunks of the sharded table is stored in conjunction with said each chunk, wherein said each chunk has a particular level of granularity that is one of (i) chunks of multiple rows, (ii) single partitions, (iii) sets of multiple partitions, (iv) single tablespaces, or (v) multiple tablespaces; wherein each shard of the plurality of shards is assigned to a corresponding shard server of a plurality of shard servers (312-316); determining, at the catalog server , that execution of the database command requires a particular operation; sending a remote command to each shard server of the plurality of shard servers (312-316) to cause each shard server to perform the particular operation on items in its respective shard; and migrating the semi-structured items among the plurality of shards, during a re-sharding operation, at the same particular level of granularity as the level of granularity at which the semi-structured items are self-contained in that, during migration, (i) each chunk, according to said particular level of granularity, of the sharded table, and (ii) the decoding information for decoding the encoded data in all semi-structured items in said each chunk are migrated as an inseparable unit. receiving, at a catalog server , a database command that references items in a sharded table, which is a relational table that has been sharded into a plurality of shards; wherein the sharded table stores semi-structured items, the semi-structured items including encoded data that requires decoding information to decode the encoded data; wherein the semi-structured items are self-contained relative to a particular level of granularity in that the decoding information for decoding the encoded data in all semi-structured items in each chunk of a plurality of chunks of the sharded table is stored in conjunction with said each chunk, wherein said each chunk has a particular level of granularity that is one of (i) chunks of multiple rows, (ii) single partitions, (iii) sets of multiple partitions, (iv) single tablespaces, or (v) multiple tablespaces; wherein each shard of the plurality of shards is assigned to a corresponding shard server of a plurality of shard servers (312-316); determining, at the catalog server , that execution of the database command requires a particular operation; sending a remote command to each shard server of the plurality of shard servers (312-316) to cause each shard server to perform the particular operation on items in its respective shard; and migrating the semi-structured items among the plurality of shards, during a re-sharding operation, at the same particular level of granularity as the level of granularity at which the semi-structured items are self-contained in that, during migration, (i) each chunk, according to said particular level of granularity, of the sharded table, and (ii) the decoding information for decoding the encoded data in all semi-structured items in said each chunk are migrated as an inseparable unit. <EOS>