Question-38: You have been given below database design
CREATE KEYSPACE hadoopexam WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
CREATE TABLE hadoopexam.price_by_year_and_name ( purchase_year int, course_name text, price int, username text, PRIMARY KEY ((purchase_year , course_name), price) ) WITH CLUSTERING ORDER BY (pricesa ASC); |
Which of the following delete statement will create partition level tombstones?
- DELETE from hadoopexam.price_by_year_and_name WHERE purchase_year = 2019 AND course_name = 'Apache Spark Scala Training' AND price= 2000;
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Ans: B
Exp: Tombstones is marker for deletion of the record/s. It can happen in any part of the partitions. There are below possible tombstones
- Partition tombstones: When entire partition is deleted explicitly.
- Row tombstones: When particular row in a partition got deleted.
- Range tombstones: When more than one row like using range condition (<>)
-
You can access to full explanation to question and answer from this page.