<<  Setting to "" may cause you less headaches as you won't have to deal
with tombstones  >>

You won't have to deal with tombstones manually, the Thrift API will take
care of this. Deleting an empty column value will always be better; with
one exception, when "empty" does actually mean something else then
non-existing.

2012/2/10 Narendra Sharma <narendra.sha...@gmail.com>

> IMO deleting is always better. It is better to not store the column if
> there is no value associated.
>
> -Naren
>
>
> On Fri, Feb 10, 2012 at 12:15 PM, Drew Kutcharian <d...@venarc.com> wrote:
>
>> Hi Everyone,
>>
>> Let's say I have the following object which I would like to save in
>> Cassandra:
>>
>> class User {
>>  UUID id; //row key
>>  String name; //columnKey: "name", columnValue: the name of the user
>>  String description; //columnKey: "description", columnValue: the
>> description of the user
>> }
>>
>> Description can be nullable. What's the best approach when a user updates
>> her description and sets it to null? Should I delete the description column
>> or set it to an empty string?
>>
>> In addition, if I go with the delete column strategy, since I don't know
>> what was the previous value of description (the column could not even
>> exist), what would happen when I delete a non existent column?
>>
>> Thanks,
>>
>> Drew
>>
>>
>
>
> --
> Narendra Sharma
> Software Engineer
> *http://www.aeris.com <http://www.persistentsys.com>*
> *http://narendrasharma.blogspot.com/*
>
>
>

Reply via email to