Module 1: ICP #1 - SnehaMishra28/BigData_Programming_Summer2018 GitHub Wiki
This is the landing page for my ICP#1.
Name: Sneha Mishra
Class ID: 11
Email: [email protected]
Professor: Yugyung Lee
MyGitHub
Technical Partner:
Name: Aditya Soman
Class ID: 19
Email: [email protected]
GitHub
Objective
Understanding Cassandra and its usage.
Features
- No SQL Systems.
- Commands for Cassandra (cql).
- Creating and updating database (keyspace as well as tables).
- Print out the results of different queries on the database.
Steps
Step 1: Install the necessary softwares
By default the Cassandra data files are stored at:
/usr/local/var/lib/cassandra/
Cassandra can also be started manually in terminal by running:
/usr/local/opt/cassandra/bin/cassandra
The data by default is stored at:
/usr/local/var/lib/cassandra
Install Python
Install Cassandra
Get Cassandra software info
Start the Cassandra query language (cqlsh)
Step 2: Using/ Creating a KEYSPACE
Using the created KEYSPACE
Create a TABLE in the same selected KEYSPACE
Step 3: Perform different queries on the created TABLE with the output
1. List the empno, ename, jobtitle and hiredate of employee from the employee table.
2.List the name,salary of the employees who are clerks.
3.List the name,job,salary of every employee joined on ‘december 17,1980’.
4.List name and annual salary of all the employees.
5.List the department name & deptno for departments having deptno.>=20
6.Display employees’ names, salary and manager values of those employees whose salary is 500 from EMP table using SELECT statement.
7.Write a query that displays enames with first letter capitalized and all other letters in lowercase and length of enames whose enames start with J, A or N.
Results
Output 1: Update TABLE
Output 2: Insert data in the TABLE
Output 3: Alter TABLE
References:
- http://codefoundries.com/developer/cassandra/cassandra-installation-mac.html
- https://gist.github.com/hkhamm/a9a2b45dd749e5d3b3ae
- https://www.tutorialspoint.com/cassandra/cassandra_shell_commands.htm