I have lots of documents (50 million ) each of which have sub parts might be zero to 50 for each document . Each part has meta data . Can I use dynamic column family to store meta data ?
Here I want to store meta data say size , name , count etc for each part of E3 i.e. E2,E1,E0 . But I need to retrieve all (E3,E2,E1,))with same ID at a time . Some documents might be like E50,E49 with 50 sub parts in it .
Columns of Casandra column table
E_0_COL_ID
E_0_COL_Name
E_0_COL_Size
...
..
E_1_COL_ID
E_1_COL_Nmae
E_1_COL_Size..
..
..
E_n_COL_NAME
E_n_COL_SIZE
Is this correct use case for Cassandra dynamic columns ?
CQL SCHEMA
First create table
CREATE TABLE DOCUMENT_TABLE(
E_0_COL_ID bigint,
E_0_COL_Name text,
E_0_COL_Size bigint
PRIMARY KEY (E_0_COL_ID )
)
Add dynamic columns as per number of parts
ALTER TABLE test.DOCUMENT_TABLE ADD E_1_COL_ID bigint;
ALTER TABLE test.DOCUMENT_TABLE ADD E_1_COL_Name text;
ALTER TABLE test.DOCUMENT_TABLE ADD E_1_COL_Size bigint;
ALTER TABLE test.DOCUMENT_TABLE ADD E_2_COL_ID bigint;
ALTER TABLE test.DOCUMENT_TABLE ADD E_2_COL_Name text;
ALTER TABLE test.DOCUMENT_TABLE ADD E_2_COL_Size bigint;
...
ALTER TABLE test.DOCUMENT_TABLE ADD E_n_COL_ID bigint;
ALTER TABLE test.DOCUMENT_TABLE ADD E_n_COL_Name text;
ALTER TABLE test.DOCUMENT_TABLE ADD E_n_COL_Size bigint
;
IS THIS CORRECT USE OF DYNAMIC COLUMN FAMILY IN CASSANDRA ?