Re: Annotated schema with views?
- From: "Bertan ARI [MSFT]" <bertan@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 27 Jun 2005 18:11:22 -0700
Question 1:
There are no plans for using FOR XML PATH for SQL 2005. SQLXML will use FOR
XML EXPLICIT as it did in earlier releases..
Question 2:
In Sql 2005, there are no changes in the way SQLXML generate queries.
For the complexity brought by the elements, if you use simple type elements
in an xsd:sequence block, we will treat them as complex type elements and
generate a select statement for it. This is necessary to preserve the order
of the elements. If you specify the simple type elements in xsd:all group,
it will be treated like an attribute. On the other hand, there are some
other cases, a simple type element might be interpreted as complex type
elements so I would recommend using attributes vs elements.
If your schema is deep and consists of several complex type elements, the
generate FOR XML query will be also big. I couldn't understand how you can
partially generate hierarchies and combine them. Don't you need to find the
relevant parent Xml element to insert the Xml fragments? We would love to
hear more about your solution.
Question 3:
Updategrams have support for identity-columns. You may either use
updg:at-identity :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlxml3/htm/updategram_375f.asp
or use the sql:identity annoations in schema to specify the identity
columns.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sqlxml3/htm/ssxsdannotations_7j03.asp
Let us know if these solutions don't work for you.
Question 4:
Question 5:
Ditto Michael here.
--
Bertan ARI
This posting is provided "AS IS" with no warranties, and confers no rights.
"Michael Rys [MSFT]" <mrys@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23KzUBbTeFHA.2984@xxxxxxxxxxxxxxxxxxxxxxx
> 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.
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
.
- Follow-Ups:
- Re: Annotated schema with views?
- From: Joe
- Re: Annotated schema with views?
- References:
- Annotated schema with views?
- From: Joe
- Re: Annotated schema with views?
- From: Michael Rys [MSFT]
- Re: Annotated schema with views?
- From: Joe
- Re: Annotated schema with views?
- From: Michael Rys [MSFT]
- Annotated schema with views?
- Prev by Date: Re: Importing XML into SQL using DTS
- Next by Date: Re: SP input XML and Return XML
- Previous by thread: Re: Annotated schema with views?
- Next by thread: Re: Annotated schema with views?
- Index(es):
Relevant Pages
|