>> [MUSIC] Hi. I'm Burke Holland.
>> I'm Jasmine Greenaway.
>> This is a giant Jenga tower.
We're going to play Jenga,
and give you five reasons
why you should check
out and use Cosmos DB.
Thing number one. Cosmos DB,
in case you didn't know,
is a NoSQL database.
So, when we say NoSQL,
what exactly does that mean?
>> We pretty much mean that
it's non-relational and you
have what you would
call normally a table.
A table is pretty much
now a collection.
It's a collection of documents.
So, these documents have all
of what you would call
fields or columns,
and they're actually properties
in each of these documentaries.
>> So, it's just a
different kind of database.
It's not a table with
different rows and
columns but rather a bunch of
documents that are stored instead.
This tower's going to
fall. You're doomed.
>> No.
>> No. She got it.
Wow. Okay. Thing number two.
Cosmos DB is multi-API which is
weird when it comes to a database.
What does multi-API mean?
>> Well, it pretty much
means that even though
the documents and the structure
of documents stay the same,
you can query with either SQL
or MongoDB, Cassandra, Gremlin.
It's all up to you. So, you
pretty much you model
your data the way you
want and you just query with
the queries that you know and love,
and the queries are the query
language that you know and love.
>> Right. So, you can use SQL or
it could use the MongoDB API.
One of the things that you'd
explained to me that was
very interesting and I
had not realized that one
of the reasons why you might use
document database instead of
a traditional relational
database is that
modeling data from a relational
database stinks sometimes. It's hard.
>> Yes.
>> But modeling with
NoSQL is very easy.
>> Yes. It's super easier.
So, as a.Net Dev, traditionally,
I work with SQL a lot,
and for me, it's
sometimes hard to model
your class models
against your database.
Using Cosmos DB, I don't
need the extra packages,
all I need is the Cosmos API and
my Cosmos DB instance,
and I'm ready to go.
>> So, if you have a user object with
all these nested fields
in it like an address,
people they know, and things
like that, you can just
stuff that whole object
in the database.
When you need it again,
pull it back out again.
NoSQL is pretty cool.
For all my JavaScript
people out there,
you probably already know what it is.
You've probably already
worked with it.
We're going to leave you
some links in the notes
below to check out more about NoSQL,
in general, to help out in case
you need it. Thing number three.
Cosmos DB, one of
the strengths that it
has is that it's
globally distributed.
I can't wait for you to
knock this whole tower down.
>> No, I will not. Watch this.
One of the things that
I've learned about
this tower is that you can't
pull from the bottom
because these are
two-by-fours and
this thing weighs a ton.
>> Yeah.
>> You cannot move
it from the bottom.
>> Yeah.
>> It's like an
unplayable game of Jenga.
So, when we say globally distributed,
what we mean is that Azure
has a few data centers,
like a lot of data centers,
and that means that
your users may be all over the world.
So, they may be in India.
They may be in the United States.
They may be in Australia.
They could be in
China. They could be anywhere.
The closer that your
data is to those people,
to those users, the faster
their experience is going to be.
So, Cosmos DB allows you
to replicate your database
instantly around the globe
just with a click of a button.
Actually, in the Azure portal,
there's this cool
little map and it has
all the data center locations,
and if you want to
replicate your data,
you just click on the data
center location and it lights up,
and it's ready to go which
is really, really neat.
That's a very cool
feature, especially,
if you're working with
a globally distributed set of users.
>> Right. Exactly. A nice thing
about that is you can
actually configure the access,
the way that these regions
access the data.
So, maybe you have a
read-only, or a write-only,
or read and write type of
permissions that you want
to give a certain region,
that's all up to you and you can
actually do that within
the portal as well.
>> That's pretty cool. You
know what you can't do is pull
a block out from this Jenga tower
because I've been trying.
This one right here, it's painted in.
This whole game is a lie.
I got these one. Watch this.
>> Go for it.
>> Oh yeah.
>> Okay.
>> I'm going to win.
>> All right. If you
say so. Watch this.
>> Oh my gosh!
>> Upping the stakes here.
>> Oh Jasmine! Oh my God!
>> That's cheating I think.
I think it's cheating.
>> No, it's fine. Just put it on
this side of the tower.
I didn't see anything.
Just don't touch it.
I'm scared to death.
If this thing falls over, it's
going to knock this building down.
The echo will be seriously loud.
>> Yeah.
>> Let's do it. Thing number four and
probably my favorite feature
of Cosmos DB is that
you can query it right from VS Code.
This is amazing because when
you work with your database
what you really want is to work
with your data right
where your code is.
You don't want to have to go
out to some other admin tool.
You want to just be right
there in your editor,
and with the VS Code extension
for Cosmos DB, you could do that.
>> So, with the Cosmos DB extension,
you can have access to all of
your Cosmos DB instances
and go ahead and run
your queries with that.
But the also really cool thing is
that you can actually connect to
your MongoDB instances and
your MongoDB collections
and query for that.
So, you don't even need
a Cosmos DB account
to actually use the extension.
>> Yeah. That's pretty cool. So, for
all you JavaScript people
out there using MongoDB,
if you want to use
your MongoDB database
and query it right from VS Code,
you can do that with
the Cosmos DB extension.
We'll put a link to
that in the show notes
below. Thing number five.
For all our Azure people out there,
Cosmos DB is just one
click away for you.
So, there's no point
in installing a VM,
or you can install Mongo on a VM,
you can install some NoSQL solution,
but Cosmos DB, you don't
have to install anything.
You can just click and go.
>> Yes. The nice thing
is that you can use it
with your applications
whether mobile or web.
You can actually set it up
with things like Serverless.
So, for example, you can set up
a function trigger that does
something when somebody
inserts a new document
into your collection
or things like that.
>> Right. Which is really powerful
all the cloud services
glued together.
We'll put a link in
the notes below as well,
so you can see how to use or write
a Serverless function
rather that talks directly
to Cosmos DB via the Cosmos bindings.
>> Yeah.
>> Nice. All right.
One more block, and then we're done.
>> Okay. Well, it's your turn.
>> I'm Burke Holland.
>> I'm Jasmine Greenaway.
>> This is our giant Jenga tower.
Now, you know five reasons
that you should check
out and probably use Azure Cosmos DB.
I'm about to win this game. Oh gosh!
[MUSIC]
