Click here to Skip to main content
16,021,765 members
Articles / Database Development / NoSQL
Alternative
Article

LiteDB - A .NET NoSQL Document Store in a Single Data File

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
14 Oct 2015CPOL2 min read 25.1K   376   7   6
Alternative VB.NET version of "LiteDB - A .NET NoSQL Document Store in a single data file"
In this post, you will find an alternative VB.NET version of a .NET NoSQL Document Store in a single data file called LiteDB.

Introduction

I thought this was an interesting article that might be relevent to VB.NET programmers for study and perhaps implementation.

A NoSQL (originally referring to "non SQL" or "non relational") database provides a mechanism for storage and retrieval of data that is modeled by means other than the tabular relations used in relational databases.  NoSQL databases are increasingly used in big data and real-time web applications.

Nothing could be more representative of the sudden shift to NoSQL than established companies such as Facebook, Google and Amazon.com against well-established relational database technologies. It almost seems like one day the web was was being driven by a few RDBMSs, and the next, five or so NoSQL solutions have established themselves as worthy solutions.

Having said all of that, the first thing we ought to do is explain what is meant by NoSQL. Where relational database vendors have historically tried to position their software as a one-size-fits-all solution, NoSQL leans towards smaller units of responsibility where the best tool for a given job is often times fluid. NoSQL is about being open and aware of alternative, existing and additional patterns and tools for managing your data.

For a more extensive look at NoSQL databases, please visit this link.

Background

LiteDB is a simple, fast and free embedded .NET NoSQL Document Store in a single data file. Inspired on MongoDB, supports collections, POCO classes, Bson Documents, indexes, stream data, ACID transactions, and LINQ expressions.

For detailed history and background, check out the original article at this link.

Understanding the Concepts

To get started, there are five simple concepts you need to understand.

  1. LiteDB has the same concept of a database which you are likely already familiar. Within a LiteDB instance, you can have zero or more databases (versions), each acting as high-level containers for everything else.
  2. A database can have zero or more collections. A collection shares enough in common with a traditional table that you can safely think of the two as the same thing.
  3. Collections are made up of zero or more documents. Again, a document can safely be thought of as a row.
  4. A document is made up of one or more fields, which you can probably guess are a lot like columns or Class Properties.
  5. Indexes in LiteDB function mostly like their RDBMS counterparts.

Points of Interest

The most difficult part of converting this project to VB.NET was the method below. VB uses a lot of conversion operators. I also had to turn off the option for Integer Overflow checking in the Project Properties to get this work:

Image 1

History

  • 15th October, 2015: Initial version

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Arkitech EBC Corporation
United States United States
MS, BBA, software developer, consultant, and trainer. Specializing in building data-centric applications designed for business, university, community & faith based organizations. Started developing Excel VBA macros and never looked back. Freelance developer utilizing VB.Net, SQL Server, Microsoft Access, and ASP.Net.

Comments and Discussions

 
GeneralMy vote is 5 Pin
Mauricio David22-Oct-15 13:43
Mauricio David22-Oct-15 13:43 
GeneralRe: My vote is 5 Pin
Terence Wallace23-Oct-15 2:34
Terence Wallace23-Oct-15 2:34 
GeneralMy vote of 5 Pin
Farhad Reza15-Oct-15 20:39
Farhad Reza15-Oct-15 20:39 
nice.
GeneralRe: My vote of 5 Pin
Terence Wallace16-Oct-15 2:53
Terence Wallace16-Oct-15 2:53 
QuestionWhy "CONVERT" this project!? Pin
Carlos190715-Oct-15 0:10
professionalCarlos190715-Oct-15 0:10 
AnswerRe: Why "CONVERT" this project!? Pin
Terence Wallace15-Oct-15 1:51
Terence Wallace15-Oct-15 1:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.