By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,590 Members | 2,191 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,590 IT Pros & Developers. It's quick & easy.

Convert to XML Storage V9.1

P: n/a
Hi,

I need to know if my regular relational database, now in DB2 v9.1 can
be transformed to an XML database easily?

The data can very easily be represented in XML, but can I convert a
regular table into an XML table and retain Stored Procedures and
Triggers. I know that the latter would have to be modified, but how
much work is it, and is it even doable?

SS

Mar 2 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
28******@gmail.com wrote:
Hi,

I need to know if my regular relational database, now in DB2 v9.1 can
be transformed to an XML database easily?

The data can very easily be represented in XML, but can I convert a
regular table into an XML table and retain Stored Procedures and
Triggers. I know that the latter would have to be modified, but how
much work is it, and is it even doable?

SS
That's a massive question and of course the standard answer will be "it
depends". Everything is do-able given enough this I suppose.

As a "starter for 10" however, one of the first prereqs for using PureXML
within a database is that it must be defined as UNICODE (UTF-8). Without
that, you are going to have to create a new database and migrate everything
into it. That could be a massive tasks for you : so a good first check.

In general I would not expect you to want to convert data currently in
relational format for storage as XML : it is just going to make everything
slower, and access more difficult. Where PureXML is a benefit is where
data currently has a need to be in XML format : for example, in our case,
we currently receive inbound data in XML format and shred it into
relational tables. When we get to V9 there will be real benefit in not
having to do all that shredding. However we will still need to rewrite
all existing accesses to use the XML data directly, and XQuery rather than
SQL, and we still have to evaluate the relative Cost / Benefit of doing
this.

HTH

Phil
Mar 2 '07 #2

P: n/a
On Mar 2, 2:47 am, Philip Nelson <team...@scotdb.comwrote:
2803s...@gmail.com wrote:
Hi,
I need to know if my regular relational database, now in DB2 v9.1 can
be transformed to an XML database easily?
The data can very easily be represented in XML, but can I convert a
regular table into an XML table and retain Stored Procedures and
Triggers. I know that the latter would have to be modified, but how
much work is it, and is it even doable?
SS

That's a massive question and of course the standard answer will be "it
depends". Everything is do-able given enough this I suppose.

As a "starter for 10" however, one of the first prereqs for using PureXML
within a database is that it must be defined as UNICODE (UTF-8). Without
that, you are going to have to create a new database and migrate everything
into it. That could be a massive tasks for you : so a good first check.

In general I would not expect you to want to convert data currently in
relational format for storage as XML : it is just going to make everything
slower, and access more difficult. Where PureXML is a benefit is where
data currently has a need to be in XML format : for example, in our case,
we currently receive inbound data in XML format and shred it into
relational tables. When we get to V9 there will be real benefit in not
having to do all that shredding. However we will still need to rewrite
all existing accesses to use the XML data directly, and XQuery rather than
SQL, and we still have to evaluate the relative Cost / Benefit of doing
this.

HTH

Phil
Thanks Phil,

Well, it sounds like I'd be better off sticking to old-fashion
relational. In fact, I can't see any situation where XML storage
(input, storage, retrieval) is of any advantage!

If someone from IBM is following this . . . Why should I (or anyone)
bother with XML at all? Even if the incoming and outgoing stuff is in
XML. It can be shredded to put into a plain relational table, and
reconstructed to XML with whatever XSD that's given?

SS

Mar 4 '07 #3

P: n/a
Stanley Sinclair wrote:
On Mar 2, 2:47 am, Philip Nelson <team...@scotdb.comwrote:
>2803s...@gmail.com wrote:
Hi,
I need to know if my regular relational database, now in DB2 v9.1 can
be transformed to an XML database easily?
The data can very easily be represented in XML, but can I convert a
regular table into an XML table and retain Stored Procedures and
Triggers. I know that the latter would have to be modified, but how
much work is it, and is it even doable?
SS

That's a massive question and of course the standard answer will be "it
depends". Everything is do-able given enough this I suppose.

As a "starter for 10" however, one of the first prereqs for using PureXML
within a database is that it must be defined as UNICODE (UTF-8).
Without that, you are going to have to create a new database and migrate
everything
into it. That could be a massive tasks for you : so a good first check.

In general I would not expect you to want to convert data currently in
relational format for storage as XML : it is just going to make
everything
slower, and access more difficult. Where PureXML is a benefit is where
data currently has a need to be in XML format : for example, in our case,
we currently receive inbound data in XML format and shred it into
relational tables. When we get to V9 there will be real benefit in not
having to do all that shredding. However we will still need to rewrite
all existing accesses to use the XML data directly, and XQuery rather
than SQL, and we still have to evaluate the relative Cost / Benefit of
doing this.

HTH

Phil

Thanks Phil,

Well, it sounds like I'd be better off sticking to old-fashion
relational. In fact, I can't see any situation where XML storage
(input, storage, retrieval) is of any advantage!

If someone from IBM is following this . . . Why should I (or anyone)
bother with XML at all? Even if the incoming and outgoing stuff is in
XML. It can be shredded to put into a plain relational table, and
reconstructed to XML with whatever XSD that's given?

SS
I didn't suggest that the XML wasn't worth considering : in fact we have
been storing the inbound XML documents on our system "whole" as well as
shredding them, because we believe there are immense benefits to be had
from converting once we get our systems up to V9.

Shredding is a very costly process in terms of processing power. So
eliminating that from the mix will give us a lot of savings.

Phil
Mar 4 '07 #4

P: n/a
Stanley Sinclair wrote:
On Mar 2, 2:47 am, Philip Nelson <team...@scotdb.comwrote:
>2803s...@gmail.com wrote:
>>Hi,
I need to know if my regular relational database, now in DB2 v9.1 can
be transformed to an XML database easily?
The data can very easily be represented in XML, but can I convert a
regular table into an XML table and retain Stored Procedures and
Triggers. I know that the latter would have to be modified, but how
much work is it, and is it even doable?
SS
That's a massive question and of course the standard answer will be "it
depends". Everything is do-able given enough this I suppose.

As a "starter for 10" however, one of the first prereqs for using PureXML
within a database is that it must be defined as UNICODE (UTF-8). Without
that, you are going to have to create a new database and migrate everything
into it. That could be a massive tasks for you : so a good first check.

In general I would not expect you to want to convert data currently in
relational format for storage as XML : it is just going to make everything
slower, and access more difficult. Where PureXML is a benefit is where
data currently has a need to be in XML format : for example, in our case,
we currently receive inbound data in XML format and shred it into
relational tables. When we get to V9 there will be real benefit in not
having to do all that shredding. However we will still need to rewrite
all existing accesses to use the XML data directly, and XQuery rather than
SQL, and we still have to evaluate the relative Cost / Benefit of doing
this.

HTH

Phil

Thanks Phil,

Well, it sounds like I'd be better off sticking to old-fashion
relational. In fact, I can't see any situation where XML storage
(input, storage, retrieval) is of any advantage!

If someone from IBM is following this . . . Why should I (or anyone)
bother with XML at all? Even if the incoming and outgoing stuff is in
XML. It can be shredded to put into a plain relational table, and
reconstructed to XML with whatever XSD that's given?
Stanley,

XML storage shines when your schema fluctuates.
I.e. when you keep adding/dropping/changing columns to your table to a
point where you feel it to be unnerving that's a pretty good indicator.
A very good example are taxes. Every year rules change.
XML thrives on schema-evolution.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Mar 5 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.