On 15 Feb 2007, at 11:43, seth redmond wrote:
Here's the basic schema and the dummy data I use to get the naive
build done. It's a fairly complex structure for a 10-table DB but
hopefully the indentation should show where each table is sub-classed
from. Incidentally, this is necessary because when I had most of these
as dm tables (all linked by the reporter_id) we were getting huge
numbers of repeats.
Any chance you could you give me a better idea of the way marteditor
does the naive builds? and is there any way MartEditor could follow,
say, foreign key definitions in Innodb for this kind of build?
-s
Hi Seth,
I think I can see the problem. This is probably aggravated bythe
subclass terminology that we use :)
In mart model each parent table can only have one child (The child
itself can be a parent to a next subclass table)
Each child will have all the parent keys plus it's own key eg.
Parent ---- parent_key
Child ----- parent_key, child_key
NexChild ----- parent_key, child_key, next_child_key
NextNextChild ----- parent_key, child_key, next_child_key,
next_next_child_key
etc.
Each of the children is related n:1 to it's parent
In your data model as far as I can see, you are allowing for multiple
children
(mapping, experiment, hybridization) of the vb_reporter_main table.
One question ... was this generated by MBuilder from some sort
of pre-existing source schema or did you generate it yourself?
and the final answer. Yes, MBuilder will follow the PK->FK relations
where supported
doing schema transformation. However MEditor will only follow mart
naming convention
when defining the associations between tables ei follow the '_key'
suffixes and their numbers.
a.
<vbmart_build.tar.gz>
On 14 Feb 2007, at 19:23, Arek Kasprzyk wrote:
On 14 Feb 2007, at 17:53, seth redmond wrote:
That's solved my first problem, thanks Arek. Now I still have the
problem I started with.
I've got a schema which relies on a number of sub-classed main
tables which, although complex, looks to be just about consistent
with mart schema. But it won't build naively. The problem appears to
be down to multiple main tables since when I remove any of the
others it builds. However when I add any more than two the naive
script hangs (and according to mysql keeps cycling through each
table calling "SHOW COLUMNS ...").
I'd hazard a guess that MartEditor is following the keys through
each table to try and guess a schema and is getting stuck in a loop
of the three main tables. Is this something you've come across
before? and is there any way around it?
Hi Seth,
any chance of sending us the dump of the tables you created? ei just
the table definitions without any data.
We'll look at them closer to see what the problem could be.
cheers,
a.
-s
On 13 Feb 2007, at 18:18, seth redmond wrote:
Sorry if this is something obvious, but I keep running into a 'no
usable tables' error when I'm trying to do a naive build. I've
pared the database back to just two tables but still can't get a
naive build started.
Is there any way to, eg, get the DB calls back from marteditor so I
can see what's going on? Or is there a verbose mode I've missed?
-s
P.S. I've tried this with a number of tables, BTW but for an
example of one which doesn't work, the following are the ones I'm
using now:
snr02[vbmart_01_3]> show create table vb__reporter__main\G show
create table vb__reporter_meta__dm \G
*************************** 1. row ***************************
Table: vb__reporter__main
Create Table: CREATE TABLE `vb__reporter__main` (
`reporter_id_key` varchar(40) NOT NULL,
`reporter_type_list` varchar(50) default NULL,
PRIMARY KEY (`reporter_id_key`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
*************************** 1. row ***************************
Table: vb__reporter_meta__dm
Create Table: CREATE TABLE `vb__reporter_meta__dm` (
`reporter_id_key` varchar(40) NOT NULL,
`mapping_bool` tinyint(1) default '0',
`transcript_bool` tinyint(1) default '0',
`unique_transcript_bool` tinyint(1) default '0',
`experiment_bool` tinyint(1) default '0',
KEY `reporter_id_key` (`reporter_id_key`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
Hi Seth,
this is because you need to have at least one record in your main
table.
Try something like this for example:
mysql> insert into vb__reporter__main values ('blue', 'blue');
It should work now. I agree that the error message there is not very
informative
a.
---------------------------------------------------------------------
--- -------
Arek Kasprzyk
EMBL-European Bioinformatics Institute.
Wellcome Trust Genome Campus, Hinxton,
Cambridge CB10 1SD, UK.
Tel: +44-(0)1223-494606
Fax: +44-(0)1223-494468
---------------------------------------------------------------------
--- -------
--
Seth Redmond
Scientific Programmer, VectorBase
Kafatos / Christophides Groups
Div. Cell and Molecular Biology
Imperial College, London
[EMAIL PROTECTED]
--
----------------------------------------------------------------------
---------
Arek Kasprzyk
EMBL-European Bioinformatics Institute.
Wellcome Trust Genome Campus, Hinxton,
Cambridge CB10 1SD, UK.
Tel: +44-(0)1223-494606
Fax: +44-(0)1223-494468
----------------------------------------------------------------------
---------
------------------------------------------------------------------------
-------
Arek Kasprzyk
EMBL-European Bioinformatics Institute.
Wellcome Trust Genome Campus, Hinxton,
Cambridge CB10 1SD, UK.
Tel: +44-(0)1223-494606
Fax: +44-(0)1223-494468
------------------------------------------------------------------------
-------