Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7637303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:54:12+00:00 2026-05-31T07:54:12+00:00

I am new to cassandra and find it a bit difficult to understand in

  • 0

I am new to cassandra and find it a bit difficult to understand in creating a simple keyspace with some structure that I am thinking of. I created a keyspace called “acquisition” using the cassandra CLI.

Using Cassandra-CLI how can I create the following for the “acquisition” keyspace –

TagNo // This is the super column
{
  ID // This is the column family
   {
     // here we shall have lots of entries. (Rows)
     user1: {rate, distance, capacity}
     user2: {rate, distance, capacity}
    }    
}

Rate distance and capacity can be stored as either strings or doubles. But does not really matter at the moment.

I am not sure how on to do this using the CLI. So please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:54:13+00:00Added an answer on May 31, 2026 at 7:54 am
    • create keyspace.

      create keyspace acquisition with placement_strategy =
      ‘org.apache.cassandra.locator.SimpleStrategy’ and strategy_options =
      {replication_factor:1};

    • create super column family.

      create column family TagNo with column_type = 'Super' and comparator = 'UTF8Type' and subcomparator = 'UTF8Type' and default_validation_class = 'UTF8Type' and column_metadata = [{ column_name : rate, validation_class : AsciiType}, { column_name : 'distance', validation_class : AsciiType}, {column_name : 'capacity', validation_class : AsciiType}];
      
    • set a few example values to the TagNo super column family.

      [default@acquisition] set TagNo[utf8('ID')]['user1']['rate'] = '10';
      Value inserted.
      Elapsed time: 2 msec(s).
      [default@acquisition] set TagNo[utf8('ID')]['user1']['distance'] = '100'; 
      Value inserted.
      Elapsed time: 2 msec(s).
      [default@acquisition] set TagNo[utf8('ID')]['user1']['capacity'] = '50';
      Value inserted.
      Elapsed time: 2 msec(s).
      [default@acquisition] set TagNo[utf8('ID')]['user2']['capacity'] = '50';
      Value inserted.
      Elapsed time: 2 msec(s).
      [default@acquisition] set TagNo[utf8('ID')]['user2']['rate'] = '20';
      Value inserted.
      Elapsed time: 1 msec(s).
      [default@acquisition] set TagNo[utf8('ID')]['user2']['distance'] = '100'; 
      Value inserted.
      Elapsed time: 2 msec(s).
      
    • show values..

      [default@acquisition] get TagNo[utf8('ID')];
      => (super_column=user1,
           (column=capacity, value=50, timestamp=1331605812776000)
           (column=distance, value=100, timestamp=1331605805912000)
           (column=rate, value=10, timestamp=1331605780216000))
      => (super_column=user2,
           (column=capacity, value=50, timestamp=1331605816568000)
           (column=distance, value=100, timestamp=1331605846008000)
           (column=rate, value=20, timestamp=1331605821608000))
      Returned 2 results.
      Elapsed time: 3 msec(s).
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Cassandra. I am trying to insert some values to the
I'm investigating both Cassandra and MongoDB for a new project because they share some
I am relatively new to cassandra and its data model. I have a large
I am pretty new to Cassandra, just started learning Cassandra a week ago. I
i am new in Cassandra db. need help to create data model. i have
We are starting a new java web-project with Cassandra as the database. The team
new to c#. I'm trying to make a simple system where I can search
New to Node.js and Express, I am trying to understand the two seems overlapping
I have a client / server setup for Cassandra that works when accessed via
I'm fairly new to Apache Cassandra and nosql in general. In SQL I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.