logo       

Re: many-to-many w/ attributes: msg#00151

Subject: Re: many-to-many w/ attributes
This is a multi-part message in MIME format.
My apologies -- I should have put an example of the typical many-to-many
w/ attributes that I always see.  A couple examples from data I have
recently modeled: 
 
 
create table srna_sequence (
  id                    INT NOT NULL PRIMARY KEY,
  ... more columns ...
);
 
create table precursor (
  id                    INT NOT NULL PRIMARY KEY,
  ... more columns ...
);
 
create table srna_sequence_precursor_location (
  srna_sequence_id      INT NOT NULL,
  precursor_id          INT NOT NULL,
  arm                   VARCHAR(30) NOT NULL,
  position              INT NOT NULL
);
 
-- or --
 
create table experiment (
  id                    INT NOT NULL PRIMARY KEY,
  ... more columns ...
);
 
create table sample (
  id                    INT NOT NULL PRIMARY KEY,
  ... more columns ...
);
 
create table experiment_sample (
  experiment_id         INT NOT NULL,
  sample_id             INT NOT NULL,
  ordinal_position      INT NOT NULL
);
 
 
So for many-to-many w/ attributes like these, is the example on
http://dbix-class.shadowcatsystems.co.uk/index.cgi?ManyToManyWithAttribu
tes the recommended way to set up using the latest DBIx::Class 0.07002?
 
Leandro
 


________________________________

From: dbix-class-bounces@xxxxxxxxxxxxxxxxx on behalf of Matt S Trout
Sent: Fri 9/15/2006 10:47 PM
To: dbix-class@xxxxxxxxxxxxxxxxx
Subject: Re: [Dbix-class] many-to-many w/ attributes



Hermida, Leandro wrote:
> Hello,
> 
> Is the example shown in
>
http://dbix-class.shadowcatsystems.co.uk/index.cgi?ManyToManyWithAttribu
tes still
> the recommended way to set up many-to-many with attributes when using
> DBIx::Class 0.07002?

It's *a* way that works.

It's impossible to say whether it's what we'd recommend when you've
given us
no information at all about your design contraints :)

--
      Matt S Trout       Offering custom development, consultancy and
support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST.
Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more
information

+ Help us build a better perl ORM:
http://dbix-class.shadowcatsystems.co.uk/ +

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive:
http://www.mail-archive.com/dbix-class@xxxxxxxxxxxxxxxxx/


<<winmail.dat>>


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe