1

I have my "customer" data in a normalized sql server database.

Getting out the customer data in my app is taking too long. This is because I have to go to 10+ tables to get all the data I need.

My company has an installation of SOLR that I thought about storing a Json object that contains all the data I need for a single "customer" already put together.

I think that this would give me some significant speed improvements.

However, it got me to wondering what the difference would be to me putting this data in a single table with a varchar(max) column that has the Json in it. I could index my 10ish searchable columns on the same table as the json.

I know that document databases are very popular. So I imagine there has to be benefits over just rolling my own using denormalized data in sql server. Can someone tell me what they are?

  • 1
    Sounds like you just need to optimize your existing database. A customer database doesn't sound like anything that needs a special system – Tom V - Team Monica Apr 8 '15 at 12:11
  • @TomV - I don't really have a "customer" database. My situation is much more complex. I was just trying to simplify it so that the specifics of my domain did not get in the way of my question. – Vaccano Apr 8 '15 at 20:29
2

Many NoSQL products have sharding built-in. The DBMS itself looks after storing a particular key range on a certain server and keeping redundant copies for high availability. Client connections are routed within the DBMS rather than in the application. Multi-server scale out becomes easy, at the cost of CAP compromises.

1

As an alternative, if you have Solr already set up, you can have it index your document and return it to you in multiple formats (JSON, XML, even Python dictionaries).

Solr offers a way to search through your information really fast as well as allowing you to do faceted queries as well.

While creating your own denormalized structure in a RDBMS would work, the point of a RDBMS is the relational aspect. You'd be defeating the purpose of using one. Solr would be the easiest solution for the time being (most probably as I don't know your skillset) as it was created for handling denormalized documents.

The obvious benefit from using SQL Server to house your JSON would be that all your information is stored in the same place and in the same environment (most likely) that you're working in.

Note: In the end it is your best judgement that matters. Solr would work well for your needs at the moment, but would it work well long term?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.