That makes sense to me !

Thanks for your help folks

-----Original Message-----
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: 25 April 2001 10:59
To: CF-Talk
Subject: RE: Storing structures in a DB


Yes and no

Say you have some data in a cf program say some arrays, simple 
variables, lists, and maybe even some structures.

Now, you want to store all this in a single field (column) in a database.

The easiest way is to create 1 big structure, serialize it into a 
wddx packet, and store the packed in a text field.

The wddx serialization process will add tags to denote the various 
components within the packet.


I am *not* advocating that you do this... just saying that if you 
chose to do it, here is one way.

Dick

At 10:39 AM +0100 4/25/01, Darren Adams wrote:
>Sorry, I am a little slow this morning.
>
>Bascially you are suggesting to store all that data in one column
>surrounded by tags like:
>  <direct_sales> <location> blah blah </location> </direct_sales>
>
>Then pull that out using wddx ?
>
>
>-----Original Message-----
>From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
>Sent: 25 April 2001 10:29
>To: CF-Talk
>Subject: RE: Storing structures in a DB
>
>
>You may wish to spend a little time analyzing how these data are
>going to be accessed within the database.
>
>If you are going to (regularly) search/sort any of these data, then
>structures, wddx, large composite text fields are a poor choice.
>
>     each column in the database should be atomic (contain a single value)
>
>On the other hand, if you are just going to retrieve and present the
>data, a wddx packet is a quick solution... although wddx can add a
>lot of verbosity, storing a:
>
>    0
>
>as
>
>    <string>0</string>
>
>HTH
>
>Dick
>
>
>At 10:12 AM +0100 4/25/01, Darren Adams wrote:
>>I would normally use columns in a database and not worry about structures
>>but, from the looks of the spec that I have got there is more of a
>>complicated structure.
>>
>>
>>basically it is a company information section for our intranet.
>>
>>Within the Slow_stream table there will be coluimns for
>>Company info, financial info and sales office info
>>
>>The later column has to contain;
>>
>>Direct Sales:
>>      location, size
>>VARs
>>      location, Size, other products
>>International Presense
>>Key Markets
>>Market Share
>>
>>I was thinking about using a structure for the direct sales and VAR
>sections
>>so I can store the extra details.
>>
>>
>>Is it as simple creating a structure then inserting it into a DB field.
>>When I want to display the data for a user can I query the database then
>>access the structure as I normal ?
>>
>>
>>-----Original Message-----
>>From: DeVoil, Nick [mailto:[EMAIL PROTECTED]]
>>Sent: 25 April 2001 09:54
>>To: CF-Talk
>>Subject: RE: Storing structures in a DB
>>
>>
>>Darren
>>
>>The question isn't as simple as all that -
>>the subject line says DB but the body says array.
>>
>>In both cases the answer is yes, but the details
>>depend on what exactly you're trying to do.
>>
>>One way of storing a structure in a DB is to put
>>it in a WDDX packet & put that in a large text
>>field. Otherwise of course you can have a table
>>with one column for each field in the struct.
>>
>>Nick
>>
>>-----Original Message-----
>>From: Darren Adams [mailto:[EMAIL PROTECTED]]
>>Sent: Wednesday, April 25, 2001 9:39 AM
>>To: CF-Talk
>>Subject: Storing structures in a DB
>>
>>
>>
>>Hello,
>>
>>Just a simple question that probably has a simple answer.
>>
>>Can a structure be stored in an array so that it can be referrence at a
>>later date ?
>>
>>Darren Adams
>>Web Developer
>>Marketing Department
>>Systems Union
>>
>>Office: 01252 55 6220
>>Mobile: 07714 817 038
>>Email: [EMAIL PROTECTED]
>>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to