The document discusses various ways to connect .NET applications to NoSQL databases like MongoDB and Cassandra. It covers client SDK APIs, REST/SOAP APIs, and SQL-based connectivity options. For SQL connectivity, the document explains that Progress DataDirect drivers normalize the NoSQL data model to expose it through SQL. Examples demonstrate connecting to MongoDB and Cassandra using the MongoDB and Cassandra .NET drivers, their REST APIs, and Progress DataDirect's ODBC drivers with SQL. The document concludes that SQL connectivity requires data normalization but offers familiar skills and easy BI integration.
15. Example: Client SDK Connectivity to MongoDB
Components Used for the Demo Sample
MongoDB C# Driver
• Nuget Package Link
https://www.nuget.org/packages/mongocsharpdriver/
• Getting Started
https://docs.mongodb.com/getting-started/csharp/client/
16. Example: Client SDK Connectivity to MongoDB
What does the sample do?
• Insert object of type MyClass – Square
• Insert object of type MyClass – Circle
• Insert object of type SubClass – SubClass
• Count All Objects which Has Corners > 1
• Count All Objects which Has Ratio > 1
19. Example: Client SDK Connectivity to Cassandra
Components Used for the Demo Sample
Cassandra C# Driver
Nuget Package Link
https://www.nuget.org/packages/CassandraCSharpDriver/
Getting Started
https://academy.datastax.com/resources/getting-started-apache-
cassandra-and-c-net
20. Example: Client SDK Connectivity to Apache Cassandra
What does the sample do?
• CREATE the USERS Table
• Insert User – Salman
• Insert Another User - Shahrukh
• Select a User using Where Clause Filter Condition
25. REST API Connectivity to MongoDB
There are Multiple REST Interfaces for MongoDB
• https://docs.mongodb.com/ecosystem/tools/http-interfaces/
Building First Mongo DB Application using REST
• https://www.mongodb.com/blog/post/building-your-first-application-
mongodb-creating-rest-api-using-mean-stack-part-1
REST APIs for MongoDB CRUD Operations
• http://www.codeproject.com/Articles/1071823/RESTful-WEB-API-for-
CRUD-operations-in-MongoDB
26. REST API Connectivity to Cassandra
Apache-Meos REST API Reference
• https://mesosphere.github.io/cassandra-mesos/docs/rest-api.html
Writing your first client
• https://docs.datastax.com/en/developer/nodejs-driver/1.0/nodejs-
driver/quick_start/qsQuickstart.html
RESTful APIs using spring Boot and Cassandra
• http://myjourneyonjava.blogspot.in/2015/08/restful-api-using-spring-boot-
and.html
31. Example: SQL Connectivity to MongoDB
What does the sample do?
• Uses ADO.NET ODBC Bridge to Progress DataDirect MongoDB ODBC
Driver
• Application clears all rows in the MyClass Collection (Table).
• Insert object of type MyClass – Square
• Insert object of type MyClass – Circle
• Insert object of type SubClass – SubClass
• Count All Objects which Has Corners > 1
• Count All Objects which Has Ratio > 1
35. Example: SQL Connectivity to Apache Cassandra
What does the sample do?
• Uses .NET ODBC Bridge to Progress DataDirect Apache Cassandra ODBC
Driver
• Delete all the rows from USERS Table
• Insert User – Salman
• Insert Another User - Shahrukh
• Select a User using Where Clause Filter Condition
40. NoSQL is non-standard, non-relational way of storing information.
Client SDK API based access is the easiest way to reach NoSQL data from applications,
though it might be limited, creates dependency on the SDK libraries and has lot of data
source specific learning.
REST APIs based access is a bit more complex, but provides more flexibility in terms of its
usage. The API knowledge is data-source specific; If written good code, should perform
better than client SDK.
SQL based connectivity, no new data source specific learnings, easy integration with
third party BI/Analytics tools which expects SQL connectivity. As it’s not the natural way of
connectivity to NoSQL, Data Normalization is required. Some SQL connectivity solutions
like Progress DataDirect takes care of this transparent to the application.
Normalisation techniques should be the key criteria for choosing the right SQL
Connectivity solution for NoSQL DataSources.
Recap
Mark logic – document store (born) + data store + triple store
We have customer (Software AG)who really valued the Out of the Box connectivity provided by Standard based drivers
Pentaho – JDBC
Tableau – ODBC
BIDS/Crystal reports – ADO.NET (Business Intelligence Development Suite)
Release cadence for Cassandra?
Cassandra gets released Monthly with odd versions are reserved for maintenance and even for new functionality
Our approach provides the most natural and flexible representation of nested, multi-value data to relational applications
We examine the data stored and normalize nested data/tuples into second-normal relational form based on a fixed schema
‘Top-level’ data becomes the parent table and nested data become ‘virtual’ tables with FK relation to the parent table
Defined using schema definition tool
Transparent to the application!
PHIL: Another benefit that we may want to mention is that OEM/ISVs won’t need to reinvent their interface for every new complex data type – our normalization will represent these in ‘normal’ ways, saving them the effort or redesigning UI and other functionality.
Existing applications won’t need to reinvent their interfaces for every new complex data type – our normalization will represent these in ‘normal’ ways, saving them the effort or redesigning UI and other functionality.