Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

XML-Database with 2 columns as PrimaryKey

3 posts in General Discussion Last posting was on 2004-07-23 00:29:44.0Z
Andreas Bruckner Posted on 2004-07-22 10:29:10.0Z
From: "Andreas Bruckner" <abruckne@sybase.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: XML-Database with 2 columns as PrimaryKey
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
X-Original-NNTP-Posting-Host: 158.76.33.113
Message-ID: <40ff97e9$1@forums-2-dub>
X-Original-Trace: 22 Jul 2004 03:33:13 -0700, 158.76.33.113
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 22 Jul 2004 03:22:25 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 22 Jul 2004 03:29:10 -0700
X-Trace: forums-1-dub 1090492150 10.22.108.75 (22 Jul 2004 03:29:10 -0700)
X-Original-Trace: 22 Jul 2004 03:29:10 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:115
Article PK: 17584

Hello!

I don´t know how to use a table with 2 columns as PrimaryKey in the
XML-Database of the M-Business Client.

I tried the following XML-Schema to define the columns "routeId" and "nr" as
Primary-Key, but with this Schema a don not get any columns at all after
synchronizing.

As a workaround I currently compute (routeId*1000+nr) one PrimaryKey-column
from the two real PrimaryKey-columns for the XML-Database.

Is there another way?

- <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:dt="urn:schemas-microsoft-com:datatypes"
xmlns:msch="urn:schemas-microsoft-com:mapping-schema">
<xsd:element name="row" msch:relation="row" type="routeCheckPoint_type" />
- <xsd:complexType name="routeCheckPoint_type">
<xsd:attribute name="routeId" type="xsd:int" />
<xsd:attribute name="nr" type="xsd:int" />
<xsd:attribute name="name" type="xsd:string" />
- <xsd:key name="PrimaryKey">
<xsd:selector xpath="." />
<xsd:field xpath="@routeId" />
< <xsd:field xpath="@nr" />
</xsd:key>
</xsd:complexType>
</xsd:schema>

Thanks in advance,
Andreas


Yadong.Liu_spamoff Posted on 2004-07-22 19:54:38.0Z
MIME-Version: 1.0
X-MIMETrack: Serialize by Notes Client on Yadong Liu/SYBASE(Release 6.5|September 26, 2003) at 07/22/2004 12:35:43 PM, Serialize complete at 07/22/2004 12:35:43 PM, Serialize by Notes Client on Yadong Liu/SYBASE(Release 6.5|September 26, 2003) at 07/22/2004 12:47:57 PM, Serialize complete at 07/22/2004 12:47:57 PM
From: Yadong.Liu_spamoff@ianywhere.com
Subject: Re: XML-Database with 2 columns as PrimaryKey
Newsgroups: ianywhere.public.mbusinessanywhere.general
References: <40ff97e9$1@forums-2-dub>
X-Newsreader: Lotus Notes Release 6.5 September 26, 2003
Content-Type: multipart/alternative; boundary="=_alternative 006CC2EC88256ED9_="
X-Original-NNTP-Posting-Host: yadongl.sybase.com
Message-ID: <41001c73$1@forums-2-dub>
X-Original-Trace: 22 Jul 2004 12:58:43 -0700, yadongl.sybase.com
Lines: 24
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 22 Jul 2004 12:47:51 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 22 Jul 2004 12:54:38 -0700
X-Trace: forums-1-dub 1090526078 10.22.108.75 (22 Jul 2004 12:54:38 -0700)
X-Original-Trace: 22 Jul 2004 12:54:38 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:116
Article PK: 8724


Andreas,

You are right that the XML-database feature in M-Business currently only supports one column primarykey. You have to compute a unique one-column PK in your situation. I am not aware of another way around this.

-Yadong


Christopher Grim Posted on 2004-07-23 00:29:44.0Z
User-Agent: Microsoft-Entourage/10.1.4.030702.0
Subject: Re: XML-Database with 2 columns as PrimaryKey
From: Christopher Grim <Chris.Grim@ianywhere.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
Message-ID: <BD25A871.2E44%Chris.Grim@ianywhere.com>
References: <40ff97e9$1@forums-2-dub> <41001c73$1@forums-2-dub>
Mime-version: 1.0
Content-type: multipart/alternative; boundary="B_3173361778_53010178"
NNTP-Posting-Host: macgrimreaper.sybase.com
X-Original-NNTP-Posting-Host: macgrimreaper.sybase.com
Date: 22 Jul 2004 17:29:44 -0700
X-Trace: forums-1-dub 1090542584 10.22.46.251 (22 Jul 2004 17:29:44 -0700)
X-Original-Trace: 22 Jul 2004 17:29:44 -0700, macgrimreaper.sybase.com
Lines: 66
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:117
Article PK: 8726

One way around this is to use an ultralite database instead of the XML database.  Ultralite is a fully relational database and supports compound keys.

Chris...

On 7/22/04 12:54 PM, in article 41001c73$1@forums-2-dub, "Yadong.Liu_spamoff@ianywhere.com" <Yadong.Liu_spamoff@ianywhere.com> wrote:


Andreas,

You are right that the XML-database feature in M-Business currently only supports one column primarykey. You have to compute a unique one-column PK in your situation. I am not aware of another way around this.

-Yadong