Keep in mind that WDDX adds quite a bit of extra "stuff" around your 
data as compared to JSON.  For example, take this ColdFusion array:

<cfset myArray = ["John","Paul","George","Ringo"]>

Here is the serialized JSON version:

["John","Paul","George","Ringo"]

Here is the WDDX version:

<wddxPacket version='1.0'><header/><data><array 
length='4'><string>John</string><string>Paul</string><string>George</string><string>Ringo</string></array></data></wddxPacket>

The larger the array or structure, the bigger the "bloat" from WDDX, and 
the more database space required to store it.  This needs to be 
considered when designing your database columns.

HTH,
Carl

On 4/6/2011 10:52 AM, Michael Grant wrote:
> Serialize them as JSON or WDDX and store them as text.
>
> On Wed, Apr 6, 2011 at 1:41 PM, Adam Bourg<adam.bo...@gmail.com>  wrote:
>
>> I've got really large sets of data that are related to each day of the week
>> and the hour. Rather then creating a massive table containing these values,
>> I have stored them in a Structure, but I can't seem to get Structures or
>> Arrays to insert into a database. How can I store an array or structure in a
>> MS 2008 SQL server?
>>
>> Array Code:
>>
>> <cfset name="Adam" />
>> <cfscript>
>> // 7 days, day 0 = Mon, Day 7 = sun
>> workWeek=["t","t","f","t","f","t","f"];
>> </cfscript>
>>
>> <cfinvoke method="injectData" component="anubis">
>>         <cfinvokeargument name="name" value="#name#" />
>>     <cfinvokeargument name="workWeek" value="#workWeek#" />
>> </cfinvoke>
>>
>> <cffunction name="injectData" access="public" returntype="void"
>> hint="Injects the Employee App form data">
>>
>> <cfquery datasource="DSN" name="insertData">
>> INSERT INTO mod_employmentAppProfile(
>>         name,
>>         workWeekendsEvenings
>> )
>> VALUES (
>>         #ARGUMENTS.name#,
>>     #ARGUMENTS.workWeek#
>> )
>> </cfquery>
>>
>>
>>
>>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343577
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to