FUNDAMENTALS OF COMPUTER

DATABASE FUNDAMENTALS

BASICS OF BIG DATA

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Consider the Table temperature ____ details in Keyspace “day3” with schema as follows:temperature ____ details(daynum, year, month, date, max ____ temp)with primary key(daynum, year, month, date)There exists same maximum temperature at different hours of the same day. Choose the correct CQL query to:Alter table temperature ____ details to add a new column called “seasons” using map of type <varint, text> represented as <month, season>. Season can have the following values season={spring, summer, autumn, winter}.Update table temperature ____ details where columns daynum, year, month, date contain the following values-4317, 1955, 7, 26 respectively.Use the select statement to output the row after updation.Note:A map relates one item to another with a key-value pair. For each key, only one value may exist, and duplicates cannot be stored. Both the key and the value are designated with a data type.
A
cqlsh:day3> alter table temperature ____ details add hours1 set<varint>;cqlsh:day3> update temperature ____ details set hours1={1, 5, 9, 13, 5, 9} where daynum=4317; cqlsh:day3> select * from temperature ____ details where daynum=4317;
B
cqlsh:day3> alter table temperature ____ details add seasons map<varint, text>;cqlsh:day3> update temperature ____ details set seasons = seasons + {7:’spring’} where daynum=4317 and year =1955 and month = 7 and date=26;cqlsh:day3> select * from temperature ____ details where daynum=4317 and year=1955 and month=7 and date=26;
C
cqlsh:day3>alter table temperature ____ details add hours1 list<varint>;cqlsh:day3> update temperature ____ details set hours1=[1, 5, 9, 13, 5, 9] where daynum=4317 and year = 1955 and month = 7 and date=26;cqlsh:day3> select * from temperature ____ details where daynum=4317 and year=1955 and month=7 and date=26;
D
cqlsh:day3> alter table temperature ____ details add seasons map<month, season>;cqlsh:day3> update temperature ____ details set seasons = seasons + {7:’spring’} where daynum=4317;cqlsh:day3> select * from temperature ____ details where daynum=4317;
Explanation: 
There is 1 question to complete.