NoSQL for Web Developers

Date
January 26, 2016
Start Time
10:00:00
End Time
11:00:00

Original Annoucement

We are doing a webinar with ForwardJS conference.

Topic : “NoSQL for Web Developers”
Time : Jan 27, 2016 10am PST
Location : Online
Registrationhere.
Speaker : Sujee Maniyam


Webinar Recap

Thanks for attending the webinar ; we had a great turn out !
Here is webinar recording and Q&A.
 

Q&A

Q : What happens when I insert duplicate data?

When data is inserted with the same primary key (say ‘user1’), it will over-write the previous record.  So Cassandra won’t allow duplicates.. it just updates / overwrites the previous record.

 

Q : What do we mean by ‘node’ exactly?

A node is a  host / machine in the Cassandra ring.  Think a ‘Linux server’
 
 

Q : Can a primary  key have more than two attributes?

Certainly.  Here are some examples
create table (
   x text,
   y int
   PRIMARY KEY (x, y));
 
create table (
   x  text,
   y  int,
   z  text,
   PRIMARY KEY (x,y, z)
);
 
See more here:
 
 
 

Q : Can Cassandra handle streaming workloads

Absolutely.  Lot of streaming solutions use Cassandra as data storage.
See below for some links:
 
 

Q : When is it better to create index as opposed to creating a new table

C* indexes behave differently than traditional DB indexes.  We don’t want to index a column that has ‘too low’ or ‘too high’ cardinality.
See more here :
 
 
 

Q : Do I understand you to say that in order to query by user and another query by feature, that you need two identical tables, but just different primary keys?

YES
 
 

Q : are we not forced to insert into multiple tables if we go on creating tables for each column we need?

Yes, if you have multiple tables, you need to insert data in both tables and keep them up to date.
 
 

Q : is there a limit on the number of tables we can create

Please see C* limitations.
 
 
 

Q : so you create another table if we want to query with ratings

Yes, in C* you may need to create tables to answer different queries.
So it is important to know the queries in advance before designing tables.
In C* the workflow goes like this:
Query –> Schema –> Data
Complete opposite of RDBMS design process 🙂
 
 
 

Q : How can we create unique keys?

Since C* doesn’t do ‘auto incremental primary keys’ (like a RDBMS), the application has to come up with a primary key.
We can use UUIDs to easily create unique keys.
Also see more from here:
 
 

Q : How does data eventually become consistent ?

Cassandra uses ‘replication’ to keep multiple copies.
See here for more :
 
 
 

Q : How does C* keeps the data safe in case of node crashes.

Using replication, C* duplicates data on multiple nodes (usually 3).  So even if a node goes down, the data is safe on other replicas.
 
 
 

Q : Does C* supports .NET?

C* does have a .NET client library.
See here for complete list: