
Learning Apache Cassandra
By :

Let's add a new feature to our My Status application: the users' ability to "star" their friends' status updates to indicate their approval. For each status update, we'll store a list of the users who have starred that status update so that we can display the usernames to the author of the update.
One approach is to simply store the list of users in a text column in some serialized form. JSON is a versatile serialization format for such scenarios, so we'll use it. First, we'll add the column to the user_status_updates
table, recalling the technique from Adding columns to tables section in Chapter 7, Expanding Your Data Model:
ALTER TABLE "user_status_updates" ADD "starred_by_users" text;
Simple enough. Now let's suppose that bob
wants to star one of the status updates of alice
. From the application's standpoint, this means appending bob
to the list of users who have starred alice
's update. First, we'll read the existing list:
SELECT...
Change the font size
Change margin width
Change background colour