Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #970

Re: Help for XML data type in ms-sqlserver

From Erland Sommarskog <esquel@sommarskog.se>
Newsgroups comp.databases.ms-sqlserver
Subject Re: Help for XML data type in ms-sqlserver
Date 2012-04-11 07:34 +0000
Organization Erland Sommarskog
Message-ID <XnsA0326161F8400Yazorman@127.0.0.1> (permalink)
References (2 earlier) <08cbb43e-4193-4305-b6b2-a1a1320ab65b@w17g2000yqe.googlegroups.com> <XnsA030EF44F38ADYazorman@127.0.0.1> <cbeb22d5-cb98-4afb-b249-acfa455e2997@m13g2000yqi.googlegroups.com> <XnsA031E234E604Yazorman@127.0.0.1> <d8c72fb8-60ce-4499-aa1a-019595d41b6f@d4g2000vbn.googlegroups.com>

Show all headers | View raw


Ender Karada? (enkaradag@gmail.com) writes:
> we use sqlserver2005 (and 2008 somewhere) now. but may upgrade all db
> servers to 2008R2
> 
> actually im not locked to xml type for this job. what would your
> advice be here? in terms of ease of implementation or working
> performance etc.


Throw SQL 2005 the window and aim at SQL 2008 or SQL 2012. There are a 
couple of new features will help you.

If you use XML, and the XML has enough data to identify each master unique, 
but you don't insert all these fields in the table, you still have a problem 
with mapping the identity values, because you can only list columns you 
inserted in the OUTPUT clause. On SQL 2008 this can be mitigated by using 
the MERGE statement.

Then again, SQL 2008 introduces another features which saves from XML 
altogether: table-valued parameters.

In this context, it is also worth mentioning that SQL 2012 introduces 
sequences, which is a better alternative for surrogate keys over identity 
columns.


-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Help for XML data type in ms-sqlserver Ender Karadağ <enkaradag@gmail.com> - 2012-04-09 10:35 -0700
  Re: Help for XML data type in ms-sqlserver Erland Sommarskog <esquel@sommarskog.se> - 2012-04-09 21:22 +0200
    Re: Help for XML data type in ms-sqlserver Ender Karadağ <enkaradag@gmail.com> - 2012-04-09 13:32 -0700
      Re: Help for XML data type in ms-sqlserver Erland Sommarskog <esquel@sommarskog.se> - 2012-04-09 23:31 +0200
        Re: Help for XML data type in ms-sqlserver Ender Karadağ <enkaradag@gmail.com> - 2012-04-09 14:59 -0700
          Re: Help for XML data type in ms-sqlserver Erland Sommarskog <esquel@sommarskog.se> - 2012-04-10 22:14 +0200
            Re: Help for XML data type in ms-sqlserver Ender Karadağ <enkaradag@gmail.com> - 2012-04-10 15:40 -0700
              Re: Help for XML data type in ms-sqlserver Erland Sommarskog <esquel@sommarskog.se> - 2012-04-11 07:34 +0000
                Re: Help for XML data type in ms-sqlserver Ender Karadağ <enkaradag@gmail.com> - 2012-04-19 10:51 -0700

csiph-web