Cassandra is a column based NoSQL database. While yes at its lowest level it does store simple key-value pairs it stores these key-value pairs in collections. This grouping of keys and collections is analogous to rows and columns in a traditional relational model. Cassandra tables contain a schema and can be referenced (with restrictions) using a SQL-like language called CQL.
In your comment you ask about Apples being stored in a different table from oranges. The answer to that specific question is No it will be in the same table. However Cassandra tables have an additional concept call the Partition Key that doesn't really have an analgous concept in the relational world. Take for example the following table definition
CREATE TABLE fruit_types {
fruit text,
location text,
cost float,
PRIMARY KEY ((fruit), location)
}
In this table definition you will notice that we are defining the schema for the table. You will also notice that we are defining a PRIMARY KEY
. This primary key is similar but not exactly like a relational concept. In Cassandra the PRIMAY KEY
is made up of two parts the PARTITION KEY
and CLUSTERING COLUMNS
. The PARTITION KEY
is the first fields specified in the PRIMARY KEY
and can contain one or more fields delimitated by parenthesis. The purpose of the PARTITION KEY
is to be hashed and used to define the node that owns the data and is also used to physically divide the information on the disk into files. The CLUSTERING COLUMNS
make up the other columns listed in the PRIMARY KEY
and amongst other things are used for defining how the data is physically stored on the disk inside the different files as specified by the PARTITION KEY
. I suggest you do some additional reading on the PRIMARY KEY
here if your interested in more detail:
https://docs.datastax.com/en/cql/3.0/cql/ddl/ddl_compound_keys_c.html