![]() |
| ||
| Normalizing "tables" Guys, without saying anything much, I have such data at hand (rows from a database table): 111 | xyz | a, b, c Following someone's wise words, I would love to have this transformed to : 111 | xyz | a DO NOT assume that there will be ONLY a single cell/column with multiple values. The following might also arise : 111 | xyz, def | a, b, c This has to be transformed to : 111 | xyz | a C++ code or suggestions would be great.. although I am interested in knowing more about ; 1. Working implementations/snippets 2. Alternative but automated or programmatic approaches to get equivalent output. 3. Links to other resources where I might get more answers to this question.. for example any good database experts forums you guys might know/heard about.. visit etc... I am really looking forward to some help on this because I thought up a recursive solution to this problem but I got stuck when I found out that I would have to know and predefine the table schema and model an object/class/structure on it.. that would make my program not applicable for any table, but rather I would have to redefine and recompile the classes for the table schema for every table. I am sure there are easier ways out. |
| ||
| Re: Normalizing "tables" Yeah it seems like you need some sort of generic way to set up an arbitary number of nested for loops. Perhaps recursion of some sort. //111 | xyz, def | a, b, c I think hard coding it would be the simplest solution. |
| ||
| Re: Normalizing "tables" I don't think this question has anything to do with database designing. |
| All times are GMT -4. The time now is 3:46 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC