On May 29, 2007, at 7:09 AM, James Masters wrote:

> Also, from the documentation, it appears that the foreign keys can  
> only
> specify "X to one" relationships.  I suppose this is because  
> foreign keys
> are specified from child to parent.  Most of what I've been doing  
> has been
> with "one to many" relationships from parent to child.  So, is it  
> the case
> that even once I've set up all the foreign keys in my converted InnoDB
> tables (assuming I can actually manage that), I will still need to be
> specifying lots of Extra.pm files with all the reverse "one to many"
> relationships in the parent tables?

Foreign keys are '(one|many) to one'  by design
Rose will autogenerate a reverse 'relationship'  from a child to a  
foreign key.  i'm not sure if it will do a one-to-one where  
appropriate, but it will do a one-to-many at the least.

On a side note-- if you're migrating to innodb and using foreign  
keys, i'd suggest taking out any mysqlisms while your at it  
( converting set/enum cols to lookup tables , etc ).  if you ever  
want to switch dbs from mysql to postgres/oracle, you can pretty much  
do a quick dump and not worry about stuff.

// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to