Re: Annotated schema with views?



OK, thank you for the advice. I got this information of existence checks
from the following article
http://support.microsoft.com/default.aspx?scid=kb;en-us;813955

I have another couple of questions though.

Question 1:
Will SQL 2005 support SQLXML natively and will the generated queries use FOR
XML PATH instead of the bulky FOR XML EXPLICIT. I know of the XML columns,
but I don't want to redo my tables necessarily.

Question 2:
I'm running into limitations in terms of performace with my XSD Schema
because there is simply a lot of elements.

I changed my XML format to be attribute centric and also added a lot of
clustered indexes on the keys and selected elements. This speeded up
tremendously. The problem is I have to add more elements in future and the
containment hierarchy is becoming huge. I ended up writting some logic to
query elements in fragments and add children manually. Will this be better
in SQL 2005 (if question 1 is "yes" ofcourse)?

Question 3:
UpdateGrams doesn't work well with identity columns. I ended using GUIDs
instead. This is fine in my current project, but I have another existing
project I want to convert to use SQLXML with .NET serialization which
depends hugely on identity values... will this be improved in future. I
suppose you can always write XSLT to generate clever SQL script or something
as a work-around, but I like the convenience of updategrams. Let MS do the
query generation work :).

Question 4:
I know AS in 2005 uses XML/A. What is the chances in future of mapping XSD
to cubes instead of using XSLT to get the same effect? I don't know if this
is the right group to pose this question though.

Question 5:
SQL queries FOR XML doesn't support XML Attribute Groups, will this be
supported in future? Or is a XSLT the only way to do this as well?


"Michael Rys [MSFT]" <mrys@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:Ok6LcyDeFHA.640@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Joe
>
> This should not be a problem. Since we do not look at the relational
> schema when we generate the queries, we do not know whether the column can
> be null or not. However, the query optimizier will know about it and this
> optimize these expressions away. Thus, there should be no slow down in
> performance due to these IS NOT NULL checks...
>
> Best regards
> Michael
>
> "Joe" <morbidcamel@xxxxxxx> wrote in message
> news:%23A08G49dFHA.2776@xxxxxxxxxxxxxxxxxxxxxxx
>> My database I am working with is very normalized so I ended up creating
>> views for certain tables which I then use in my XSD schema to select XML
>> from the DB.
>>
>> The problem is the generated query does unecessary existence checks
>> because
>> it doesn't read the underlying table column schema info.. the underlying
>> column is definately marked "NOT NULL".
>> ...
>> (((((_Q6.A32 IS NOT NULL AND (_Q6.A32 =
>> N'11111145-110b-11c4-d8b3-c8c5154c131e') OR _Q6.A32 IS NOT NULL AND
>> (_Q6.A32
>> = N'11111145-110b-11c4-d8b3-c8c5154c131d')) OR _Q6.A32 IS NOT NULL
>> ...
>>
>> How do I get rid of this unecessary checks. Surely it slows down
>> performance
>> of the query.
>>
>>
>>
>
>


.



Relevant Pages

  • Possible?? SQL Svr obtaining data via SOAP/XML from another SQL Sv
    ... SQL servers (one local, one remote through the internet). ... I used VBScript, MSXML, MSSOAP to connect, query, parse and insert data into ... XML" functionality provided in SELECT verb. ...
    (microsoft.public.sqlserver.xml)
  • Re: my first xml query
    ... I opened the sql pane and ran the xml.value query below and it worked. ... I ran the xml value query below and it worked. ... SELECT failed because the following SET options have incorrect ...
    (microsoft.public.sqlserver.xml)
  • Re: Query in Xml
    ... it will not just convert it to the said SQL ... declare @x xml ... the sequence values returned by query or method is itself a scalar value... ... as what is typical for text-nodes and attributes is ...
    (microsoft.public.sqlserver.xml)
  • Need help with FOR XML
    ... I need to fit this into the following XML format ... How should I be constructing the SQL query to produce the output I ... David Anderson ...
    (microsoft.public.sqlserver.programming)
  • Re: Is there a way to convert ms sql 2008 tables to XML files?
    ... After looking at the code I made it work, since I removed 2 nVARCHARcolumns from the SQL statement where it is used as an RTF. ... I have the 2 XML files the bad and the good which are below: ... Verdana;}{\f1\fnil\fcharset0 Microsoft Sans ... Here is the actual string copied from the ms sql 2008 which works fine; ...
    (microsoft.public.dotnet.framework.aspnet)

Loading