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.

enter image description here

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

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

c - Expected expression before 'struct' - Error -