question

tyuen_144153 avatar image
tyuen_144153 asked Erick Ramirez answered

What are the pros and cons of storing data serialized into one column vs individual columns?

Let say I have a customer column family.

The columns: firstname, lastname, username, etc. . . . shipToStreet, shipToCity, shipToState, shipToEmail

Want to ask the pro & cons to store "shipTo" info as serialized JSON into a column as Map<text, text> vs. stored each field separately

data modeling
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

It's not a problem either way from a Cassandra perspective. It all depends on your use case and requirements.

If you store the shipping address into a single column, it just means that you won't be able to retrieve/update individual components of the address. Cheers!

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.