[BioMart Users] Relations in Biomart

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[BioMart Users] Relations in Biomart

Sri Krishna Suresh Kumar
Hello Again,

I am trying to setup a database with relations into biomart.
I am facing a problem where there is multi-relation between the tables.
For example I am trying to setup the following table with the structure

CREATE TABLE Parent
(
 id int(10) NOT NULL,
 sample varchar(10) NOT NULL,
 PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE Child
(
 id1 int(10) NOT NULL,
 id2 int(10) NOT NULL,
 relation varchar(10) NOT NULL,
 INDEX (id1),
 INDEX (id2),
 FOREIGN KEY (id1) REFERENCES Parent (id),
 FOREIGN KEY (id2) REFERENCES Parent (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

In this case, Biomart does not allow to add the database and gives an
error saying "An relation already exist between these two keys" and
throws out an exception. I was wondering if this can be avoided? Or
how would one go about setting such relations.

Thanks and Regards,
Sri Krishna
_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [BioMart Users] Relations in Biomart

Yong Liang
Hi Sri,

Sorry that your case is not supported in the current version. We will
investigate it and hopefully can add this feature in the next release.

Yong


On 11-05-26 11:26 AM, "Sri Krishna Suresh Kumar" <[hidden email]>
wrote:

> Hello Again,
>
> I am trying to setup a database with relations into biomart.
> I am facing a problem where there is multi-relation between the tables.
> For example I am trying to setup the following table with the structure
>
> CREATE TABLE Parent
> (
>  id int(10) NOT NULL,
>  sample varchar(10) NOT NULL,
>  PRIMARY KEY (id)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>
> CREATE TABLE Child
> (
>  id1 int(10) NOT NULL,
>  id2 int(10) NOT NULL,
>  relation varchar(10) NOT NULL,
>  INDEX (id1),
>  INDEX (id2),
>  FOREIGN KEY (id1) REFERENCES Parent (id),
>  FOREIGN KEY (id2) REFERENCES Parent (id)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>
> In this case, Biomart does not allow to add the database and gives an
> error saying "An relation already exist between these two keys" and
> throws out an exception. I was wondering if this can be avoided? Or
> how would one go about setting such relations.
>
> Thanks and Regards,
> Sri Krishna
> _______________________________________________
> Users mailing list
> [hidden email]
> https://lists.biomart.org/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [BioMart Users] Relations in Biomart

Sri Krishna Suresh Kumar
Hello Yong,

Thank you for the quick reply.

Thanks
Sri Krishna

On Thu, May 26, 2011 at 6:13 PM, Yong Liang <[hidden email]> wrote:

> Hi Sri,
>
> Sorry that your case is not supported in the current version. We will
> investigate it and hopefully can add this feature in the next release.
>
> Yong
>
>
> On 11-05-26 11:26 AM, "Sri Krishna Suresh Kumar" <[hidden email]>
> wrote:
>
>> Hello Again,
>>
>> I am trying to setup a database with relations into biomart.
>> I am facing a problem where there is multi-relation between the tables.
>> For example I am trying to setup the following table with the structure
>>
>> CREATE TABLE Parent
>> (
>>  id int(10) NOT NULL,
>>  sample varchar(10) NOT NULL,
>>  PRIMARY KEY (id)
>> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>>
>> CREATE TABLE Child
>> (
>>  id1 int(10) NOT NULL,
>>  id2 int(10) NOT NULL,
>>  relation varchar(10) NOT NULL,
>>  INDEX (id1),
>>  INDEX (id2),
>>  FOREIGN KEY (id1) REFERENCES Parent (id),
>>  FOREIGN KEY (id2) REFERENCES Parent (id)
>> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>>
>> In this case, Biomart does not allow to add the database and gives an
>> error saying "An relation already exist between these two keys" and
>> throws out an exception. I was wondering if this can be avoided? Or
>> how would one go about setting such relations.
>>
>> Thanks and Regards,
>> Sri Krishna
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> https://lists.biomart.org/mailman/listinfo/users
>
>
>
_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [BioMart Users] Relations in Biomart

Junjun Zhang
In reply to this post by Sri Krishna Suresh Kumar
Hi Sri,

Would it be possible for you to provide a more concrete example where the
double-relation exists? I'd like to see how the two tables should be
joined in a sensible way.

Thanks,
Junjun



On 11-05-26 11:26 AM, "Sri Krishna Suresh Kumar" <[hidden email]>
wrote:

>Hello Again,
>
>I am trying to setup a database with relations into biomart.
>I am facing a problem where there is multi-relation between the tables.
>For example I am trying to setup the following table with the structure
>
>CREATE TABLE Parent
>(
> id int(10) NOT NULL,
> sample varchar(10) NOT NULL,
> PRIMARY KEY (id)
>) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>
>CREATE TABLE Child
>(
> id1 int(10) NOT NULL,
> id2 int(10) NOT NULL,
> relation varchar(10) NOT NULL,
> INDEX (id1),
> INDEX (id2),
> FOREIGN KEY (id1) REFERENCES Parent (id),
> FOREIGN KEY (id2) REFERENCES Parent (id)
>) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>
>In this case, Biomart does not allow to add the database and gives an
>error saying "An relation already exist between these two keys" and
>throws out an exception. I was wondering if this can be avoided? Or
>how would one go about setting such relations.
>
>Thanks and Regards,
>Sri Krishna
>_______________________________________________
>Users mailing list
>[hidden email]
>https://lists.biomart.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
https://lists.biomart.org/mailman/listinfo/users