cassandra - How wide-columns databases achieve dynamic columns on the storage layout? -
as known, in relational databases, when adding new column, data must reallocated (alter table without locking table?) maintain single row contiguous on disk.
i understand how achieved on wide-columns storages such cassandra, sparses , can handle lots of dynamic columns insertions (http://www.datastax.com/dev/blog/thrift-to-cql3 (dynamic column family))
thanks!
in cassandra adding column adding bit adding row in relational database. can delete column specific row:
delete first_name user user_id='abcd';
in cql, alter table
doesn't modify rows, in short modifies schema dictionary describe tables (look @ tables prefixed schema_
in system
keyspace). changes cql parsing (the new column recognized) , interpretation (select * user
meaning changed).
when drop column, data doesn't appear anymore in query results yet still present in sstables. data removed (and space freed) during future compaction (like tombstones).
Comments
Post a Comment