Blog

Filter posts by Category Or Tag of the Blog section!

Introducing ArangoDb

Thursday, 05 March 2020

ArangoDB is a multi-model NoSQL database management system that allows users to store, retrieve, and manage data in various formats, including documents, graphs, and key-value pairs. It is an open-source database system that provides a flexible data model, powerful indexing capabilities and supports multiple query languages.

 

ArangoDB is built on top of a distributed architecture, which makes it suitable for handling large and complex datasets. It supports sharding, replication, and failover, which ensures high availability and scalability of the database. ArangoDB is also ACID compliant, which means it supports transactions that ensure data consistency and reliability.

 

One of the key features of ArangoDB is its ability to handle multiple data models. It provides a unified query language called AQL that supports queries across different data models. This means that users can easily switch between document, graph, and key-value data models without having to learn different query languages.

 

ArangoDB also provides a number of tools and features for managing data, including a web-based user interface, RESTful API, and drivers for various programming languages. Additionally, it supports integrations with popular data analysis and visualization tools such as Apache Spark, Apache Flink, and Tableau.

 

Overall, ArangoDB is a powerful database management system that provides flexibility, scalability, and reliability for handling large and complex datasets. Its support for multiple data models and unified query language makes it a popular choice among developers and data scientists.

 

Below is an example of using ArangoDB with C# using the official ArangoDB.Client package:

 

using ArangoDB.Client;

using System.Threading.Tasks;



namespace ArangoDBExample

{

    class Program

    {

        static async Task Main(string[] args)

        {

            // Create a new ArangoDB client

            var client = new ArangoClient(new ArangoDatabaseSettings

            {

                Url = "http://localhost:8529",

                Database = "_system",

                Credential = new NetworkCredential("username", "password")

            });



            // Create a new database

            var db = await client.CreateDatabaseAsync("mydb");



            // Create a new collection

            var collection = await db.CreateCollectionAsync("mycollection");



            // Insert a document

            var document = new

            {

                Name = "John Doe",

                Age = 35

            };

            var result = await collection.InsertDocumentAsync(document);



            // Find documents

            var query = new AqlQuery("FOR doc IN mycollection RETURN doc");

            var cursor = await db.QueryAsync<dynamic>(query);

            var documents = await cursor.ToListAsync();



            // Clean up

            await db.DropAsync();

        }

    }

}

 

This example creates a new ArangoDB client, creates a new database and collection, inserts a document into the collection, and then queries the collection to retrieve the document. Finally, it cleans up by dropping the database. Note that the example assumes that you have a local ArangoDB instance running on port 8529 with default login credentials. 

comments powered by Disqus