QUESTION 4 (a) A client requires you to develop their database using the Apache Cassandra. The company has multiple data
Posted: Sat May 14, 2022 7:21 pm
QUESTION 4
(a) A client requires you to develop their database using the
Apache Cassandra. The company has multiple data centers across
Europe (Dublin, London, Paris). Create a hotel keyspace and set the
replication factor to 4 for Dublin and 3 for the remaining data
centers. (3 marks)
(b) Use appropriate CQL data types to define a contactDetail UDT
(User Defined Type) for hotel keyspace. The contactDetail will
consist of the following fields: nationality, email, and (a
collection of) phone_numbers (landline and mobile). (4 marks)
(c) Create a staff table for storing data about the hotel staff.
Data about staff contains: ID, firstName, lastName (clustering
column), PPS (primary key), and contactDetail (UDT defined in
previous step). (5 marks)
(d) Insert the following record into the staff table: (10112,
Adam, Murphy, 1234456JH, Australia, [email protected],
+3531456789, +35386123456) (7 marks)
(e) Suppose the staff table has been populated with many
records. Write a SELECT query to retrieve the landline and mobile
numbers for a staff with ID=9876512345672345678. (6 marks)
(a) A client requires you to develop their database using the
Apache Cassandra. The company has multiple data centers across
Europe (Dublin, London, Paris). Create a hotel keyspace and set the
replication factor to 4 for Dublin and 3 for the remaining data
centers. (3 marks)
(b) Use appropriate CQL data types to define a contactDetail UDT
(User Defined Type) for hotel keyspace. The contactDetail will
consist of the following fields: nationality, email, and (a
collection of) phone_numbers (landline and mobile). (4 marks)
(c) Create a staff table for storing data about the hotel staff.
Data about staff contains: ID, firstName, lastName (clustering
column), PPS (primary key), and contactDetail (UDT defined in
previous step). (5 marks)
(d) Insert the following record into the staff table: (10112,
Adam, Murphy, 1234456JH, Australia, [email protected],
+3531456789, +35386123456) (7 marks)
(e) Suppose the staff table has been populated with many
records. Write a SELECT query to retrieve the landline and mobile
numbers for a staff with ID=9876512345672345678. (6 marks)