Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

Students also viewed these Databases questions