PLANNED MAINTENANCE

Hello, DataStax Community!

We want to make you aware of a few operational updates which will be carried out on the site. We are working hard to streamline the login process to integrate with other DataStax resources. As such, you will soon be prompted to update your password. Please note that your username will remain the same.

As we work to improve your user experience, please be aware that login to the DataStax Community will be unavailable for a few hours on:

  • Wednesday, July 15 16:00 PDT | 19:00 EDT | 20:00 BRT
  • Thursday, July 16 00:00 BST | 01:00 CEST | 04:30 IST | 07:00 CST | 09:00 AEST

For more info, check out the FAQ page. Thank you for being a valued member of our community.


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 · ·