SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

Losing Rows

There has been a lot of hype in the last 3-4 years around NoSQL databases. Note that NoSQL isn't Not SQL, but rather Not Only SQL, implying that the SQL language still has a place here. In fact, a number of companies that make NoSQL products have layered a SQL-like interpreter or interface on their products to allow familiar SQL language querying.

One of the big reasons companies look at NoSQL is that the various types of databases have lent themselves to scaling easier than traditional RDBMS systems. In the CAP Theorem, these systems tend to be more in the AP range, sacrificing some consistency for scale and performance. That seems crazy to RDBMS people, but if you really think about your application, consistency that is delayed on the order of seconds or less isn't that bad in most applications. Even seconds might not matter in many reporting scenarios.

The thing is, databases aren't perfect, and that goes for NoSQL systems. I ran across a post where MongoDB sometimes loses consistency within a single node. Now, this isn't within a single document, so changes there are transactionally handled well (as we RDBMS people think of them), but for a query, you could have rows drop out and reappear according to some criteria, sometimes within a few minutes or seconds of each query.

That is disturbing. In fact, I'd be terrified of this, mostly because I'd spend a lot of time trying to explain why and getting yelled out. Do you know how many times I've had business people run a report and then someone else run the report a minute later and try to compare things? If I had whole documents dropping out of one or the other, that would be maddening.

Now, there are ways to fix this in a MongoDB database, and I'm not disparaging MongoDB over this. It's a fine system and there are some good applications built on MongoDB that work well. There are some fine applications running on Neo4j, and on Couchbase, and other NoSQL systems. Some of these database work better than an RDBMS in managing particular workloads and problem domains. Some applications and workloads would do well with a NoSQL or a traditional relational database.

The important thing to understand is how your system works. Your organization should understand what allows a database to scale and what doesn't, what things limit HA/DR capabilities, which items might impact consistency across nodes or systems. In the SQL Server world, if you use Availability Groups, you should certainly understand what consistency means for the different databases in the same AG.

NoSQL databases aren't better or worse than relational databases by themselves. Finding a good fit for a particular database platform and your application requires some knowledge and planning. Ensuring a successful application is often less about the technology, and more about the people that architect and code the solution. Worry more about the latter than the former and you should be successful at building software.

Steve Jones from SQLServerCentral.com

Join the debate, and respond to today's editorial on the forums


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 4.7MB) podcast or subscribe to the feed at iTunes and Mevio . feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

Everyday Jones

Follow Steve Jones on Twitter to find links and database related items and announcements.

ADVERTISEMENT
SQL Monitor

How to fix SQL Server disk I/O bottlenecks (without a hammer)

In this new article, Simple-Talk editor Tony Davis explains step-by-step how to find and fix the root causes of disk I/O bottlenecks, including gathering data, avoiding knee-jerk fixes, and how monitoring tools can help. Read now.

ReadyRoll

Database migrations inside Visual Studio

Want to work on SQL Server databases in Visual Studio alongside your application? Download Redgate ReadyRoll to make database changes using SQL migration scripts. Try it free.

SQL Search

Find SQL in your database for free

For example, want to rename one of your table columns but are not sure what stored procedures reference it? Using Redgate’s free SSMS add-in, SQL Search, you can search for the column name and find all the stored procedures that use it. Find out more and download now.

Featured Contents

 

Stairway to Server Management Objects (SMO) Level 2: Connections and Creating Server Inventories

Laerte Junior from SQLServerCentral.com

Learn how to get started working with SMO and PowerShell. More »


 

Free eBook: SQL Server Transaction Log Management

Press Release from Redgate

When a SQL Server database is operating smoothly and performing well, there is no need to be particularly aware of the transaction log, beyond ensuring that every database has an appropriate backup regime and restore plan in place. When things go wrong, however, a DBA's reputation depends on a deeper understanding of the transaction log, both what it does, and how it works. More »


 

Different Options for Importing Data into SQL Server

Additional Articles from MSSQLTips.com

Moving data into SQL Server is something that most DBAs or Developers are faced with probably on a daily basis. In this article, Greg Robidoux explores the various options for doing so. More »


 

From the SQLServerCentral Blogs - Does my database have data type drift?

Daniel Janik from SQLServerCentral Blogs

Over the years I have come to see that every database has what I call data type drift. Simply put,... More »


 

From the SQLServerCentral Blogs - Database Mail Breaks with TLS 1.0 Disabled

Ryan Adams from SQLServerCentral Blogs

Discovery I ran across an issue where I had just configured database mail on a new server, went to send... More »

Question of the Day

Today's Question (by Steve Jones):

I have a Data Conversion Transformation in Integration Services 2016. I want to convert an Nvarchar(200) input column and convert it to Varchar. However, I enter the length of the output column as Varchar(20). What happens when the transformation runs?

Think you know the answer? Click here, and find out if you are right.


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: Integration Services (SSIS).

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

SQL Server T-SQL Recipes

SQL Server T-SQL Recipes is an example-based guide to the Transact-SQL language that is at the core of SQL Server. This edition has been lightly updated for SQL Server 2014 and provides ready-to-implement solutions to common programming and database administration tasks. Learn to create databases, create in-memory tables and stored procedures, insert and update data, generate reports, secure your data, and more. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

When virtualizing a SQL Server in a virtual machine, how are the components or a virtual system ordered from physical machine to the virtual machine? 

