Introduction to BrightstarDB

Learn how to use BrightstarDB to define entities and perform CRUD operations.
Course info
Rating
(43)
Level
Beginner
Updated
Nov 6, 2014
Duration
1h 41m
Table of contents
Description
Course info
Rating
(43)
Level
Beginner
Updated
Nov 6, 2014
Duration
1h 41m
Description

BrighstarDB is a database that uses RDF and can be accessed in a high level, .NET-friendly way, with LINQ and strongly typed entities. BrightstarDB can be installed on a server or embedded into an application such as a Windows Phone app. In this course, you'll learn how to define a data model and how to create, retrieve, update, and delete data in a strongly-typed way.

About the author
About the author

With over 15 years experience, Jason Roberts is a Microsoft .NET MVP, freelance developer, and author.

More from the author
Mocking with Moq and NUnit
Intermediate
1h 53m
Feb 22, 2019
Introduction to .NET Testing with NUnit 3
Intermediate
2h 6m
Dec 17, 2018
Working with Files and Streams in C#
Intermediate
3h 13m
Oct 12, 2018
More courses by Jason Roberts
Section Introduction Transcripts
Section Introduction Transcripts

Overview of BrightstarDB
Hi, I'm Jason Roberts from Pluralsight. Welcome to this Introduction to BrightstarDB course. In this module, we're going to start by getting an overview of exactly what BrightstarDB is. So, we're going to start off by introducing BrightstarDB, and we'll learn that it's an open source database, and either that we can use it embedded in our applications or we can have a server-based instance, which we connect to over HTTP. We'll also learn that we can work with BrightstarDB at a high level using constructs such as LINQ. So in this module, we'll learn about the different levels with which we can work with BrightstarDB. So we'll see that at the highest level, we get this BrightstarDB Entity Framework-style programming where we use LINQ and the data context to work at a high level. We'll learn that Brightstar has this data object layer in the middle, and we'll see at the low level we have the Resource Description Framework client API. Just as some background, we'll take a peek under the hood of BrightstarDB, so we'll learn that BrightstarDB is based on the Resource Description Framework, and we'll get an overview of exactly what RDF is, and we'll learn that BrightstarDB essentially stores RDF triples. We'll learn about the two different store persistence types we can use with BrightstarDB, so we'll learn about append-only mode that uses more disk space, and also rewritable mode that uses less disk space. We'll take a look at the Windows Phone app using BrightstarDB and how it stores and retrieves data, and we'll finish up this module with an outline of the rest of the course.

Defining the Data Model
Hi, welcome back. In this module, we're going to see how we can define the actual data model that we want to use in our application. So here we're defining the entities that we want to store in the BrightstarDB database. So we're going to start off by seeing how we can install the relevant NuGet packages into our Visual Studio solution, so we're going to install the BrightstarDB NuGet packages into a Windows Phone application, and when we do this we're going to see how we get provided to us this context class template and how this will generate our database context. So we'll look at how we actually define the entities that we want to store, and we'll see how we do this by first creating interfaces that represent these entities. We'll then see how BrightstarDB takes these entity interfaces and actually generates the concrete entity classes from them. In addition to the concrete entity classes, we'll also see how Brightstar generates the database context class for us, and it's this class we use to actually work at the high level, for example using LINQ with a BrightstarDB database. And we'll also see how we can define the entity identity property so we can work with it in our code. Once we understand how to define the entities, we're going to see how we can define relationships between them. So for example, how to define a one-to-one relationship, a one-to-many relationship, and a many-to-many relationship. Finally, we'll see how we can extend the code that Brightstar generates for us, and we'll see how we can do this using partial classes to add additional members to the concrete entity classes that Brightstar generates.

Running BrightstarDB as a Server
Hi. Welcome back to this final module. In the previous module, we saw how we can connect to an embedded version of BrightstarDB in a Windows Phone application. In this module, we're going to see how we can run BrightstarDB as a server and connect to it from multiple applications over HTTP. So first off in this module, we're going to take a look at some of the different server installation options available to us in BrightstarDB, and then we'll drill into the detail of installing BrightstarDB in IIS. So we'll see how we can get hold of the BrightstarDB installer, and then how we can install it onto our system. We'll then see how we can configure an IIS application to host our BrightstarDB server instance. Next we'll see how we can configure a different data directory to hold our databases than the one specified in the default configuration. And finally, we'll connect to our BrightstarDB server in a browser just to test that the installation has been successful. We're then going to see how we can connect to this server-based BrightstarDB instance from our client applications. So we're going to see an example of connecting in a WPF application, and also in a console application. So we'll see how when we insert data using the WPF application, we can then read it out in our different console application.