Store NoSQL data on SQL Server?

Therefore, ignore the fact that we just need to use the NoSQL database infrastructure requirements — client capabilities.

We have data that obviously belongs to a non-relational model, but we must use SQL Server 2014 to save it. Is there a way to use the library for something like RavenDB or MongoDB with SQL Server for persistence? For example, storing JSON or BSON in a SQL Server table, but using Mongo or Raven to query and serialize?

At first, we were going to just store JSON data in a column, but I decided there should be a more elegant solution. I have seen that RavenDB supports SQL Server replication, but it does not look like it can be used for the main component of persistence.

We are launching a C # ASP.NET MVC web application. The front end is a knockout design, so he will be happy to bind JSON data.

+4
source share
3 answers

For a more complicated discussion of storing JSON in SQL Server as relational data and retrieving it as JSON, please see this wonderful article by Phil Factor (this is the name he missed), creating JSON documents from SQL Server queries via TSQL, https: //www.simple-talk.com/sql/t-sql-programming/producing-json-documents-from-sql-server-queries-via-tsql/ ,

JSON varchar xml- ( JSON) xml. , , , XML varchar.

, , JSON varchars , . Mongo (3.04 ) Mongo , . Mongo, , ACID, , .

, SQL Server 2016 JSON . Microsoft, . . :

+5

, , , , SQL. JSON - nvarchar(max) , . -

  • JSON

    {Name: "name", CreatedBy: "name", Date: "date", other attributes... }
    
  • . , , JSON

    NAME | DATE | CREATED_BY | JSON
    

, .

+4

Since you already have Sql Server 2014, you can probably upgrade to version 2016. In version 2016 you will have new functions for processing JSON data (they will be available in CTP3 in November). Here you can find additional information JSON Support on Sql Server 2016 and How to: Combine JSON and Relational Data on Sql Server 2016

+1
source

Source: https://habr.com/ru/post/1598433/


All Articles