Re: Annotated schema with views?



See below for the answers that I know (I am not the owner of the SQLXML
component for a couple of years now).

Best regards
Michael

"Joe" <morbidcamel@xxxxxxx> wrote in message
news:uc9DJzMeFHA.3620@xxxxxxxxxxxxxxxxxxxxxxx
> 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.
>

SQL 2005 will ship with SQLXML 4.0 which is SQLXML 3.0 SP2 with support for
the new datatypes and minus the IIS ISAPI for exposing templates and queries
through IIS (use ASP.Net instead is the recommendation).

I don't know whether they will start using FOR XML PATH, but given the cost
of rewriting, I would assume not.

> 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)?

I am not sure that I have enough information about your scenario to provide
you good feedback. But I would assume that the SQLXML team is interested in
understanding your scenario and pain points.

> 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 :).

I will pass this along.

> 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.

You better suggest that in the AS newsgroup (although I will forward this
request/question).

> 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?

I don't quite understand this question. Attribute Groups are an XML schema
concept.
Could you please provide an example?

Thanks
Michael

>
> "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

  • setting dataset datarelation from database
    ... I want to set my dataset's datarelations based on the relationships ... I had a query I ... switched to using 'for xml explicit, ... If I run the query in sql query analyzer, I see the schema ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQLXMLBulkLoad of text child nodes vs. attributes?
    ... You could use the XSDInference tool to get a XSD schema from xml. ... annotations to make it a proper sqlxml schema. ...
    (microsoft.public.sqlserver.xml)
  • [NT] Additional Information on MSSQLXML ISAPI Overflow and Cross-Site Scripting
    ... SQLXML allows XML data to be transferred to and from SQL Server, ... SQLXML has two vulnerabilities: a buffer overflow in the SQLXML ISAPI ... This will return an XML document containing the query results. ... possible to specify certain parameters that affect the returned XML (e.g. ...
    (Securiteam)
  • Re: Best Practice for SQL2005 CRUD of RSS
    ... I'm only in favor of using the XML Data type if your ... That means that you are going to query it ... created but I may still need a schema when? ...
    (microsoft.public.sqlserver.xml)
  • Re: XMLType performance
    ... Want to store and query prioject plans in relational db, ... * Project plans from product A can be exported to well-formed XML ... You haven't really said what the business value of going from the relational data to the XML view is, but I would just do this with a XML view over the relational data, maybe schema based so you can control/doc the evolution. ... You will get both relational, Xquery access to the same data at that stage, including the ability to access the XML 'documents" as XML documents via FTP, WebDav etc. ...
    (comp.databases.oracle.server)