Join Chander Dhall for an in-depth discussion in this video Create a database, part of NoSQL Development with DocumentDB in Azure.
- [Instructor] So, now I would like to create a database…if it really does not exist.…I'm going to create a function saying,…createDatabaseIfNotExists.…And there are a few ways we can do it,…we're going to try to do it in the easiest fashion.…First thing I'm going to do is make sure…that I have that ID here…and I should possibly move this code right here.…So, I'm going to say, client.readDatabase,…and make sure I add the database URL.…
Once I have the database URL…I'm going to look for an error and a result…'cause a lot of times when you're making…out of process calls, you have to realize…that anything can go wrong, and if anything does go wrong…then we need to know what that error looks like.…So, if there's an error we want to make sure…what kind of error this it.…So we're going to say if error.code…really equals HttpStatusCode,…which we're going to create in a second,…NOTFOUND, then do something.…
For that to work we're going to have to create…HttpStatusCode, or say codes.…We're going to come in here…and save our HttpStatusCodes equals,…
- Back-end scaling fundamentals
- Fallacies of distributed computing
- Consistency models
- Data migration
- DocumentDB with .NET and Node.js
Skill Level Intermediate
1. Backend Scaling Fundamentals
2. Get Started with DocumentDB
3. DocumentDB with .NET
4. DocumentDB with Node.js
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.