4.
Car | |||||
make | model | year | owner | color | num_of_seats |
‘Honda’ | ‘Accord’ | 2020 | ‘James’ | ‘Brown’ | 4 |
‘Toyota’ | ‘Camry’ | 2021 | ‘Jennifer’ | ‘Black’ | 4 |
‘Ford’ | ‘Mustang’ | 2020 | ‘Richard’ | ‘Blue’ | 2 |
‘Nissan’ | ‘Altima’ | 2019 | ‘Alice’ | ‘White’ | 4 |
Based on the above table. Write a CQL statement(s) for the following:
A. Create a keyspace with any strategy of your choosing and a replication factor of 5.
B. Show CQL code to create the above table, with primary key (make,model,year,owner).
C. Insert a new record into the table Car ('Honda', 'Civic', 2014, 'Emily', 'Green', 2)
D. Will cassandra allow running the following query:
SELECT * FROM Car
WHERE make = 'BMW' AND model = '430' AND owner = 'Sam' AND year = 2020