Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Import data from SQL Server to Couchbase

3 replies [Last post]
  • Login or register to post comments
Tue, 11/06/2012 - 16:34
rkb
Offline
Joined: 11/06/2012
Groups: None

I would like to initially populate a bucket (also create the bucket) from data that currently resides on our SQL Server. Would someone be so kind as to give me an example of how this is done? Thank you.

Top
  • Login or register to post comments
Wed, 11/07/2012 - 01:48
daschl
Offline
Joined: 05/19/2012
Groups: None

Hello rkb,

you have some options of doing it, but in practice you certainly have to do some processing with it (since the data model is different).

Which programming language / SDK do you plan to use (I can think of .NET if you mean "SQL Server")?

In general, I can think of the following steps

- Fetch the data out of the SQL Server
- Merge/Process it to fit the model you want it to look like inside Couchbase Server
- Convert the Entities to JSON
- Store them with the Couchbase SDK

If you can give us more information on what you want to store, we can be more specific I'm sure. You can also look here (http://www.couchbase.com/docs/couchbase-devguide-2.0/documented-oriented...) as a starting point!

Best,
Michael

Top
  • Login or register to post comments
Wed, 11/07/2012 - 08:14
rkb
Offline
Joined: 11/06/2012
Groups: None

The first problem that I have is that Couchbase doesn't seem to want to install on my Ubuntu Server. But that is another thread in another forum although I will take suggestions.

The solution that I am looking for involves a SQL Server so as you surmised I am looking for a .NET/C# language solution. I have a class/model that will contain the information that I want to store (and retrieve). I can read from SQL Server and put the appropriate data into my model. So the first two steps that you outlined I can handle. The next two I need help with. Is there a JSON serializer that is part of Couchbase SDK or do I need to install something like JSON.NET so serialize my objects? Finally the last step. My Couchbase server will be on a Linux machine so I will need to connect to it, create a database, and store the serialized object in the database. I would like a code example to do this. The URL is helpful in that it gives me guidance on how best to construct my model but the nitty-gritty details of how this is done for Couchbase is missing.

Thank you.

Top
  • Login or register to post comments
Mon, 11/12/2012 - 11:02
john
Offline
Joined: 01/05/2012
Groups: None

For JSON serialization, the Couchbase .NET client relies on JSON.NET. There are more details at http://www.couchbase.com/develop/net/next. However, as long as you store and retrieve valid JSON strings, you are free to use any JSON library of your choice.

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker