DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

romdhani15ines_189041 avatar image
romdhani15ines_189041 asked ·

Can you explain the solution for Q2 of the "extend data model" exercise in the DS220 Academy course?

Hi,
I'm trying to solve the Extend The KillrVideo Logical Model Exercie but i'm getting a little bit confused about the solution given by datastax academy.
In fact, in Q2 query the given solution defines the column character_name as a clustering column, but without givinf an explanation

(May be it was obvious, but not for me :).
Did we add character_name as a clustering column:

  • For uniqueness guarantee? (an actor can feature in the same video with different characters).However the given explanation said: "The key attributes are actor_name and video_id.

Or because :

  • The couple ( actor_name and chracter_mame is a nested entity so for performance reason we need to store them in the same partition).

Thank you in advance


academyds220
10 |1000 characters needed characters left characters exceeded

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

1 Answer

bettina.swynnerton avatar image
bettina.swynnerton answered ·

Hi,

I'll make an attempt at providing an answer here:

This is billed as a data model extension exercise, and the table video_by_actor was defined in a previous exercise (for the denormalization topic), and it already then included the clustering column for the character name.

I would say that it is included here in order to provide more detail about the video, and with this detail ensure uniqueness, in case an actor plays more than one character per video.

From the specification in the question the character_name is not really needed, as you pointed out.

Does this make sense?

1 comment Share
10 |1000 characters needed characters left characters exceeded

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



thank you for your answer , as you said i think the character_name is not really needed .

Personnaly ,in case an actor plays more than one character per video , i will create a set of charcter_name.

0 Likes 0 ·