An overview of data modeling best practices, tips, common mistakes, and general guidelines. Notice that this is covered in depth in the Drivers course.
Okay, so I mentioned
in addition to all the types that are standard
and that you can find the list
for in our documentation, we have collections:
sets, lists, maps and user defined types.
I don’t really want to go into the details, but think of
a data model where we have, say, a person
and that person can have multiple
email addresses or multiple phone numbers.
So it would make sense in that case, to simplify
the data model and use collections.
There is
this is covered. ScyllaDB university.
The data modeling course,
you can have a look at that if you’re interested.
Finally, a few words about drivers.
So if you saw my previous talk,. I showed the read-write
example.
I’m not going to go over that again,
but in that example, the client chose
one of the nodes to be the coordinator node,
and that node was not a replica node.
So that node
performed the partition hash, sorry,
the hash function on the partition key,
and it sent the request to the replica nodes
which were W, X and Z.
In terms of performance, there can be an enhancement
where the client would send the request
to one of the replica nodes instead of to the
to a random node.
It can do that by running the hash function,
which is known in advance on the partition key,
and that would save us the extra hop of the coordinator node
having to send the request to the replica nodes.
Okay, so that’s called token aware drivers.
And the example that I showed you, we were using
the CQL shell, typically in appl
drivers for different
languages; another,
another enhancement
or optimization, if you will, is to
for the client not only to contact
and send the request to one of the replica nodes,
but also “shard aware clients”
know which specific shard in the replica node
is responsible for that piece of data,
and that again, optimizes the performance.
So some Scylla drivers
for common languages, popular ones are: Java, Go,
Rust, C++ and Python.
Additionally,
all the drivers that work with Cassandra
should work with ScyllaDB as well and are also used.
I put two links here, one for
we have an entire course at the ScyllaDB university
about using drivers
with some hands on examples in different languages,
and it’s also covered in the documentation.