Answer: host, hypervisor, guest

Explanation:

The components of a virtual system are ordered from physical to virtual as follows:

  • host
  • hypervisor
  • guest

The host is the physical machine and it's operating system that run the hypervisor. The hypervisor is the software that controls the resources and presents them to the virtual system. The guest is the operating system that runs inside the virtual machine.

Ref: Stairway to Virtualization Level 1: What is Virtualization? - http://www.sqlservercentral.com/articles/Stairway+Series/112555/


» Discuss this question and answer on the forums

Featured Script

Find Missing Backups and send the report

RAMASANKAR MOLLETI from SQLServerCentral.com

Copy and paste the script. Create a Profile and change the profile name appropriately. In this script i have used "DBAProfile" 

More »

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.

SQL Server 2016 : SQL Server 2016 - Development and T-SQL

how to find number of days between successive visists? - PatientId PatientNO Initials---- Patients Table 1 1 ABC 2 3 DEF 3 4 HIJ VisitId PatientID VisitNo VisitDate 1 1 1 12-Jan -2005 2 1 2 23-Jan-2005 3 1 3 28-Jan-2005 4 2 1 01-Feb-2005 5 2 2 08-Feb-2005 6 3 1 03-Feb-2005 7 3 2 08-Feb-2005 Produce a report showing the...


SQL Server 2014 : Administration - SQL Server 2014

Backup Database is terminating abormally - The SQL 2014 is on version 12.0.2000.8 (64X). I have a stored procedure for daily full backup of every database (except...


SQL Server 2014 : Development - SQL Server 2014

unzip file from t sql cmd line - Hi I am getting incorrect command line error when I type this code, [code="sql"]DECLARE @Result int DECLARE @cmd varchar(200) set @cmd = '"\\localhost\7-Zip\7z.exe" C:\test\servername_dbzip_testdb-20160712.zip...

max degree of parallelism - Hi, I would like to know how to get max degree of parallelism via SQL statement?

Simple CLR request - I'm trying to create what I believe should be a very simple Table Valued Function CLR. Here's a T-SQL version...


SQL Server 2012 : SQL 2012 - General

Subquery Question - I am using the following query to see how many apps were approved, funded, etc from the following facilitators: [code="sql"] SELECT C.Facilitator ,ISNULL((SELECT...

SQL Prove Memory Pressure - High Buffer Cache Hit Ratio but Low Page Life Expectancy - Our production server (VM + SAN) has 32 GB of RAM, the database size is ~80GB. The application uses TempDB heavily...

TempDB Keeps Filling Up After Log Truncation - Hi all, I've searched and searched for my condition, but can't seem to find a fit. We recently had a DB...


SQL Server 2012 : SQL Server 2012 - T-SQL

Sequence generation - Hi I had accountno as field for each account no there is number of transactions happening [code="plain"] AccountNo sequence 100001 1 2 3 4 ...

Multiple joins to same table in view - Hello , In my system (CRM software) i have a definitions table which contains (tableID,valueIndex,valueDescription) I am using this table to create...

Not a DBA admin - How do i optimize/tune my queries, check on missing index? - Hi, I appreciate this is quite a broad post. I do not have admin rights in our SQL 2008 sandpit. I have...


SQL Server 2008 : SQL Server 2008 - General

Combine rows into one row with line break by querying with XML - Hi, I have a table like this: [code="sql"] Create table Tbl_Test01 ( Name nvarchar(20), Item nvarchar(30) ) ; insert into Tbl_Test01 values ('Car','Honda2016'), ('Car','Honda2017'), ('Car','Honda2018'), ('Tool','Dwwalt2016'), ('Tool','Dwwalt2017'), ('Tool','Dwwalt2018'), ('Tool','Dwwalt2019') select * from Tbl_Test01 [/code] I'd like to have the value...

High Latch Waits/Sec - Hi, One of my Servers running on SQL Server 2008 R2 , while monitoring perfmon I can see high values for latch...


SQL Server 2008 : T-SQL (SS2K8)

Parsing Non-Standard String into a Standard Format - I'm working on parsing out strings into a standard format. I have provided the examples of strings below. [code="SQL"] create table #TestString(OldString...


SQL Server 2008 : SQL Server 2008 Administration

Log not available error 9001 - Came in to work this morning to face a bunch of alerts for severity 21 errors. "DESCRIPTION: The log for database 'SpotlightManagementFramework'...


Data Warehousing : Integration Services

SSIS Error invalid character value for cast - I have to import 6-7 xlsx files into the SQL Server. These files are created by exports from another application....


Data Warehousing : Analysis Services

if “Tabular semantic model” can be used same way as Report Models. - I am Researching if “Tabular semantic model” can be used same way as Report Models. I am trying to Build...


SQL Server 2005 : SQL Server 2005 General Discussion

Can I remove these RAISERROR 44444? - We're working on migrating our database from SQL 2005 to SQL 2012. One issue that's come up is triggers, on...


Career : Presentations and Speaking

Communicating with Non-Technical Users - Good Morning All, After a google search and looking in servercentral I cant seem to find any article or advice as...


Microsoft Access : Microsoft Access

how to get data PostCode last two after two space sql server - i have following query i want only highlighted post code how to get this please help me i want result...

This email has been sent to newsletter@newslettercollector.com. To be removed from this list, please click here.
If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com.
This newsletter was sent to you because you signed up at SQLServerCentral.com.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2015 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com