Question: QUESTION 4 You are required to write CQL statements to answer the following questions. (a) Create a keyspace named college with replication factor=3 for two

QUESTION 4 You are required to write CQL statements to answer the following questions. (a) Create a keyspace named college with replication factor=3 for two data centres (called DC1 and DC2). (2 marks) (b) For keyspace college, create a user-defined type (UDT) fullname that includes firstName, middleInitial, and lastName fields. (3 marks) Create a table named students with the following columns: id (primary key), name (use the fullname UDT (as frozen) created in previous step), address, email, phone, programme, startDate, and completionDate. Use appropriate data types supported by Cassandra. (5 marks) (d) Insert the following record into the employee table: (234567890, Alex, J., Sintoni, 007 Griffith Dublin 8, alex.s@gcdemail.com, +3531456789, MSc Big Data, 01/09/2019, 30/09/2020). (5 marks) (e) Retrieve programme, startDate and completionDate where student name="Brendan A. Doyle. Create an index first and then run the conditional query. (5 marks) Student D=0987654321 has his name stored incorrectly as Declan A. Mupgy". Write a query to update student's last name to Murphy'. (5 marks) Total (25 marks) QUESTION 4 You are required to write CQL statements to answer the following questions. (a) Create a keyspace named college with replication factor=3 for two data centres (called DC1 and DC2). (2 marks) (b) For keyspace college, create a user-defined type (UDT) fullname that includes firstName, middleInitial, and lastName fields. (3 marks) Create a table named students with the following columns: id (primary key), name (use the fullname UDT (as frozen) created in previous step), address, email, phone, programme, startDate, and completionDate. Use appropriate data types supported by Cassandra. (5 marks) (d) Insert the following record into the employee table: (234567890, Alex, J., Sintoni, 007 Griffith Dublin 8, alex.s@gcdemail.com, +3531456789, MSc Big Data, 01/09/2019, 30/09/2020). (5 marks) (e) Retrieve programme, startDate and completionDate where student name="Brendan A. Doyle. Create an index first and then run the conditional query. (5 marks) Student D=0987654321 has his name stored incorrectly as Declan A. Mupgy". Write a query to update student's last name to Murphy'. (5 marks) Total (25 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
