From: Dhawan, V. (LNG-DAY) <vik...@le...> - 2006-12-18 22:10:26
|
My question is around the fact, that if I have a XML document = "customer.xml" in one collection which stores customer details and, I have another = document "address.xml" in another collection. How can I put a reference pointer = in customer.xml for document address.xml. so that I can tie customer with = their address.=20 Thanks! Vik -----Original Message----- From: Pierrick Brihaye [mailto:pie...@fr...]=20 Sent: Monday, December 18, 2006 12:26 PM To: Dhawan, Vikram (LNG-DAY) Cc: exi...@li... Subject: Re: [Exist-open] Referential integrity between the documents Hi, [message converted to raw text] Dhawan, Vikram (LNG-DAY) a =E9crit : > I want to know how the Referential Integrity works in Exist across=20 > multiple XML documents. As such, eXist doesn't offer any capability for ensuring a referential=20 integrity between documents (which one by the way ?). Nothing prevents your application to take care about it though ;-) I=20 usually use triggers for that. Cheers, p.b. |
From: Dhawan, V. (LNG-DAY) <vik...@le...> - 2006-12-19 16:14:44
|
Thanks for your help Adam, But the limitation with idref/idrefs is they only work in the same = document. I really want to keep the documents separate because of lots of = reasons. One of them is duplication of data because address will be used other = places as well.=20 I will be more interested in XInclude and XLink. Can you pass me the = link where I can follow that discussion?=20 Thanks! Vik -----Original Message----- From: Adam Retter [mailto:ada...@de...]=20 Sent: Monday, December 18, 2006 5:31 PM To: Dhawan, Vikram (LNG-DAY) Cc: exi...@li... Subject: Re: [Exist-open] Referential integrity between the documents There are several options including XInclude and XLink although those I wont discuss here as they have recently been discussed on the mailing list. Also I suspect something simpler would be more suited to your needs. Here are two simple options - 1) You could embed the addresses in customer.xml then obsoleting address.xml. 2) You could use some sort of id scheme. e.g. in address.xml addresses look like - <address id=3D"1234"> ... </address> In customer.xml you reference the address in some way, perhaps - <customer address=3D"1234"> </customer> or <customer> <address ref=3D"1234"/> ... </customer> On Mon, 2006-12-18 at 17:10 -0500, Dhawan, Vikram (LNG-DAY) wrote: > My question is around the fact, that if I have a XML document "customer.xml" > in one collection which stores customer details and, I have another document > "address.xml" in another collection. How can I put a reference = pointer in > customer.xml for document address.xml. so that I can tie customer = with their > address.=20 >=20 > Thanks! >=20 > Vik > -----Original Message----- > From: Pierrick Brihaye [mailto:pie...@fr...]=20 > Sent: Monday, December 18, 2006 12:26 PM > To: Dhawan, Vikram (LNG-DAY) > Cc: exi...@li... > Subject: Re: [Exist-open] Referential integrity between the documents >=20 > Hi, >=20 > [message converted to raw text] >=20 > Dhawan, Vikram (LNG-DAY) a =E9crit : >=20 > > I want to know how the Referential Integrity works in Exist across=20 > > multiple XML documents. >=20 > As such, eXist doesn't offer any capability for ensuring a = referential=20 > integrity between documents (which one by the way ?). >=20 > Nothing prevents your application to take care about it though ;-) I=20 > usually use triggers for that. >=20 > Cheers, >=20 > p.b. >=20 > = ------------------------------------------------------------------------= - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to = share your > opinions on IT & business topics through brief surveys - and earn = cash > = http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open --=20 Adam Retter Principal Developer Devon Portal Project Room 310 County Hall Topsham Road Exeter EX2 4QD t: 01392 38 3683 f: 01392 38 2966 e: ada...@de... w: www.devonline.gov.uk |
From: Adam R. <ada...@de...> - 2006-12-19 16:26:04
|
er, Why do idrefs only work in one document? -- Adam Retter Principal Developer Devon Portal Project Room 310 County Hall Topsham Road Exeter EX2 4QD t: 01392 38 3683 f: 01392 38 2966 e: ada...@de... w: www.devonline.gov.uk |
From: Dhawan, V. (LNG-DAY) <vik...@le...> - 2006-12-19 16:30:47
|
I think that's what w3c specs says; they only talk about id/idrefs in one resource/document. If you can give me an example across the multiple documents I will really appreciate that. Thanks! Vik -----Original Message----- From: Adam Retter [mailto:ada...@de...] Sent: Tuesday, December 19, 2006 11:26 AM To: Dhawan, Vikram (LNG-DAY) Cc: exi...@li... Subject: RE: [Exist-open] Referential integrity between the documents er, Why do idrefs only work in one document? -- Adam Retter Principal Developer Devon Portal Project Room 310 County Hall Topsham Road Exeter EX2 4QD t: 01392 38 3683 f: 01392 38 2966 e: ada...@de... w: www.devonline.gov.uk |
From: Adam R. <ada...@de...> - 2006-12-19 16:38:39
|
I think we are talking about different things here - I was talking about you assigning unique identifiers to each address (a primary key if you like) and then referencing these addresses from the customers file using those unique id's. You could either manually manage these unique identifiers of use a Trigger to do it fo you (which is what I believe Pierrick does). I just happened to name the attributes in my example "id" and "ref" as that seemed appropriate. Thanks Adam. <snip/> On Tue, 2006-12-19 at 11:30 -0500, Dhawan, Vikram (LNG-DAY) wrote: > I think that's what w3c specs says; they only talk about id/idrefs in one > resource/document. > > If you can give me an example across the multiple documents I will really > appreciate that. > > Thanks! > > Vik > > -----Original Message----- > From: Adam Retter [mailto:ada...@de...] > Sent: Tuesday, December 19, 2006 11:26 AM > To: Dhawan, Vikram (LNG-DAY) > Cc: exi...@li... > Subject: RE: [Exist-open] Referential integrity between the documents > > er, Why do idrefs only work in one document? > > > -- Adam Retter Principal Developer Devon Portal Project Room 310 County Hall Topsham Road Exeter EX2 4QD t: 01392 38 3683 f: 01392 38 2966 e: ada...@de... w: www.devonline.gov.uk |
From: Dhawan, V. (LNG-DAY) <vik...@le...> - 2006-12-19 19:03:21
|
Adam, I think now I started getting your point. Can you direct me where can I find more info about Triggers support in exist. Thanks! Vik -----Original Message----- From: Adam Retter [mailto:ada...@de...] Sent: Tuesday, December 19, 2006 11:39 AM To: Dhawan, Vikram (LNG-DAY) Cc: exi...@li... Subject: RE: [Exist-open] Referential integrity between the documents I think we are talking about different things here - I was talking about you assigning unique identifiers to each address (a primary key if you like) and then referencing these addresses from the customers file using those unique id's. You could either manually manage these unique identifiers of use a Trigger to do it fo you (which is what I believe Pierrick does). I just happened to name the attributes in my example "id" and "ref" as that seemed appropriate. Thanks Adam. <snip/> On Tue, 2006-12-19 at 11:30 -0500, Dhawan, Vikram (LNG-DAY) wrote: > I think that's what w3c specs says; they only talk about id/idrefs in one > resource/document. > > If you can give me an example across the multiple documents I will really > appreciate that. > > Thanks! > > Vik > > -----Original Message----- > From: Adam Retter [mailto:ada...@de...] > Sent: Tuesday, December 19, 2006 11:26 AM > To: Dhawan, Vikram (LNG-DAY) > Cc: exi...@li... > Subject: RE: [Exist-open] Referential integrity between the documents > > er, Why do idrefs only work in one document? > > > -- Adam Retter Principal Developer Devon Portal Project Room 310 County Hall Topsham Road Exeter EX2 4QD t: 01392 38 3683 f: 01392 38 2966 e: ada...@de... w: www.devonline.gov.uk |
From: Adam R. <ada...@de...> - 2006-12-18 22:31:26
|
There are several options including XInclude and XLink although those I wont discuss here as they have recently been discussed on the mailing list. Also I suspect something simpler would be more suited to your needs. Here are two simple options - 1) You could embed the addresses in customer.xml then obsoleting address.xml. 2) You could use some sort of id scheme. e.g. in address.xml addresses look like - <address id=3D"1234"> ... </address> In customer.xml you reference the address in some way, perhaps - <customer address=3D"1234"> </customer> or <customer> <address ref=3D"1234"/> ... </customer> On Mon, 2006-12-18 at 17:10 -0500, Dhawan, Vikram (LNG-DAY) wrote: > My question is around the fact, that if I have a XML document "customer.x= ml" > in one collection which stores customer details and, I have another docum= ent > "address.xml" in another collection. How can I put a reference pointer in > customer.xml for document address.xml. so that I can tie customer with th= eir > address.=20 >=20 > Thanks! >=20 > Vik > -----Original Message----- > From: Pierrick Brihaye [mailto:pie...@fr...]=20 > Sent: Monday, December 18, 2006 12:26 PM > To: Dhawan, Vikram (LNG-DAY) > Cc: exi...@li... > Subject: Re: [Exist-open] Referential integrity between the documents >=20 > Hi, >=20 > [message converted to raw text] >=20 > Dhawan, Vikram (LNG-DAY) a =C3=A9crit : >=20 > > I want to know how the Referential Integrity works in Exist across=20 > > multiple XML documents. >=20 > As such, eXist doesn't offer any capability for ensuring a referential=20 > integrity between documents (which one by the way ?). >=20 > Nothing prevents your application to take care about it though ;-) I=20 > usually use triggers for that. >=20 > Cheers, >=20 > p.b. >=20 > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share y= our > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open --=20 Adam Retter Principal Developer Devon Portal Project Room 310 County Hall Topsham Road Exeter EX2 4QD t: 01392 38 3683 f: 01392 38 2966 e: ada...@de... w: www.devonline.gov.uk |