Re: Database Mining
Posted in 1993
Paul,
Chord struck... you can judge whether or not it was the right one:
To unjoin a table into smaller tables, you need to choose some unique
key value in the table to connect your tables once you've unjoined them.
If you don't have a unique value, start by creating one. For instance,
add an integer variable to your table, and then write a simple 4gl
program to go through your data and update each value sequentially (eg.
1,2,3,4,5,6,...).
Now that you have a key value, unload the columns you want in each of
your smaller tables into flat files, but keep your unique key in both
tables. Eg:
unload to file1
select key_column, col1, col2, col3 from big_table;
unload to file2
select key_column, col4, col5, col6 from big_table;
If one of these tables ends up with duplicate rows in it (because some
person who designed it stored a one-to-many relationship in a single table
or whatever), try a sort -u on the appropriate file to get rid of
duplicate rows.
Then just create your new tables in Informix and use the load or dbload
command in sql to load your information in.
Hope this helps!
Cathy
+-------------------------------+----------------------------------------+
| Cathy Kipp | Internet: ckipp@vth1.vth.colostate.edu |
| Veterinary Teaching Hospital | |
| Colorado State University | Voice: (303) 491-1294 |
| Fort Collins, CO 80523 | Fax: (303) 491-1205 |
+-------------------------------+----------------------------------------+