Skip to main content

How to create table/Column

To create Column need to add some code in storage-conf.xml.The next thing we need to do is to locate and configure the database storage-conf.xml file.which is found in conf folder.Open the storage-conf.xml in your favorite text editor.now Add the following code under tag.




<Keyspace Name="Blog">
        <ColumnFamily Name="Post"
                      ColumnType="Super"
                      CompareWith="UTF8Type"
                      CompareSubcolumnsWith="UTF8Type"
                      Comment="A column family with supercolumns, whose column and subcolumn names are UTF8 strings"                      />
    </Keyspace>



save it.The above configuration creates one Column Family(or table).called Posts in a Keyspace (or database ) called Blog.
We are going to use this column family in our code below.

Comments

Popular posts from this blog

Cassandra Installation on WindowsXP

1. About Cassandra : Cassandra is an open source distributed database management system. It is an Apache Software Foundation top-level project designed to handle very large amounts of data spread out across many commodity servers while providing a highly available service with no single point of failure. It is a No SQL solution that was initially developed by Facebook and powers their Inbox Search feature. Want to Know more? Visit Cassandra database Apache Cassandra 2 . Cassandra Installation on WindowsXP First we need to download Cassandra. For Download Cassandra Click this link Download . Now unzip the file and put it into a drive where you want to install Cassandra .you can change the folder name cause deafult name is "apache-cassandra-0.5.1" .its to long to remember easily.So i change my unzip folder name to "cassandra". Now we have our Cassandra in a spacific drive.Lets go install and configur Cassandra database on windowsXP .You need to insta...

How to solve internet problem for ubuntu in virtual box?

You can access internet on virtual box by two way one is bridge network or host only. today i show you the host only option. First you need to create a Host only network in virtual box virtual box -> file -> preferences -> network -> Host-only network  Click add button Click DHCP, click Enable Server Select virtual OS, go to setting -> network Now login to your ubuntu os and do the following            sudoedit /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # NAT auto eth0 iface eth0 inet dhcp # Host only auto eth1 iface eth1 inet dhcp After VM reboot hope everything worked fine.

Step-by-Step Guide to Installing Apache Cassandra on Ubuntu

Apache Cassandra is a high-performance, distributed NoSQL database designed to handle large volumes of data across many servers with no single point of failure. This guide will walk you through the process of installing Cassandra on an Ubuntu system. Prerequisites Ubuntu System : This guide assumes you're using Ubuntu 20.04 or later. Java Installed : Apache Cassandra requires Java (JRE version 8 or later). Root or Sudo Access : Ensure you have administrative privileges. Step 1: Update System Packages      Always start with updating your package index to ensure all dependencies are up-to-date. Open a terminal and run:      sudo apt update && sudo apt upgrade -y Step 2: Install Java     Apache Cassandra requires Java to run. You can install OpenJDK using the following commands:      sudo apt...