Posts tagged with 'couchbase'
My job as a developer evangelist for Couchbase means than I work much less with SQL Server than I used to. However, it doesn't mean I don't keep up with it.
In fact, inspired by Couchbase, I decided to try out using SQL Server as a sort of document data store. SQL Server 2016 introduced some interesting new features that make this kinda possible: JSON_VALUE, JSON_QUERY, and JSON_MODIFY.
I set up a "document" table, which is two fields: a guid and an nvarchar(max). This is kinda like a Couchbase bucket: a key and a JSON document to go with it.
I put fairly complex hierarchical documents in these fields, something like:
I say "fairly complex", because representing this in a standard normalized fashion would require at least two tables, foreign keys, constraints, and then data migration and schema migration as the model evolves.
Now, suppose I want to execute a query and find all the document that are "Show=true". With Couchbase and N1QL, I would just use something like "SELECT * FROM `bucket` WHERE show = true".
With SQL Server, there's a little more work. "SELECT t.key, t.doc FROM [table] t WHERE JSON_VALUE(t.SpeakingInfo,'$.Show') = 'true'". Notice that JSON_VALUE is being applied to a text field, and a JSON path is used within JSON_VALUE to get a specific value from within that JSON object.
For this simple project I'm doing, that's all I need. No idea yet what kind of performance level I can expect from JSON_VALUE and more complex JSON paths.
But, this is definitely an example of the kinds of database convergence I've been telling people about. The separations between NoSQL and SQL are becoming less strict, at least in terms of data modeling and querying.
You need to be using SQL Server 2016 or SQL Server Azure to take advantage of the JSON_* functions.
Couchbase Day is a day-long FREE event where you can participate in hands-on workshops and technical presentations. If you've never used NoSQL databases before, or you're interested in Couchbase Server in particular, this is the event for you.
Couchbase Day is coming to Columbus, Ohio on October 27, 2016.
Click that link for more details, including the technical prerequisites that you will use during the workshops.
Sign up today, and I'll see you there!
(This is a cross-post of a blog that was originally posted to the Couchbase Blog - Upcoming #Couchbase Events in Austin, Houston and New York City)
I’m going to be in New York on October 8th and Texas from October 10th to October 13th. If you’re in either of those areas and interested in NoSQL and Couchbase, now is a good chance to attend some sessions, visit some great user groups, and ask me questions in-person.
Here’s where I will be in between meals of beef brisket (image by Arnold Gatilao, licensed through Creative Commons):
-
October 8th, 2016: Code Camp NYC - presenting "Full Stack Development with .NET and NoSQL" (which I have presented before, you can check my blog post history for some of the videos).
-
October 10th, 2016: Austin .NET User Group (ADNUG) - also presenting "Full Stack Development with .NET and NoSQL" .
-
October 11th, 2016: Austin Node.JS User Group presenting "Full Stack Development with Node.js and NoSQL" (which I have also presented before, you can check my blog post history for some of the videos).
-
October 12th, 2016: Houston.js presenting "I Have a NoSQL Toaster" (which I have presented before, and is based on Matthew Revell's session of the same name).
-
October 13th, 2016: Houston .NET User Group (HDNUG) again presenting "Full Stack Development with .NET and NoSQL".
A great NYC conference! Four great Texas groups! I’m going to bring whatever stickers and swag that I can fit in my luggage with me, and I may even just bring the CouchCase along too.
I was recently on David Giard's show Technology and Friends! This is my second time on his show. This time I got to talk about NoSQL and Couchbase Server in particular. Check it out, and check out Couchbase Server.
(This is a repost of content that was originally posted on the Couchbase Blog: Upcoming #Couchbase Events in Chicago)
I’m going to be in Chicago for most of next week. If you’re in Chicago and interested in NoSQL and Couchbase, now is a good chance to attend some sessions, visit some great user groups, and ask me questions in-person.
I won’t be at Wrigley Field (the above image was doctored :), but here’s where I will be:
-
September 6th, 2016 at 12pm: Chicago Geekfest presenting "I Have a NoSQL Toaster" (which is my version of Matthew Revell's session of the same name)
-
September 7th, 2016 at 6pm: Chicago .NET Developers presenting "Full Stack Development with .NET and NoSQL" (which I have presented before, you can check my blog post history for some of the videos).
-
September 8th, 2016 at 7pm: Lake County .NET Users Group presenting "SQL for JSON"
Three different sessions and three great Chicago groups. There will be some surprises in store, and I’m going to bring whatever stickers and swag that I can fit in my luggage with me.
If you're in Chicago, why not tweet me and say hi!