Question 120:
Your team created a DynamoDB table called “Global-Temperature” to track the highest/lowest temperatures of cities in different countries. The items in the table were identified by a partition key (CountryId) and there was no sort key. The application is recently improved with more features and some queries need to be based on a new partition key (CityId) and sort key (HighestTemperature). How should you implement this?
Answer options:
A.Add a Local Secondary Index with a partition key as CityId and a sort key as HighestTemperature. B.Modify the existing primary index with partition key as CityId and sort key as HighestTemperature. C.Add a Global Secondary Index with a partition key as CityId and a sort key as HighestTemperature. D.Add a Global Secondary Index with partition key as CityId and another Global Secondary Index with partition key as HighestTemperature. Because the primary index only uses a simple primary key (partition key), Secondary Index can only have one partition key as well.