Whenever the fields are related (an association) the related fields can all make a single table. The only other thing you can do is to "explode" the single values to match the multivalues, but with different multivalue counts, you wind up with lots of null values. To make it really useful, I'm not aware of any other simple options. Relational databases really work best with normalized data...
-----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen Sent: November-09-11 10:57 AM To: U2 Users List Subject: Re: [U2] Suggestions for flattening Multivalues... I was looking more for ideas on how to setup the database structure to handle the 1:n other than the Sidebar tables joined to the master table. Right now, the scope of the data being moved off is fairly small, I didn't want to involve any other apps The querying app would be custom in itself (most likely php or something) Just this one file we are moving contains about 20 different multivalued fields, and it seemed a little Overkill to have to create 21 tables to contain the data in a form MySQL can handle. I guess that what Happens when you've been raised on multivalue database structure, and are forced to work with one that Does not handle it natively! -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Steve Romanow Sent: Wednesday, November 09, 2011 1:41 PM To: U2 Users List Subject: Re: [U2] Suggestions for flattening Multivalues... It might be worth doing some of this work with an ORM (Object Relation Mapper). Almost all higher level languages have them. Once you get things configured, the messiness of the joins is hidden behind syntactic sugar. Here is a comparison of a lot of them from wikipedia. http://en.wikipedia.org/wiki/Comparison_of_object-relational_mapping_software SQLAlchemy is a market leader for python. If you are a microsoft shop, I understand LINQ us really nice. http://en.wikipedia.org/wiki/Language_Integrated_Query#LINQ_to_SQL On Wed, Nov 9, 2011 at 1:34 PM, George Gallen <ggal...@wyanokegroup.com> wrote: > I'm in the process of creating/updating a MySQL database for external > applications to analyze some of the data. > > My initial method of dealing with a multivalued field, is to create > it's own table, keyed to the master table (1:n) But this gets a little > tedious if you have a bunch of multivalued fields - and creates really bulky > SQL statements with all the joins. > > What other ways are people using to work with 1:n relationships? > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users