This content has been marked as final. Show 4 replies
We have been using WDDX to store form data in the data base for a long time. I would say that storing it in XML is a better route because most databases (SQL Server and Oracle is what I have the most experience with) do have the capability to rip through XML using X-path, etc. The best way though, that we have found out is to have a "Properties" table. So it has a "PropertyName" column, a "PropertyValue" column, a unique ID, and a Foreign Key ID to say a "Report" table that is storing the form (config) data for. So then you would query the "Properties" table, and get all the needed values from it, and then do whatever it is you need to do in your code based on those values.
Having a "Properties" table leverages itself way better to reporting on the properties, where you can write a query to get that information instead of having CF to dump that information.
Hope this helps.
We have been using WDDX to store form data in the data base for a long
time. I would say that storing it in XML is a better route because most
I would just like to add, in case this is not clear, WDDX IS XML. If
you look at the WDDX packet it will be in XML format.
I think I understand so you store the name and value pairs for each form element in a seperate table?
What do you do when an XML document has child nodes?
I still wish there was a nice solution, something that just you passed an XML packet to and you could query it like you do a physical db table.
Yup, basically that table is Key Value pairs for in your case the form variables. So maybe like a key of "Name" and a value of "Jon".
About the XML. In T-SQL (we use SQL Server) there is a way using X-Path to rip through any format of XML. From parent nodes to children, and even attributes within the nodes can be searched and used. For more info check out this link and Method 4: http://vyaskn.tripod.com/passing_arrays_to_stored_procedures.htm .
I agree that it would be nice to be able to query XML like we can a database. I know that SQL Server and Oracle (and other DBMS as well) can return XML from a query. That might be something for you to look into also.
Hope this helps.