General discussion

Locked

Saving Data

By hartbladed ·
Hi to all,

I'm currently doing a module for our project and I'am having a hard time on how to save the data into a table. The module does is that it search for a specified PO(or record) and retrieved the colors of it, each colors has different number of sizes, ranging from 32A to 36DD and so forth... My prob is that how can i save the data on each Grid that I have made (using an array) into a table? Because the colors do not have a fixed count of sizes. Hopes someone help me on this... Many thanks..

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

If you mean something like this

by Tony Hopkinson In reply to Saving Data

PO Colour Sizes
0000001 Red 32A, 34B, 48DD

Then you've two options.
One is multivalue ie you saves the sizes in a big text field or even a blob. Howvere if you need to process the data , ie how many POs for 34A, then that's going to cost you.

The other way is to store the data in two tables one for PO and colour, the other for PO and Size witd a key of PO and Size. You can now query it but you'll have to write something to normalise you array for storage and denormalise it for output.

POS
PO_ID Colour
1 Red

PO_SIZES
PO_ID Size
1 32A
1 34B
1 48DD

Can't give you any further clues without knowing what environments you are using.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums