You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(11) |
Jul
(34) |
Aug
(14) |
Sep
(10) |
Oct
(10) |
Nov
(11) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(56) |
Feb
(76) |
Mar
(68) |
Apr
(11) |
May
(97) |
Jun
(16) |
Jul
(29) |
Aug
(35) |
Sep
(18) |
Oct
(32) |
Nov
(23) |
Dec
(77) |
2004 |
Jan
(52) |
Feb
(44) |
Mar
(55) |
Apr
(38) |
May
(106) |
Jun
(82) |
Jul
(76) |
Aug
(47) |
Sep
(36) |
Oct
(56) |
Nov
(46) |
Dec
(61) |
2005 |
Jan
(52) |
Feb
(118) |
Mar
(41) |
Apr
(40) |
May
(35) |
Jun
(99) |
Jul
(84) |
Aug
(104) |
Sep
(53) |
Oct
(107) |
Nov
(68) |
Dec
(30) |
2006 |
Jan
(19) |
Feb
(27) |
Mar
(24) |
Apr
(9) |
May
(22) |
Jun
(11) |
Jul
(34) |
Aug
(8) |
Sep
(15) |
Oct
(55) |
Nov
(16) |
Dec
(2) |
2007 |
Jan
(12) |
Feb
(4) |
Mar
(8) |
Apr
|
May
(19) |
Jun
(3) |
Jul
(1) |
Aug
(6) |
Sep
(12) |
Oct
(3) |
Nov
|
Dec
|
2008 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(21) |
2009 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(19) |
Jun
(14) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
(22) |
Apr
(12) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Thomas O. <ot...@fi...> - 2004-03-08 19:29:08
|
Hello, I have a little problem trying to insert a sequence from Genbank with the GBParser. (Errormessage and sequence-file (a cutted version) see below!) Looks like, that the table doesn't exists! Do I have to create the table or is the GBParser not able to insert this type of entries in general. I will continue to resolve the problem, but maybe someone might help me. Thanks a lot, Thomas Error msg: Invalid child name: 'GUS::Model::DoTS::AAFeatureComment' at /home/oracle/gus_home/lib/perl/GUS/ObjRelP/DbiTable.pm line 851 GUS::ObjRelP::DbiTable::addToChildList('GUS::Model::DoTS::Source_Table=HASH(0x8fc9b44)','ARRAY(0x8fee070)','ARRAY(0x8fee0ac)','ARRAY(0x8fee0e8)','ARRAY(0x8fee124)','ARRAY(0x8fee160)','ARRAY(0x8fee19c)','ARRAY(0x8fee1d8)','ARRAY(0x8fee214)',...) called at /home/oracle/gus_home/lib/perl/GUS/ObjRelP/DbiTable.pm line 844 GUS::ObjRelP::DbiTable::setChildList('GUS::Model::DoTS::Source_Table=HASH(0x8fc9b44)','ARRAY(0x8fee070)','ARRAY(0x8fee0ac)','ARRAY(0x8fee0e8)','ARRAY(0x8fee124)','ARRAY(0x8fee160)','ARRAY(0x8fee19c)','ARRAY(0x8fee1d8)','ARRAY(0x8fee214)',...) called at /home/oracle/gus_home/lib/perl/GUS/Model/DoTS/Source_Table.pm line 16 GUS::Model::DoTS::Source_Table::setDefaultParams('GUS::Model::DoTS::Source_Table=HASH(0x8fc9b44)') called at /home/oracle/gus_home/lib/perl/GUS/ObjRelP/DbiTable.pm line 38 GUS::ObjRelP::DbiTable::new('GUS::Model::DoTS::Source_Table','GUS::Model::DoTS::Source','GUS::ObjRelP::DbiDatabase=HASH(0x8c0e34c)') called at /home/oracle/gus_home/lib/perl/GUS/ObjRelP/DbiDatabase.pm line 179 GUS::ObjRelP::DbiDatabase::getTable('GUS::ObjRelP::DbiDatabase=HASH(0x8c0e34c)','GUS::Model::DoTS::Source') called at /home/oracle/gus_home/lib/perl/GUS/ObjRelP/DbiRow.pm line 30 GUS::ObjRelP::DbiRow::new('GUS::ObjRelP::DbiRow','GUS::Model::DoTS::Source','HASH(0x8fcb890)','undef','undef') called at /home/oracle/gus_home/lib/perl/GUS/Model/GusRow.pm line 25 GUS::Model::GusRow::new('GUS::Model::DoTS::Source','HASH(0x8fcb890)') called at /home/oracle/gus_home/lib/perl/GUS/Common/Plugin/GBParser.pm line 486 GUS::Common::Plugin::GBParser::buildFeatures('GUS::Common::Plugin::GBParser=HASH(0x856fbac)','CBIL::Bio::GenBank::Entry=HASH(0x8ec70f4)','GUS::Model::DoTS::ExternalNASequence=HASH(0x8f95ea8)') called at /home/oracle/gus_home/lib/perl/GUS/Common/Plugin/GBParser.pm line 251 GUS::Common::Plugin::GBParser::processEntry('GUS::Common::Plugin::GBParser=HASH(0x856fbac)','CBIL::Bio::GenBank::ArrayStream=HASH(0x8ec7088)') called at /home/oracle/gus_home/lib/perl/GUS/Common/Plugin/GBParser.pm line 185 eval {...} called at /home/oracle/gus_home/lib/perl/GUS/Common/Plugin/GBParser.pm line 184 GUS::Common::Plugin::GBParser::run('GUS::Common::Plugin::GBParser=HASH(0x856fbac)','HASH(0x8e53714)') called at /home/oracle/gus_home/lib/perl/GUS/PluginMgr/GusApplication.pm line 430 eval {...} called at /home/oracle/gus_home/lib/perl/GUS/PluginMgr/GusApplication.pm line 427 GUS::PluginMgr::GusApplication::doMajorMode_Run('GUS::PluginMgr::GusApplication=HASH(0x804d00c)','GUS::Common::Plugin::GBParser') called at /home/oracle/gus_home/lib/perl/GUS/PluginMgr/GusApplication.pm line 283 GUS::PluginMgr::GusApplication::doMajorMode('GUS::PluginMgr::GusApplication=HASH(0x804d00c)','GUS::Common::Plugin::GBParser') called at /home/oracle/gus_home/lib/perl/GUS/PluginMgr/GusApplication.pm line 192 GUS::PluginMgr::GusApplication::parseAndRun('GUS::PluginMgr::GusApplication=HASH(0x804d00c)','ARRAY(0x80606b0)') called at /home/oracle/gus_home/bin/ga line 11 |
From: Steve F. <sfi...@pc...> - 2004-03-05 17:42:27
|
ok, thanks fidel. we'll fold these changes in. steve Fidel Salas wrote: >To get GBParser to fill-in the topology attribute, I had to make >manual changes to two files (see below). Creation of Perl objects >automatically created setTopology and getTopology methods in >GUS::Model::DoTS::NAEntry_Row (after creating initial DB instance with >modified schema). > >Fidel > > >Here are the diffs: >CBIL::Bio::GenBank::Locus >*** /tmp/Locus.pm Thu Mar 4 15:03:49 2004 >--- /tmp/Locus.pm-original Thu Mar 4 15:03:49 2004 >*************** >*** 9,15 **** > sub setType { $_[0]->{TYP} = $_[1]; $_[0] } > sub setDivision { $_[0]->{DIV} = $_[1]; $_[0] } > sub setDate { $_[0]->{DAT} = $_[1]; $_[0] } >- sub setTopology { $_[0]->{TOP} = $_[1]; $_[0] } > > sub getId { $_[0]->{ID} } > sub getLength { $_[0]->{LEN} } >--- 9,14 ---- >*************** >*** 16,22 **** > sub getType { $_[0]->{TYP} } > sub getDivision { $_[0]->{DIV} } > sub getDate { $_[0]->{DAT} } >- sub getTopology { $_[0]->{TOP} } > > # ........................................ > >--- 15,20 ---- >*************** >*** 27,35 **** > my $line = $IOS->getLine(); > > my @A = split /\s+/, $line; >! my ( $LOCUS, $id, $length, $bp, $type, $topology, $div, $date ); > if (@A > 7) { >! ( $LOCUS, $id, $length, $bp, $type, $topology, $div, $date ) = @A; > } elsif (@A == 7) { > ( $LOCUS, $id, $length, $bp, $type, $div, $date ) = @A; > } else { >--- 25,33 ---- > my $line = $IOS->getLine(); > > my @A = split /\s+/, $line; >! my ( $LOCUS, $id, $length, $bp, $type, $circular, $div, $date ); > if (@A > 7) { >! ( $LOCUS, $id, $length, $bp, $type, $circular, $div, $date ) = @A; > } elsif (@A == 7) { > ( $LOCUS, $id, $length, $bp, $type, $div, $date ) = @A; > } else { >*************** >*** 43,49 **** > $M->setType( $type ); > $M->setDivision( $div ); > $M->setDate( $date ); >- $M->setTopology( $topology ); > > $M; > } >--- 41,46 ---- > > >GUS::Common::Plugin::GBParser >*** /tmp/GBParser.pm Thu Mar 4 15:15:26 2004 >--- /tmp/GBParser.pm~ Thu Mar 4 15:15:26 2004 >*************** >*** 348,354 **** > my %h = ('source_id' => $e->{ACCESSION}->[0]->getAccession(), > 'division' => $e->{LOCUS}->[0]->getDivision(), > 'version' => $e->{VERSION}->[0]->getSeqVersion(), >- 'topology' => $e->{LOCUS}->[0]->getTopology(), > ) ; > my $date = &formatDate($e->{LOCUS}->[0]->getDate()); > if ($chkdif) { >--- 345,350 ---- > > > >------------------------------------------------------- >This SF.Net email is sponsored by: IBM Linux Tutorials >Free Linux tutorial presented by Daniel Robbins, President and CEO of >GenToo technologies. Learn everything from fundamentals to system >administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click >_______________________________________________ >Gusdev-gusdev mailing list >Gus...@li... >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > |
From: Thomas O. <ot...@fi...> - 2004-03-05 12:32:47
|
Hi, I read that that the wdk will be replaced by another module (JSP based?). How far is this effort, because we are thinking to use the wdk frontend - but if the new one will come out soon. Thanks, Thomas |
From: Fidel S. <fi...@vb...> - 2004-03-04 20:29:36
|
To get GBParser to fill-in the topology attribute, I had to make manual changes to two files (see below). Creation of Perl objects automatically created setTopology and getTopology methods in GUS::Model::DoTS::NAEntry_Row (after creating initial DB instance with modified schema). Fidel Here are the diffs: CBIL::Bio::GenBank::Locus *** /tmp/Locus.pm Thu Mar 4 15:03:49 2004 --- /tmp/Locus.pm-original Thu Mar 4 15:03:49 2004 *************** *** 9,15 **** sub setType { $_[0]->{TYP} = $_[1]; $_[0] } sub setDivision { $_[0]->{DIV} = $_[1]; $_[0] } sub setDate { $_[0]->{DAT} = $_[1]; $_[0] } - sub setTopology { $_[0]->{TOP} = $_[1]; $_[0] } sub getId { $_[0]->{ID} } sub getLength { $_[0]->{LEN} } --- 9,14 ---- *************** *** 16,22 **** sub getType { $_[0]->{TYP} } sub getDivision { $_[0]->{DIV} } sub getDate { $_[0]->{DAT} } - sub getTopology { $_[0]->{TOP} } # ........................................ --- 15,20 ---- *************** *** 27,35 **** my $line = $IOS->getLine(); my @A = split /\s+/, $line; ! my ( $LOCUS, $id, $length, $bp, $type, $topology, $div, $date ); if (@A > 7) { ! ( $LOCUS, $id, $length, $bp, $type, $topology, $div, $date ) = @A; } elsif (@A == 7) { ( $LOCUS, $id, $length, $bp, $type, $div, $date ) = @A; } else { --- 25,33 ---- my $line = $IOS->getLine(); my @A = split /\s+/, $line; ! my ( $LOCUS, $id, $length, $bp, $type, $circular, $div, $date ); if (@A > 7) { ! ( $LOCUS, $id, $length, $bp, $type, $circular, $div, $date ) = @A; } elsif (@A == 7) { ( $LOCUS, $id, $length, $bp, $type, $div, $date ) = @A; } else { *************** *** 43,49 **** $M->setType( $type ); $M->setDivision( $div ); $M->setDate( $date ); - $M->setTopology( $topology ); $M; } --- 41,46 ---- GUS::Common::Plugin::GBParser *** /tmp/GBParser.pm Thu Mar 4 15:15:26 2004 --- /tmp/GBParser.pm~ Thu Mar 4 15:15:26 2004 *************** *** 348,354 **** my %h = ('source_id' => $e->{ACCESSION}->[0]->getAccession(), 'division' => $e->{LOCUS}->[0]->getDivision(), 'version' => $e->{VERSION}->[0]->getSeqVersion(), - 'topology' => $e->{LOCUS}->[0]->getTopology(), ) ; my $date = &formatDate($e->{LOCUS}->[0]->getDate()); if ($chkdif) { --- 345,350 ---- |
From: Laurie K. <lk...@mo...> - 2004-02-21 18:29:00
|
Angel Pizarro wrote: > We use NUMBER mainly for integers, so one of the int types would do. > What is the > precision of these ints? Are these signed ints? -99 > int2 > +99 Yes. -32768 >= int2 >= +32767 (int2 == smallint) -2147483648 >= int4 >= +2147483647 (int4 == integer) -9223372036854775808 >= int8 >= 9223372036854775807 (int8 == bigint) Neither int2 nor int8 values are recommended for use in indexed fields. My vote is to use the "integer" keyword for most attributes, reserving "smallint" for those with just a few values, unless they are indexed. Other opinions? > BTW thanks very much for the converted SQL. > You're welcome. I learned a lot. Laurie |
From: Steve F. <st...@pc...> - 2004-02-20 22:55:06
|
i don't have time right now to digest this, but... hey, wow, this is great. steve Laurie Kramer wrote: > Steve wrote on Feb 13: > >> ok, to follow on this with a new subject heading... >> >> For those groups that are gearing up to port GUS to PostgreSQL, here >> are some quick thoughts on getting started. >> >> The two main tasks, to start with, I think, are: >> - porting the schema creation scripts to postgres >> - remove the oracle dependencies from the perl object layer >> >> Porting the Schema >> As mentioned below, one way to go here is using a system-neutral >> syntax (xml) to create the schemas. I think this should be the long >> term goal. But, for a quick solution, there must be some way for us >> to manually transform the existing oracle-specific syntax to >> postgres. I envision some kind of ad hoc scripts to do the >> transform. This shouldn't be too big a deal. >> >> I would say the first step is to identify what the transforms will be. >> >> >> Object Layer >> I just did a quick look in the object layer code (Perl). (we can >> defer for now on the java object layer since its not in wide use). >> Only two files seem to use oracle system tables, both in >> $PROJECT_HOME/GUS/ObjRelP/lib/perl: DbiTable.pm and >> DbiDatabase.pm. There are about 10 separate sql queries that use >> the oracle system tables (listed below). A quick fix would be to >> supply an Oracle.pm and a PostgreSQL.pm which have methods that >> provide the correct sql for those queries. IF postgres has parallel >> tables, then this should be trivial. if not...? here are the >> tables used: >> >> all_sequences >> all_cons_columns >> all_constraints >> all_tab_columns >> all_views >> >> > > I am joining this discussion late, but would like to get involved as > soon as possible in order to get GUS up and running here at Princeton. > on PostgreSQL 7.3 (is that what others are using?) Steve and Angel, > have either of you looked into the ora2pg perl module? It is at > http://www.samse.fr/GPL/ora2pg/ and requires an Oracle connection > in order to run. > > In response to Steve's identification of the Oracle metadata queries > which need to be converted, I have completed and tested all of them > and only have trouble with this one from DbiTable.pm: > > select column_name, data_type, nullable, column_id, > data_precision, data_length, data_scale > from all_tab_columns > where table_name = '$table_name' and owner = '$owner' > order by column_id > > Here is my best attempt at a conversion: > > select a.attname, t.typname, > case when a.attnotnull then 'N' else 'Y' end as nullable, > a.attnum, > case when t.typlen < 1 then null else t.typlen end as > data_precision, > case when a.atttypmod < 0 then null else a.atttypmod-4 > end as data_length, > null as data_scale > from pg_attribute a, pg_class c, pg_type t > where a.attrelid = c.oid and c.relname = 'assay' and > a.atttypid = t.oid and a.attnum > 0 > order by a.attnum; > > Using RAD3.assay, the Oracle results yield the following: > > > COLUMN_NAME DATA_TYPE NULLABLE col_id precision > length scale > ---------------------------- --------- -------- ------ --------- > ------ ---------- > ASSAY_ID NUMBER N 1 8 > 22 0 > ARRAY_ID NUMBER N 2 4 > 22 0 > PROTOCOL_ID NUMBER Y 3 10 > 22 0 > ASSAY_DATE DATE Y 4 null > 7 null > ARRAY_IDENTIFIER VARCHAR2 Y 5 null > 100 null > ARRAY_BATCH_IDENTIFIER VARCHAR2 Y 6 null > 100 null > OPERATOR_ID NUMBER N 7 10 > 22 0 > EXTERNAL_DATABASE_RELEASE_ID NUMBER Y 8 5 > 22 0 > SOURCE_ID VARCHAR2 Y 9 null > 50 null > NAME VARCHAR2 Y 10 null > 100 null > DESCRIPTION VARCHAR2 Y 11 null > 500 null > MODIFICATION_DATE DATE N 12 null > 7 null > USER_READ NUMBER N 13 1 > 22 0 > USER_WRITE NUMBER N 14 1 > 22 0 > GROUP_READ NUMBER N 15 1 > 22 0 > GROUP_WRITE NUMBER N 16 1 > 22 0 > OTHER_READ NUMBER N 17 1 > 22 0 > OTHER_WRITE NUMBER N 18 1 > 22 0 > ROW_USER_ID NUMBER N 19 12 > 22 0 > ROW_GROUP_ID NUMBER N 20 3 > 22 0 > ROW_PROJECT_ID NUMBER N 21 4 > 22 0 > ROW_ALG_INVOCATION_ID NUMBER N 22 12 > 22 0 > > while the PostgreSQL results yield: > > attname | typname | nullable | attnum | > data_precision | data_length | data_scale > ------------------------------+---------+----------+--------+----------------+-------------+------------ > > assay_id | int8 | N | 1 > | 8 | | > array_id | int4 | N | 2 > | 4 | | > protocol_id | int8 | Y | 3 > | 8 | | > assay_date | date | Y | 4 > | 4 | | > array_identifier | varchar | Y | 5 > | | 100 | > array_batch_identifier | varchar | Y | 6 > | | 100 | > operator_id | int8 | N | 7 > | 8 | | > external_database_release_id | int4 | Y | 8 > | 4 | | > source_id | varchar | Y | 9 > | | 50 | > name | varchar | Y | 10 > | | 100 | > description | varchar | Y | 11 > | | 500 | > modification_date | date | N | 12 > | 4 | | > user_read | int2 | N | 13 > | 2 | | > user_write | int2 | N | 14 > | 2 | | > group_read | int2 | N | 15 > | 2 | | > group_write | int2 | N | 16 > | 2 | | > other_read | int2 | N | 17 > | 2 | | > other_write | int2 | N | 18 > | 2 | | > row_user_id | int8 | N | 19 > | 8 | | > row_group_id | int4 | N | 20 > | 4 | | > row_project_id | int4 | N | 21 > | 4 | | > row_alg_invocation_id | int8 | N | 22 > | 8 | | > > The PostgreSQL numeric data types are different from those in Oracle > and this > raises the issue of how to convert them. There is no equivalent of > the NUMBER(10) > or NUMBER(12) in the assay table above, for example, in PostgreSQL. > The common > integer types are int2, int4 and int8. There is a numeric type which > supports > precision and scale but it is much slower than the integer types. > Hence, we > *must* come to agreement on this conversion issue. Do I hear any > volunteers? > > Here are the other queries, successfully converted. > ============ > DbiTable.pm > ============ > Oracle: > > select text > from all_views > where owner = '$owner' and > view_name = '$table' > > > PostgreSQL: > > select definition > from pg_views > where schemaname = '$owner' and > viewname = '$table' > > ------------------------------------------- > > Oracle: > > select ac.owner, accs.table_name, > accs.column_name, > accr.owner, > accr.table_name, > accr.column_name > from all_cons_columns accr, > all_cons_columns accs, > all_constraints ac > where accs.owner = '$owner' and > ac.table_name = '$table' and > ac.owner = '$owner' and > ac.constraint_type = 'R' and > accr.constraint_name = ac.r_constraint_name and > ac.r_owner = accr.owner and > accs.constraint_name = ac.constraint_name > PostgreSQL: > > select n1.nspname, > r1.relname, > a1.attname, > n2.nspname, > r2.relname, > a2.attname > from pg_namespace n1, > pg_namespace n2, > pg_class r1, > pg_class r2, > pg_attribute a1, > pg_attribute a2, > pg_constraint c > where r1.relname = '$table' and > n1.nspname = '$owner' and > r1.relnamespace = n1.oid and > r1.oid = c.conrelid and > r1.oid = a1.attrelid and > c.contype = 'f' and > c.confrelid = r2.oid and > r2.relnamespace = n2.oid and > c.conkey[1] = a1.attnum and > c.confkey[1] = a2.attnum and > a2.attrelid = r2.oid > > ------------------------------------------- > > Oracle: > > select distinct acc.column_name > from all_cons_columns acc, all_constraints ac > where acc.owner = '$owner' and > ac.table_name = '$queryTable' and > ac.constraint_type = 'P' and > acc.constraint_name = ac.constraint_name > > PostgreSQL: > > select distinct a.attname from pg_namespace n, > pg_class r, > pg_attribute a, > pg_constraint c > where n.nspname = '$owner' and > r.relname = '$table' and > n.oid = r.relnamespace and > r.oid = a.attrelid and > r.oid = c.conrelid and > c.contype = 'p' and > c.conkey[1] = a.attnum; > > ============ > DbiDatabase.pm > ============ > > Oracle: > > select sequence_owner,sequence_name > from all_sequences > > PostgreSQL: > > select schemaname, relname > from pg_statio_user_sequences; > > > ------------------------------------------- > > Oracle: > > select > acon.owner,acc1.owner,acc1.table_name,acc1.column_name, > acon.table_name ,acc2.column_name > from all_cons_columns acc1, all_constraints > acon,all_cons_columns acc2 > where acon.r_constraint_name = acc1.constraint_name and > acc1.owner = '$owner' and > acon.r_owner = acc1.owner and > acc2.constraint_name = acon.constraint_name and > acc2.owner = acon.owner > PostgreSQL: > > select n1.nspname, > n2.nspname, > r1.relname, > a1.attname, > r2.relname, > a2.attname > from pg_namespace n1, > pg_namespace n2, > pg_class r1, > pg_class r2, > pg_attribute a1, > pg_attribute a2, > pg_constraint c > where r1.nspname = '$owner' and > r1.relnamespace = n1.oid and > r1.oid = c.conrelid and > r1.oid = a1.attrelid and > c.contype = 'f' and > c.confrelid = r2.oid and > r2.relnamespace = n2.oid and > c.conkey[1] = a1.attnum and > c.confkey[1] = a2.attnum and > a2.attrelid = r2.oid > > The next topic to tackle is CLOBs. > > > Laurie > > ------------------------------- > Laurie Kramer > Department of Molecular Biology > Princeton University > lk...@mo... > 609.258.5657 > > > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev |
From: Angel P. <an...@pc...> - 2004-02-20 21:16:08
|
On Feb 20, 2004, at 3:46 PM, Laurie Kramer wrote: > > I am joining this discussion late, but would like to get involved as > soon as possible in order to get GUS up and running here at Princeton. > on PostgreSQL 7.3 (is that what others are using?) Steve and Angel, > have either of you looked into the ora2pg perl module? It is at > http://www.samse.fr/GPL/ora2pg/ and requires an Oracle connection > in order to run. > No I have not. When I get some time next week, I'll look into it. > > The PostgreSQL numeric data types are different from those in Oracle > and this > raises the issue of how to convert them. There is no equivalent of > the NUMBER(10) > or NUMBER(12) in the assay table above, for example, in PostgreSQL. > The common > integer types are int2, int4 and int8. There is a numeric type which > supports > precision and scale but it is much slower than the integer types. > Hence, we > *must* come to agreement on this conversion issue. Do I hear any > volunteers? > We use NUMBER mainly for integers, so one of the int types would do. What is the precision of these ints? Are these signed ints? -99 > int2 > +99 BTW thanks very much for the converted SQL. Angel |
From: Laurie K. <lk...@mo...> - 2004-02-20 20:52:51
|
Steve wrote on Feb 13: >ok, to follow on this with a new subject heading... > >For those groups that are gearing up to port GUS to PostgreSQL, here are >some quick thoughts on getting started. > >The two main tasks, to start with, I think, are: > - porting the schema creation scripts to postgres > - remove the oracle dependencies from the perl object layer > >Porting the Schema >As mentioned below, one way to go here is using a system-neutral syntax >(xml) to create the schemas. I think this should be the long term >goal. But, for a quick solution, there must be some way for us to >manually transform the existing oracle-specific syntax to postgres. I >envision some kind of ad hoc scripts to do the transform. This >shouldn't be too big a deal. > >I would say the first step is to identify what the transforms will be. > > >Object Layer >I just did a quick look in the object layer code (Perl). (we can defer >for now on the java object layer since its not in wide use). Only two >files seem to use oracle system tables, both in > $PROJECT_HOME/GUS/ObjRelP/lib/perl: DbiTable.pm and DbiDatabase.pm. > There are about 10 separate sql queries that use the oracle system >tables (listed below). A quick fix would be to supply an Oracle.pm and >a PostgreSQL.pm which have methods that provide the correct sql for >those queries. IF postgres has parallel tables, then this should be >trivial. if not...? here are the tables used: > >all_sequences >all_cons_columns >all_constraints >all_tab_columns >all_views > > I am joining this discussion late, but would like to get involved as soon as possible in order to get GUS up and running here at Princeton. on PostgreSQL 7.3 (is that what others are using?) Steve and Angel, have either of you looked into the ora2pg perl module? It is at http://www.samse.fr/GPL/ora2pg/ and requires an Oracle connection in order to run. In response to Steve's identification of the Oracle metadata queries which need to be converted, I have completed and tested all of them and only have trouble with this one from DbiTable.pm: select column_name, data_type, nullable, column_id, data_precision, data_length, data_scale from all_tab_columns where table_name = '$table_name' and owner = '$owner' order by column_id Here is my best attempt at a conversion: select a.attname, t.typname, case when a.attnotnull then 'N' else 'Y' end as nullable, a.attnum, case when t.typlen < 1 then null else t.typlen end as data_precision, case when a.atttypmod < 0 then null else a.atttypmod-4 end as data_length, null as data_scale from pg_attribute a, pg_class c, pg_type t where a.attrelid = c.oid and c.relname = 'assay' and a.atttypid = t.oid and a.attnum > 0 order by a.attnum; Using RAD3.assay, the Oracle results yield the following: COLUMN_NAME DATA_TYPE NULLABLE col_id precision length scale ---------------------------- --------- -------- ------ --------- ------ ---------- ASSAY_ID NUMBER N 1 8 22 0 ARRAY_ID NUMBER N 2 4 22 0 PROTOCOL_ID NUMBER Y 3 10 22 0 ASSAY_DATE DATE Y 4 null 7 null ARRAY_IDENTIFIER VARCHAR2 Y 5 null 100 null ARRAY_BATCH_IDENTIFIER VARCHAR2 Y 6 null 100 null OPERATOR_ID NUMBER N 7 10 22 0 EXTERNAL_DATABASE_RELEASE_ID NUMBER Y 8 5 22 0 SOURCE_ID VARCHAR2 Y 9 null 50 null NAME VARCHAR2 Y 10 null 100 null DESCRIPTION VARCHAR2 Y 11 null 500 null MODIFICATION_DATE DATE N 12 null 7 null USER_READ NUMBER N 13 1 22 0 USER_WRITE NUMBER N 14 1 22 0 GROUP_READ NUMBER N 15 1 22 0 GROUP_WRITE NUMBER N 16 1 22 0 OTHER_READ NUMBER N 17 1 22 0 OTHER_WRITE NUMBER N 18 1 22 0 ROW_USER_ID NUMBER N 19 12 22 0 ROW_GROUP_ID NUMBER N 20 3 22 0 ROW_PROJECT_ID NUMBER N 21 4 22 0 ROW_ALG_INVOCATION_ID NUMBER N 22 12 22 0 while the PostgreSQL results yield: attname | typname | nullable | attnum | data_precision | data_length | data_scale ------------------------------+---------+----------+--------+----------------+-------------+------------ assay_id | int8 | N | 1 | 8 | | array_id | int4 | N | 2 | 4 | | protocol_id | int8 | Y | 3 | 8 | | assay_date | date | Y | 4 | 4 | | array_identifier | varchar | Y | 5 | | 100 | array_batch_identifier | varchar | Y | 6 | | 100 | operator_id | int8 | N | 7 | 8 | | external_database_release_id | int4 | Y | 8 | 4 | | source_id | varchar | Y | 9 | | 50 | name | varchar | Y | 10 | | 100 | description | varchar | Y | 11 | | 500 | modification_date | date | N | 12 | 4 | | user_read | int2 | N | 13 | 2 | | user_write | int2 | N | 14 | 2 | | group_read | int2 | N | 15 | 2 | | group_write | int2 | N | 16 | 2 | | other_read | int2 | N | 17 | 2 | | other_write | int2 | N | 18 | 2 | | row_user_id | int8 | N | 19 | 8 | | row_group_id | int4 | N | 20 | 4 | | row_project_id | int4 | N | 21 | 4 | | row_alg_invocation_id | int8 | N | 22 | 8 | | The PostgreSQL numeric data types are different from those in Oracle and this raises the issue of how to convert them. There is no equivalent of the NUMBER(10) or NUMBER(12) in the assay table above, for example, in PostgreSQL. The common integer types are int2, int4 and int8. There is a numeric type which supports precision and scale but it is much slower than the integer types. Hence, we *must* come to agreement on this conversion issue. Do I hear any volunteers? Here are the other queries, successfully converted. ============ DbiTable.pm ============ Oracle: select text from all_views where owner = '$owner' and view_name = '$table' PostgreSQL: select definition from pg_views where schemaname = '$owner' and viewname = '$table' ------------------------------------------- Oracle: select ac.owner, accs.table_name, accs.column_name, accr.owner, accr.table_name, accr.column_name from all_cons_columns accr, all_cons_columns accs, all_constraints ac where accs.owner = '$owner' and ac.table_name = '$table' and ac.owner = '$owner' and ac.constraint_type = 'R' and accr.constraint_name = ac.r_constraint_name and ac.r_owner = accr.owner and accs.constraint_name = ac.constraint_name PostgreSQL: select n1.nspname, r1.relname, a1.attname, n2.nspname, r2.relname, a2.attname from pg_namespace n1, pg_namespace n2, pg_class r1, pg_class r2, pg_attribute a1, pg_attribute a2, pg_constraint c where r1.relname = '$table' and n1.nspname = '$owner' and r1.relnamespace = n1.oid and r1.oid = c.conrelid and r1.oid = a1.attrelid and c.contype = 'f' and c.confrelid = r2.oid and r2.relnamespace = n2.oid and c.conkey[1] = a1.attnum and c.confkey[1] = a2.attnum and a2.attrelid = r2.oid ------------------------------------------- Oracle: select distinct acc.column_name from all_cons_columns acc, all_constraints ac where acc.owner = '$owner' and ac.table_name = '$queryTable' and ac.constraint_type = 'P' and acc.constraint_name = ac.constraint_name PostgreSQL: select distinct a.attname from pg_namespace n, pg_class r, pg_attribute a, pg_constraint c where n.nspname = '$owner' and r.relname = '$table' and n.oid = r.relnamespace and r.oid = a.attrelid and r.oid = c.conrelid and c.contype = 'p' and c.conkey[1] = a.attnum; ============ DbiDatabase.pm ============ Oracle: select sequence_owner,sequence_name from all_sequences PostgreSQL: select schemaname, relname from pg_statio_user_sequences; ------------------------------------------- Oracle: select acon.owner,acc1.owner,acc1.table_name,acc1.column_name, acon.table_name ,acc2.column_name from all_cons_columns acc1, all_constraints acon,all_cons_columns acc2 where acon.r_constraint_name = acc1.constraint_name and acc1.owner = '$owner' and acon.r_owner = acc1.owner and acc2.constraint_name = acon.constraint_name and acc2.owner = acon.owner PostgreSQL: select n1.nspname, n2.nspname, r1.relname, a1.attname, r2.relname, a2.attname from pg_namespace n1, pg_namespace n2, pg_class r1, pg_class r2, pg_attribute a1, pg_attribute a2, pg_constraint c where r1.nspname = '$owner' and r1.relnamespace = n1.oid and r1.oid = c.conrelid and r1.oid = a1.attrelid and c.contype = 'f' and c.confrelid = r2.oid and r2.relnamespace = n2.oid and c.conkey[1] = a1.attnum and c.confkey[1] = a2.attnum and a2.attrelid = r2.oid The next topic to tackle is CLOBs. Laurie ------------------------------- Laurie Kramer Department of Molecular Biology Princeton University lk...@mo... 609.258.5657 |
From: MICHAEL L. <lu...@cs...> - 2004-02-20 20:25:35
|
Hello- The WDK-classic provides to the user the htdocs/cgi-bins/etc for the allgenes.org website, and the java file AllgenesPageFormatter for jsp results. We will need to have a CTEGDPageFormatter here at CTEGD, and would like it to more closely resemble PlasmoDB than allgenes. I realize that the PlasmoDBPageFormatter is provided with the WDK-classic, but the htdocs/etc needed for it are not. Is there any way to get ahold of those? Thanks, Michael Luchtan |
From: Angel P. <an...@pc...> - 2004-02-19 13:58:31
|
Here is my opinion: The instance where a table will have a FK to two tables with the same name but different schemas is going to be rare. I think analogous to the views having two foreign keys to different subclass views of the same table. Probably even rarer. Make the common case fast and easy. Keep the "getGene()" syntax. When there is such a clash, then use the schema name "getDotsGene()" & "getFooGene()" The ability to have a modular schema is more important in my opinion. cheers, Angel On Feb 17, 2004, at 6:58 PM, Steve Fischer wrote: > folks- > > i think that we should consider a rule about GUS table names: > > "table names are unique across schema spaces" > > there are pros and cons here. > > pros: > - this way, in our object layer, we can have simpler accessor names, > such as getGene(). Otherwise, we need to have getDoTSGene() (yuck) > - this may help us port, if we need to, to systems which don't > support schema spaces > > cons: > - the obvious one: schema spaces are no longer truly modular. the > must be aware of other schema spaces that are or *might be* used in > the same system. > > Comments??? > > Which do people see as the lesser of the two evils? > > steve > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev |
From: Steve F. <sfi...@pc...> - 2004-02-18 00:03:08
|
folks- i think that we should consider a rule about GUS table names: "table names are unique across schema spaces" there are pros and cons here. pros: - this way, in our object layer, we can have simpler accessor names, such as getGene(). Otherwise, we need to have getDoTSGene() (yuck) - this may help us port, if we need to, to systems which don't support schema spaces cons: - the obvious one: schema spaces are no longer truly modular. the must be aware of other schema spaces that are or *might be* used in the same system. Comments??? Which do people see as the lesser of the two evils? steve |
From: Angel P. <an...@pc...> - 2004-02-17 20:56:12
|
Hey folks, I just dumped the GUS schema again, and went through all of the files to fix errors here and there. I tagged GUS/Model with "GUS_3_2" so you can check out the changes, surmised below: GUS/DBAdmin/bin/dumpSchema.pl Changed a typo that caused the --target-index-tablespace-list option to use values from --target-tablespace-list. Not really a part of the release, but if you use this, please update. GUS/Model/schema/oracle: Core: Added a few entries into TableInfo Added WorkFlowNode superclass view Sres: No schema changes. Just date update on the dump files DoTS: Added some tables for RejectedMotif that the annotators use to say that particular motif similarities are of no predictive value and they should be ignored. RAD: Added some new ElementResult views. Removed the constraints on the superclass views. Fix the remaining references to the string 'RAD3' in all files TESS: No schema changes App: No schema changes GUS/Model/schema/VERSION : Updated version to "3.2" Note, I call this a tentative release b/c the GUS/RAD component has not yet been updated to use a substitution string for the "RAD" schema space. Also you will note that the files are still prefixed with 'rad3' . Hence for the GUS/Model/config/schema.prop.sample file the default substitution name is still "RAD3". Hopefully one day this will all be an issue of the past. Also, there may or may not be some funny business here and there, although I tested out a build of GUS (no schema install) and everything seems A-OK. Email any errors to the list. I'll keep testing as time allows. Thanks to Mathew for sending me the errors and Fidel for continually egging me on to commit the changes. Appreciate it. Angel |
From: Steve F. <sfi...@pc...> - 2004-02-17 19:56:31
|
Thomas- Yes, i think you are correct. thanks for clarifying. I will improve the error message. it should say: Error: You have provided primary key "sequence_type_id = 1" which does not exist. When inserting, do not provide a primary key (one will be generated automatically). When updating, provide an existing primary key. steve Thomas Otto wrote: > Hi, > > I had the same problem... the thing is, that the primary key will be > set automatically, so you cannot set it. If the primary key exists, a > update will be done. > So just write command without the primarykey (sequence_type_id). > > Cheers, > Thomas > > Fidel Salas wrote: > >> Steve, >> >> Revision 1.7, I believe, has a bug not found in revision 1.4. >> It is expressed when one tries to insert a row with an id that does >> not yet exist in the database. The bug is the updateRow method. See >> the following insert invocation: >> >> ga GUS::Common::Plugin::SubmitRow --tablename DoTS::SequenceType >> --attrlist >> sequence_type_id,nucleotide_type,sub_type,strand,hierarchy,parent_sequence_type_id,name,description >> --valuelist "1^^^DNA^^^null^^^null^^^1^^^1^^^DNA^^^unkown >> strandedness" --commit >> Reading properties from >> /home/fisal/GUS/dev/gushome/config/GUS-PluginMgr.prop >> Reading properties from /home/fisal/GUS/dev/.gus.properties >> Tue Feb 17 12:19:19 2004 ALGINVID 78 >> Tue Feb 17 12:19:19 2004 COMMIT commit on >> >> ERROR: Can't update. No row found with primary key sequence_type_id = 1 >> >> >> Anyway, I went back to using revision 1.4. >> >> Fidel >> >> >> >> ------------------------------------------------------- >> SF.Net is sponsored by: Speed Start Your Linux Apps Now. >> Build and deploy apps & Web services for Linux with >> a free DVD software kit from IBM. Click Now! >> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click >> _______________________________________________ >> Gusdev-gusdev mailing list >> Gus...@li... >> https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >> >> >> > > > > > ------------------------------------------------------- > SF.Net is sponsored by: Speed Start Your Linux Apps Now. > Build and deploy apps & Web services for Linux with > a free DVD software kit from IBM. Click Now! > http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev |
From: Thomas O. <ot...@fi...> - 2004-02-17 19:14:05
|
Hi, I had the same problem... the thing is, that the primary key will be set automatically, so you cannot set it. If the primary key exists, a update will be done. So just write command without the primarykey (sequence_type_id). Cheers, Thomas Fidel Salas wrote: >Steve, > >Revision 1.7, I believe, has a bug not found in revision 1.4. >It is expressed when one tries to insert a row with an id that does >not yet exist in the database. The bug is the updateRow method. See >the following insert invocation: > >ga GUS::Common::Plugin::SubmitRow --tablename DoTS::SequenceType --attrlist sequence_type_id,nucleotide_type,sub_type,strand,hierarchy,parent_sequence_type_id,name,description --valuelist "1^^^DNA^^^null^^^null^^^1^^^1^^^DNA^^^unkown strandedness" --commit >Reading properties from /home/fisal/GUS/dev/gushome/config/GUS-PluginMgr.prop >Reading properties from /home/fisal/GUS/dev/.gus.properties >Tue Feb 17 12:19:19 2004 ALGINVID 78 >Tue Feb 17 12:19:19 2004 COMMIT commit on > >ERROR: Can't update. No row found with primary key sequence_type_id = 1 > > >Anyway, I went back to using revision 1.4. > >Fidel > > > >------------------------------------------------------- >SF.Net is sponsored by: Speed Start Your Linux Apps Now. >Build and deploy apps & Web services for Linux with >a free DVD software kit from IBM. Click Now! >http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click >_______________________________________________ >Gusdev-gusdev mailing list >Gus...@li... >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > > |
From: Fidel S. <fi...@vb...> - 2004-02-17 18:26:49
|
Steve, Revision 1.7, I believe, has a bug not found in revision 1.4. It is expressed when one tries to insert a row with an id that does not yet exist in the database. The bug is the updateRow method. See the following insert invocation: ga GUS::Common::Plugin::SubmitRow --tablename DoTS::SequenceType --attrlist sequence_type_id,nucleotide_type,sub_type,strand,hierarchy,parent_sequence_type_id,name,description --valuelist "1^^^DNA^^^null^^^null^^^1^^^1^^^DNA^^^unkown strandedness" --commit Reading properties from /home/fisal/GUS/dev/gushome/config/GUS-PluginMgr.prop Reading properties from /home/fisal/GUS/dev/.gus.properties Tue Feb 17 12:19:19 2004 ALGINVID 78 Tue Feb 17 12:19:19 2004 COMMIT commit on ERROR: Can't update. No row found with primary key sequence_type_id = 1 Anyway, I went back to using revision 1.4. Fidel |
From: Adrian R. T. <ar...@sa...> - 2004-02-17 14:17:53
|
As probably the third largest sponsor of Java, I guess Oracle are allowed to break the rules sometimes! The only place it really makes a difference is in imports, ie not very often. (When I come across packages that don't obey the JLS package naming rules it always rings a little alarm bell in the back of my head.) For the sake of 4 letters I'd keep the org. A related question - why org.gusdev rather than org.gusdb? > folks- > > i am gearing up to right my first WDK java code (xml parser using > digester). this is also my first java code for GUS. > > and so, i am confronted with the nasty package name question. > > officially, this is kind of what i think the package name should be, > but, its so darn long: > org.gusdev.gus.wdk.model.config.Parser; > > ie, organization_type.organization.project.component.subcomponent.package > > note that while we don't yet, we do expect to have other projects, such > as rad, be under the gusdev umbrella. But presumably the web interface will want to talk to rad etc. Will there be a org.gusdev.rad.wdk... etc or something else? Adrian > > i did a quick surf to see if others are having this problem. here is > the first package name i stumbled on: > > oracle.security.rdbms.server.AppCtx.AppCtxManager > > I suppose we could drop the leading org: > > gusdev.gus.wdk.model.config.Parser > > any ideas? > |
From: Adrian R. T. <ar...@sa...> - 2004-02-17 14:17:23
|
Just a quick test - sorry |
From: Dave B. <db...@pc...> - 2004-02-17 00:21:00
|
Folks-- I checked in a small change to the build system to better handle java compiling. After you do a cvs update on the ant build.xml files (after the appropriate changes have been made--see below), from now on, when you want to build a component that has to compile java code, simply add the '-compileJava' flag to the build command. Previously, when you wanted to build a component that had java code to compile, you had to go into the build.xml file and uncomment a line that, by default, turned off java compiling. I have updated the GUS/Model and GUS/ObjRelJ components so that they no longer have this behavior. There still may be components that compile java code that other people are working with that need updates, so whoever is in charge of build system administration for those components should make the appropriate changes (drop me a line if they're not obvious.) thanks, Dave |
From: Fidel S. <fi...@vb...> - 2004-02-13 20:46:18
|
Steve, The pm file is missing a closing parens on line 111. Fidel |
From: Steve F. <sfi...@pc...> - 2004-02-13 18:19:30
|
ok, to follow on this with a new subject heading... For those groups that are gearing up to port GUS to PostgreSQL, here are some quick thoughts on getting started. The two main tasks, to start with, I think, are: - porting the schema creation scripts to postgres - remove the oracle dependencies from the perl object layer Porting the Schema As mentioned below, one way to go here is using a system-neutral syntax (xml) to create the schemas. I think this should be the long term goal. But, for a quick solution, there must be some way for us to manually transform the existing oracle-specific syntax to postgres. I envision some kind of ad hoc scripts to do the transform. This shouldn't be too big a deal. I would say the first step is to identify what the transforms will be. Object Layer I just did a quick look in the object layer code (Perl). (we can defer for now on the java object layer since its not in wide use). Only two files seem to use oracle system tables, both in $PROJECT_HOME/GUS/ObjRelP/lib/perl: DbiTable.pm and DbiDatabase.pm. There are about 10 separate sql queries that use the oracle system tables (listed below). A quick fix would be to supply an Oracle.pm and a PostgreSQL.pm which have methods that provide the correct sql for those queries. IF postgres has parallel tables, then this should be trivial. if not...? here are the tables used: all_sequences all_cons_columns all_constraints all_tab_columns all_views steve : Angel Pizarro wrote: > Steve, > This is a very accurate and complete synopsis of the issues we have > discussed so far. Without actually starting the project, I don't > foresee us coming up with anything else. > > As for translation between DB platforms, there is a Sourceforge.net > project that Allen Day belongs to named SQLFairy. See more about it at > http://sqlfairy.sourceforge.net/ > > They claim to translate between Oracle and PostgreSQL, but this has > not worked in practice for me when I tried to translate the GUS schema > files to postgresql. Part of the problem is that we separate tables, > views and constraints into their own files in addition to separate > file groups for schemas. It also had trouble with multi-line comments. > > They have listed a platform independent XML syntax, but they as yet do > not have a formal DTD or XML schema (I asked already) . They said they > were willing to formalize on an XML schema if we provide it and is > close to what they have already. I don't see any reason to re-invent > the wheel here. > > Angel > > Steve Fischer wrote: > >> (Cesare and Giuseppe, are you on the gusdev mailing list? If not, >> you can subscribe at: >> http://lists.sourceforge.net/lists/listinfo/gusdev-gusdev) >> >> Folks- >> >> Here is a quick outline of what might need to be done to make GUS >> RDBMS independent. I discuss the two major subsystems of GUS: the >> schema and the application framework. >> >> Please bear in mind that i am not a DB expert. Comments and >> corrections encouraged. >> >> GUS Schema >> - schema definition. it appears that different RDBMSs have >> differences in their data types and in the way they create tables and >> specify constraints. it seems that this we need to define the >> schema in a system neutral syntax, say, xml, and then transform that >> into system-specific syntax. i wonder if there are third party >> tools to do this. >> >> - schema spaces. the definition of the schema currently assumes >> "schema name spaces." for example, we have RAD.Process. For >> systems that don't support this, we may need to define the schema as, >> say, RAD_Process. In other words, prepend the schema name to the >> table names. >> >> - schema installation. this will need to be system-specific, and >> will probably be generated by transforming a schema definition in a >> neutral syntax >> >> >> GUS Application Framework >> - the application framework currently uses DBI and JDBC. these >> are fine. >> >> - the object layer API (and all the code that uses it) assumes that >> there is a schema space. worse still, it hard codes the names as >> DoTS, RAD, Core, TESS and SRes. The changes I envision here are: >> - removing hard coded references to schema names, replacing >> them with logical names. >> - allow the API to *keep* the schema space assumption. >> however, inside the object layer, use a RDBMS-specific "driver" to >> handle them in a system specific way. for example, it would use '.' >> as the concatenation character for oracle and '_' for mySql. >> - the object layer's code generator (generates all the >> objects) has a system-specific module for discovering >> meta-information about the tables. this is segregated into system >> specific modules. for any new system, we would need to write new >> ones. note: any system that we support would need to offer this >> meta information somehow!!!! >> >> - sql code. there is plenty of direct SQL in our application >> code and in plugins. here are the problems: >> - Wherever this sql refers to table names, the sql would >> need to be modified to get the table names from an API which can >> provide them in correct syntax. - some of the code relies >> on system specific optimization directives. i don't know how we'll >> handle this. >> - are there any other sql incompatibilities? how about >> join and/or outer join syntax? >> >> Any other ideas? >> >> Steve >> >> >> >> Giuseppe Jurman wrote: >> >>>> Thanks Elisabetta, >>>> >>>> An important question would be also why PostgreSQL and not MySQL, the >>>> latter appears to be evolved well and have now a good support to >>>> transactions via InnoDB, etc. I am very inclined to use Gmod and chado >>>> por our project, but would like to have a final check on the potential >>>> of GUS before starting things. >>>> >>> >>> >>> ITC-irst has started a working group for a full open source version of >>> GUS, so to allow the substitution of the Oracle database management >>> system for data tables and relations within GUS with an open source >>> solution. In principle we are not oriented to the substitution >>> of Oracle with another specific DMBS. >>> >>> It might be worthwhile to consider the possibility to turn DB >>> independent the whole object-related part of GUS and then choosing the >>> suitable DB-dedicated driver depending on the user's system. The first >>> (heavy) step towards this option requires to check the existing code >>> looking for the Oracle-specific SQL, and then designing an ad-hoc >>> strategy to transform into either a DBI (better) or into a DBD (here >>> the choice of the DBMS becomes a constraint). >>> >>> An important issue, for us, is how to align the DBD portions of the >>> code along the next releases of GUS. In this view, we see the need of >>> a DBI-DBD separation really relevant. >>> >>> We would like to perform the Oracle-PostgreSQL conversion in the most >>> automated way possible. Before, the Oracle proprietary SQL code has to >>> be somehow moved to the upper Perl Object Layer level, or to a new >>> Perl Object Layer. >>> >>> Comments welcomed >>> >>> >>> Giuseppe Jurman >>> Cersare Furlanello >>> >>> >>> > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev |
From: Thomas O. <ot...@fi...> - 2004-02-12 15:08:28
|
Hello, I tried to read for this the forum - but there are some connect problems... I want to upload AA entries from Genbank. The GBParser seem only to upload NA. The ImportPlasmoDBAAFeatures.pm doesn't seem to import all the information. Who can help, or should I program a new module? Cheers, Thomas |
From: Alberto D. <da...@io...> - 2004-02-11 18:56:55
|
Hi Angel, We have plans to give a try to the translation between Oracle and PostgreSQL (or MySQL) using the SQLFairy, could you share some more details of your tentatives, please ? If you think there are not too many dependencies, then we would like to help. Please kindly keep Pablo (pab...@uf...) in the loop. Thanks and best regards, Alberto On Tue, 2004-02-10 at 14:54, Angel Pizarro wrote: > Steve, > This is a very accurate and complete synopsis of the issues we have > discussed so far. Without actually starting the project, I don't foresee > us coming up with anything else. > > As for translation between DB platforms, there is a Sourceforge.net > project that Allen Day belongs to named SQLFairy. See more about it at > http://sqlfairy.sourceforge.net/ > > They claim to translate between Oracle and PostgreSQL, but this has not > worked in practice for me when I tried to translate the GUS schema files > to postgresql. Part of the problem is that we separate tables, views and > constraints into their own files in addition to separate file groups for > schemas. It also had trouble with multi-line comments. > > They have listed a platform independent XML syntax, but they as yet do > not have a formal DTD or XML schema (I asked already) . They said they > were willing to formalize on an XML schema if we provide it and is close > to what they have already. I don't see any reason to re-invent the wheel > here. > > Angel > > Steve Fischer wrote: > > > (Cesare and Giuseppe, are you on the gusdev mailing list? If not, you > > can subscribe at: > > http://lists.sourceforge.net/lists/listinfo/gusdev-gusdev) > > > > Folks- > > > > Here is a quick outline of what might need to be done to make GUS > > RDBMS independent. I discuss the two major subsystems of GUS: the > > schema and the application framework. > > > > Please bear in mind that i am not a DB expert. Comments and > > corrections encouraged. > > > > GUS Schema > > - schema definition. it appears that different RDBMSs have > > differences in their data types and in the way they create tables and > > specify constraints. it seems that this we need to define the schema > > in a system neutral syntax, say, xml, and then transform that into > > system-specific syntax. i wonder if there are third party tools to > > do this. > > > > - schema spaces. the definition of the schema currently assumes > > "schema name spaces." for example, we have RAD.Process. For > > systems that don't support this, we may need to define the schema as, > > say, RAD_Process. In other words, prepend the schema name to the > > table names. > > > > - schema installation. this will need to be system-specific, and > > will probably be generated by transforming a schema definition in a > > neutral syntax > > > > > > GUS Application Framework > > - the application framework currently uses DBI and JDBC. these > > are fine. > > > > - the object layer API (and all the code that uses it) assumes that > > there is a schema space. worse still, it hard codes the names as > > DoTS, RAD, Core, TESS and SRes. The changes I envision here are: > > - removing hard coded references to schema names, replacing > > them with logical names. > > - allow the API to *keep* the schema space assumption. > > however, inside the object layer, use a RDBMS-specific "driver" to > > handle them in a system specific way. for example, it would use '.' > > as the concatenation character for oracle and '_' for mySql. > > - the object layer's code generator (generates all the > > objects) has a system-specific module for discovering meta-information > > about the tables. this is segregated into system specific modules. > > for any new system, we would need to write new ones. note: any > > system that we support would need to offer this meta information > > somehow!!!! > > > > - sql code. there is plenty of direct SQL in our application code > > and in plugins. here are the problems: > > - Wherever this sql refers to table names, the sql would > > need to be modified to get the table names from an API which can > > provide them in correct syntax. > > - some of the code relies on system specific optimization > > directives. i don't know how we'll handle this. > > - are there any other sql incompatibilities? how about > > join and/or outer join syntax? > > > > Any other ideas? > > > > Steve > > > > > > > > Giuseppe Jurman wrote: > > > >>>Thanks Elisabetta, > >>> > >>>An important question would be also why PostgreSQL and not MySQL, the > >>>latter appears to be evolved well and have now a good support to > >>>transactions via InnoDB, etc. I am very inclined to use Gmod and chado > >>>por our project, but would like to have a final check on the potential > >>>of GUS before starting things. > >>> > >>> > >> > >>ITC-irst has started a working group for a full open source version of > >>GUS, so to allow the substitution of the Oracle database management > >>system for data tables and relations within GUS with an open source > >>solution. In principle we are not oriented to the substitution > >>of Oracle with another specific DMBS. > >> > >>It might be worthwhile to consider the possibility to turn DB > >>independent the whole object-related part of GUS and then choosing the > >>suitable DB-dedicated driver depending on the user's system. The first > >>(heavy) step towards this option requires to check the existing code > >>looking for the Oracle-specific SQL, and then designing an ad-hoc > >>strategy to transform into either a DBI (better) or into a DBD (here > >>the choice of the DBMS becomes a constraint). > >> > >>An important issue, for us, is how to align the DBD portions of the > >>code along the next releases of GUS. In this view, we see the need of > >>a DBI-DBD separation really relevant. > >> > >>We would like to perform the Oracle-PostgreSQL conversion in the most > >>automated way possible. Before, the Oracle proprietary SQL code has to > >>be somehow moved to the upper Perl Object Layer level, or to a new > >>Perl Object Layer. > >> > >>Comments welcomed > >> > >> > >>Giuseppe Jurman > >>Cersare Furlanello > >> |
From: Steve F. <st...@pc...> - 2004-02-11 03:07:25
|
I think we need to find out ASAP whether postgres and/or mysql have system tables that offer the kind of info we need. steve Angel Pizarro wrote: > Steve, > This is a very accurate and complete synopsis of the issues we have > discussed so far. Without actually starting the project, I don't > foresee us coming up with anything else. > > As for translation between DB platforms, there is a Sourceforge.net > project that Allen Day belongs to named SQLFairy. See more about it at > http://sqlfairy.sourceforge.net/ > > They claim to translate between Oracle and PostgreSQL, but this has > not worked in practice for me when I tried to translate the GUS schema > files to postgresql. Part of the problem is that we separate tables, > views and constraints into their own files in addition to separate > file groups for schemas. It also had trouble with multi-line comments. > > They have listed a platform independent XML syntax, but they as yet do > not have a formal DTD or XML schema (I asked already) . They said they > were willing to formalize on an XML schema if we provide it and is > close to what they have already. I don't see any reason to re-invent > the wheel here. > > Angel > > Steve Fischer wrote: > >> (Cesare and Giuseppe, are you on the gusdev mailing list? If not, >> you can subscribe at: >> http://lists.sourceforge.net/lists/listinfo/gusdev-gusdev) >> >> Folks- >> >> Here is a quick outline of what might need to be done to make GUS >> RDBMS independent. I discuss the two major subsystems of GUS: the >> schema and the application framework. >> >> Please bear in mind that i am not a DB expert. Comments and >> corrections encouraged. >> >> GUS Schema >> - schema definition. it appears that different RDBMSs have >> differences in their data types and in the way they create tables and >> specify constraints. it seems that this we need to define the >> schema in a system neutral syntax, say, xml, and then transform that >> into system-specific syntax. i wonder if there are third party >> tools to do this. >> >> - schema spaces. the definition of the schema currently assumes >> "schema name spaces." for example, we have RAD.Process. For >> systems that don't support this, we may need to define the schema as, >> say, RAD_Process. In other words, prepend the schema name to the >> table names. >> >> - schema installation. this will need to be system-specific, and >> will probably be generated by transforming a schema definition in a >> neutral syntax >> >> >> GUS Application Framework >> - the application framework currently uses DBI and JDBC. these >> are fine. >> >> - the object layer API (and all the code that uses it) assumes that >> there is a schema space. worse still, it hard codes the names as >> DoTS, RAD, Core, TESS and SRes. The changes I envision here are: >> - removing hard coded references to schema names, replacing >> them with logical names. >> - allow the API to *keep* the schema space assumption. >> however, inside the object layer, use a RDBMS-specific "driver" to >> handle them in a system specific way. for example, it would use '.' >> as the concatenation character for oracle and '_' for mySql. >> - the object layer's code generator (generates all the >> objects) has a system-specific module for discovering >> meta-information about the tables. this is segregated into system >> specific modules. for any new system, we would need to write new >> ones. note: any system that we support would need to offer this >> meta information somehow!!!! >> >> - sql code. there is plenty of direct SQL in our application >> code and in plugins. here are the problems: >> - Wherever this sql refers to table names, the sql would >> need to be modified to get the table names from an API which can >> provide them in correct syntax. - some of the code relies >> on system specific optimization directives. i don't know how we'll >> handle this. >> - are there any other sql incompatibilities? how about >> join and/or outer join syntax? >> >> Any other ideas? >> >> Steve >> >> >> >> Giuseppe Jurman wrote: >> >>>> Thanks Elisabetta, >>>> >>>> An important question would be also why PostgreSQL and not MySQL, the >>>> latter appears to be evolved well and have now a good support to >>>> transactions via InnoDB, etc. I am very inclined to use Gmod and chado >>>> por our project, but would like to have a final check on the potential >>>> of GUS before starting things. >>>> >>> >>> >>> ITC-irst has started a working group for a full open source version of >>> GUS, so to allow the substitution of the Oracle database management >>> system for data tables and relations within GUS with an open source >>> solution. In principle we are not oriented to the substitution >>> of Oracle with another specific DMBS. >>> >>> It might be worthwhile to consider the possibility to turn DB >>> independent the whole object-related part of GUS and then choosing the >>> suitable DB-dedicated driver depending on the user's system. The first >>> (heavy) step towards this option requires to check the existing code >>> looking for the Oracle-specific SQL, and then designing an ad-hoc >>> strategy to transform into either a DBI (better) or into a DBD (here >>> the choice of the DBMS becomes a constraint). >>> >>> An important issue, for us, is how to align the DBD portions of the >>> code along the next releases of GUS. In this view, we see the need of >>> a DBI-DBD separation really relevant. >>> >>> We would like to perform the Oracle-PostgreSQL conversion in the most >>> automated way possible. Before, the Oracle proprietary SQL code has to >>> be somehow moved to the upper Perl Object Layer level, or to a new >>> Perl Object Layer. >>> >>> Comments welcomed >>> >>> >>> Giuseppe Jurman >>> Cersare Furlanello >>> >>> >>> > > > > ------------------------------------------------------- > The SF.Net email is sponsored by EclipseCon 2004 > Premiere Conference on Open Tools Development and Integration > See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > http://www.eclipsecon.org/osdn > _______________________________________________ > Gusdev-gusdev mailing list > Gus...@li... > https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev |
From: Angel P. <an...@pc...> - 2004-02-10 19:14:33
|
No problem. BTW, your SQL should enclose the string as in sjingle quotes and probably use the 'like' operator, instead of the "=" gseqDescrQ.SQL=select *\ from dots.ExternalNASequence\ where external_database_release_id = $$0$$ \ and source_id like '$$1$$' Angel MICHAEL LUCHTAN wrote: >Gracies- >That works, and saves a lot of hunting, I'm sure. > >Michael Luchtan >http://www.cs.uga.edu/~luchtan > > >On Tue, 10 Feb 2004, Angel Pizarro wrote: > > > >>query parameters (eg. "$$0$$", "$$1$$") get set by the "Params" >>attribute. In your case : >> >>gseqDescrQ.Params=intP >> >>where "intP" is defined later in the file as : >> >>intP.class=IntParam >>intP.Prompt=Integer >> >>You must define two parameters for "$$0$$" and $$1$$ in your query. >> >>gseqDescrQ.SQL=select *\ >> from dots.ExternalNASequence\ >> where external_database_release_id = $$0$$ \ >> and source_id = $$1$$ >> >>you can keep "intP" for $$0$$, since this is an integer, but source_id is a string, hence you must use a StringParam >> >>change "gseqDescrQ.Params=intP" to "gseqDescrQ.Params=intP,stringP" since "stringP" is already defined in this config file as: >> >>stringP.class=StringParam >>stringP.Prompt=Enter a string: >>stringP.Description=String >> >> >>Angel >> >> >>MICHAEL LUCHTAN wrote: >> >> >> >>>Just a quick question, in case anyone knows. Elsewise I'll still be >>>digging around: >>> >>>In the WDK-classic installation, you supply a configuration file which >>>specifies which pages you want to serve up, and certain paramaters, like >>>the sql statement that is used. I've changed some stuff for >>>GenomicSequencePage to make it more applicable to CTEGD web apps, and >>>altered following in the supplied config file: >>> >>>gseqDescrQ.SQL=select ena.source_id, ena.name, ena.description, ed.name >>>dbname, \ >>> tn.name, ena.length \ >>> from dots.ExternalNASequence ena, sres.TaxonName tn, >>>sres.ExternalDatabase ed, \ >>> sres.ExternalDatabaseRelease edr \ >>> where ena.na_sequence_id = $$0$$ \ >>> and ena.taxon_id = tn.taxon_id \ >>> and tn.name_class = 'scientific name' \ >>> and ena.external_database_release_id = edr.external_database_release_id \ >>> and edr.external_database_id = ed.external_database_id \ >>> and edr.external_database_release_id not in (@PRIVATE_SEQ_DB_IDS@) >>> >>>to: >>> >>>gseqDescrQ.SQL=select *\ >>> from dots.ExternalNASequence\ >>> where external_database_release_id = $$0$$ \ >>> and source_id = $$1$$ >>> >>>I know that this gets set, but for some reason the number of parameters >>>does not change. Is this hard coded somewhere? In my error >>>file(CATALINA.OUT) I get the following: >>> >>>Running query: >>>select * from dots.ExternalNASequence where external_database_release_id >>>= 35 and source_id = $$1$$ >>>java.sql.SQLException: ORA-00911: invalid character >>> >>>But I know that I am passing an array with two elements in it, and it is >>>obviously getting the first one. >>> >>> >>>If any knows why it won't insert the second parameter, please let me know. >>> >>> >>>Michael Luchtan >>>http://www.cs.uga.edu/~luchtan >>> >>> >>> >>> >>>------------------------------------------------------- >>>The SF.Net email is sponsored by EclipseCon 2004 >>>Premiere Conference on Open Tools Development and Integration >>>See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >>>http://www.eclipsecon.org/osdn >>>_______________________________________________ >>>Gusdev-gusdev mailing list >>>Gus...@li... >>>https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev >>> >>> >>> >>> >> >> |
From: MICHAEL L. <lu...@cs...> - 2004-02-10 18:52:45
|
Gracies- That works, and saves a lot of hunting, I'm sure. Michael Luchtan http://www.cs.uga.edu/~luchtan On Tue, 10 Feb 2004, Angel Pizarro wrote: > query parameters (eg. "$$0$$", "$$1$$") get set by the "Params" > attribute. In your case : > > gseqDescrQ.Params=intP > > where "intP" is defined later in the file as : > > intP.class=IntParam > intP.Prompt=Integer > > You must define two parameters for "$$0$$" and $$1$$ in your query. > > gseqDescrQ.SQL=select *\ > from dots.ExternalNASequence\ > where external_database_release_id = $$0$$ \ > and source_id = $$1$$ > > you can keep "intP" for $$0$$, since this is an integer, but source_id is a string, hence you must use a StringParam > > change "gseqDescrQ.Params=intP" to "gseqDescrQ.Params=intP,stringP" since "stringP" is already defined in this config file as: > > stringP.class=StringParam > stringP.Prompt=Enter a string: > stringP.Description=String > > > Angel > > > MICHAEL LUCHTAN wrote: > > >Just a quick question, in case anyone knows. Elsewise I'll still be > >digging around: > > > >In the WDK-classic installation, you supply a configuration file which > >specifies which pages you want to serve up, and certain paramaters, like > >the sql statement that is used. I've changed some stuff for > >GenomicSequencePage to make it more applicable to CTEGD web apps, and > >altered following in the supplied config file: > > > >gseqDescrQ.SQL=select ena.source_id, ena.name, ena.description, ed.name > >dbname, \ > > tn.name, ena.length \ > > from dots.ExternalNASequence ena, sres.TaxonName tn, > >sres.ExternalDatabase ed, \ > > sres.ExternalDatabaseRelease edr \ > > where ena.na_sequence_id = $$0$$ \ > > and ena.taxon_id = tn.taxon_id \ > > and tn.name_class = 'scientific name' \ > > and ena.external_database_release_id = edr.external_database_release_id \ > > and edr.external_database_id = ed.external_database_id \ > > and edr.external_database_release_id not in (@PRIVATE_SEQ_DB_IDS@) > > > >to: > > > >gseqDescrQ.SQL=select *\ > > from dots.ExternalNASequence\ > > where external_database_release_id = $$0$$ \ > > and source_id = $$1$$ > > > >I know that this gets set, but for some reason the number of parameters > >does not change. Is this hard coded somewhere? In my error > >file(CATALINA.OUT) I get the following: > > > >Running query: > >select * from dots.ExternalNASequence where external_database_release_id > >= 35 and source_id = $$1$$ > >java.sql.SQLException: ORA-00911: invalid character > > > >But I know that I am passing an array with two elements in it, and it is > >obviously getting the first one. > > > > > >If any knows why it won't insert the second parameter, please let me know. > > > > > >Michael Luchtan > >http://www.cs.uga.edu/~luchtan > > > > > > > > > >------------------------------------------------------- > >The SF.Net email is sponsored by EclipseCon 2004 > >Premiere Conference on Open Tools Development and Integration > >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. > >http://www.eclipsecon.org/osdn > >_______________________________________________ > >Gusdev-gusdev mailing list > >Gus...@li... > >https://lists.sourceforge.net/lists/listinfo/gusdev-gusdev > > > > > > |