Best Practice: Storing an array in MySQL

Hi,
I'm working on an app that uses Flex 2, Coldfusion and MySQL.
I'd like to store an array (or in this case an ArrayCollection)
into my db. I'm not totally sure if I can do this. I read something
about PHP having an implode command but I'm wondering what the best
practice would be for trying to get an array into MySQL via
ColdFusion.
I'd be grateful for any advice.
Novian

Thanks, mike_the_maven.
I'm not familiar with that tag but I'll definitely look into.
I'm also wondering about potentially storing my ArrayCollection as
a BLOB in MySQL. Any thoughts about this approach?
Thanks.
Novian

Similar Messages

  • Retrieve LV stored 2D-Array via MySQL C-API

     Hello everybody!
    I am not quite sure, if this is the right place for my question, but I'll just give it try.
    I have a LabVIEW Vi which performs Data Acquistion-Tasks. The Data is stored in a MySQL-Database using the Labview Database Connectivity Toolset. One part of the stored data is a 2D-Double-Array. For storage in MySQL It is automatically converted to Binary Data and the stored in a MySQL Blob-Field.
    Unfortunately, the software to process the data is written in C++. It was fairly easy to establish the communication between my c++ application and MySQL via the MySQL C-API. But now i'm struggling to retrieve the Binary-Data from the Database and reconvert it into a C++ Double Array, as am not very experienced with C++.
    Has anyone done something similar before?

    Hello
    I am happy to hear that your LabVIEW application and data storage with the LabVIEW Database Connectivity Toolkit works.
    Unfortunately is this the wrong platform to ask about C++. There are many other open platforms discussing C questions. I’d propose you to ask your question there.
    Best Regards
     Daniela Biberstein
    NI Switzerland

  • Best practice: storing user input as application wide config

    example: a webmail application is deployed as a war-file to a server. the fresh deployed app now needs to read info from the user (mail-host, username, password, etc.).
    what is the best way to store this information permanently on the serverside for as long as the app is not undeployed (i.e. persistent even after server reboot)?
    thx

    and what if i wanted an installer (setup script) that stores database connect info from a submitted html form?
    basically i need a standard way of storing data without unpacking the war and editing a .xml file. kind of chicken and egg issue.

  • Best Practice for storing PDF docs

    My client has a number of PDF documents for handouts that go
    with his consulting business. He wants logged in users to be able
    to download the PDF docs for handouts at training. The question is,
    what is the 'Best Practice' for storing/accessing these PDF files?
    I'm using CF/MySQL to put everything else together and my
    thought was to store the PDF files in the db. Except! there seems
    to be a great deal of talk about BLOBs and storing files this way
    being inefficient.
    How do I make it so my client can use the admin tool to
    upload the information about the files and the files themselves,
    not store them in the db but still be able to find them when the
    user want's to download them?

    Storing documents outside the web root and using
    <cfcontent> to push their contents to the users is the most
    secure method.
    Putting the documents in a subdirectory of the web root and
    securing that directory with an Application.cfm will only protect
    .cfm and .cfc files (as that's the only time that CF is involved in
    the request). That is, unless you configure CF to handle every
    request.
    The virtual directory is no safer than putting the documents
    in a subdirectory. The links to your documents are still going to
    look like:
    http://www.mysite.com/virtualdirectory/myfile.pdf
    Users won't need to log in to access these documents.
    <cfcontent> or configuring CF to handle every request
    is the only way to ensure users have to log in before accessing
    non-CF files. Unless you want to use web-server
    authentication.

  • Best practice for calling stored procedures as target

    The scenario is this:
    1) Source is from a file or oracle table
    2) Target will always be oracle pl/sql stored procedures which do the insert or update (APIs).
    3) Each failure from the stored procedure must log an error so the user can re-submit the corrected file for those error records
    There is no option to create an E$ table, since there is no control option for the flow around procedures.
    Is there a best practice around moving data into Oracle via procedures? In Oracle EBS, many of the interfaces are pure stored procs and not batch interface tables. I am concerned that I must build dozens of custom error tables around these apis. Then it feels like it would be easier to just write pl/sql batch jobs and schedule with concurrent manager in EBS (skip ODI completely). In that case, one could write to the concurrent manager log and the user could view the errors and correct.
    I can get a simple procedure to work in ODI where the source is the SQL, and the target is the pl/sql call to the stored proc in the database. It loops through every row in the sql source and calls the pl/sql code.
    But I can not see how to set which rows have failed and which table would log errors to begin with.
    Thank you,
    Erik

    Hi Erik,
    Please, take a look in these posts:
    http://odiexperts.com/?p=666
    http://odiexperts.com/?p=742
    They could help you in a way to solve your problem.
    I already used it to call Oracle EBS API's and worked pretty well.
    I believe that an IKM could be build to automate all the work but I never stopped to try...
    Does it help you?
    Cezar Santos
    http://odiexperts.com

  • Best Practice for storing a logon to website in a desktop java app

    Hoping someone well versed in java related security best practices can point me in the right direction.
    I have a small java PC application that uses the Soap API to send various data to a 3rd party.
    Currently I am storing the logon credentials for this 3rd party in a local database used by the application.
    The username / password to connect to this database is encrypted and never accessed in clear text in the code.
    (Although, since the application is stand alone, everything needed to decrypt the database credentials is packaged
    with the application. It would not be easy to get the clear text credentials, but possible)
    The caveat in my case is that the user of the application is not even aware (nor should be) that the application is interacting with
    the 3rd party API at all. All the end user knows is that an entity (that they already have a relationship with) has asked them to
    install this application in order to provide the entity with certain data from the user.
    Is there a more secure way to do this will maintaining the requirement that the user not need know the logon credentials to the 3rd party?

    Moderator advice: Don't double post the same question. I've removed the other thread you started in the Other Security APIs, Tools, and Issues forum.
    db

  • Best practice to process inbound soapenc:Array

    Hi, I'm working my way through a real world example where I've sent a keyword search query to Amazon and it return 10 results. This works great. Now I want to loop thru the Array and put the returned values into a table in the database. I can't seen to get down to the element level via XQuery to assign the returned values to my local variables. The XML returned is defined in the wdsl as:
         <xsd:complexType name="DetailsArray">
         <xsd:complexContent>
         <xsd:restriction base="soapenc:Array">
    <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:Details[]"/>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
         <xsd:complexType name="Details">
    What's the best practice for walking thru this incoming XML Array?
    Thanks...Matt

    Hello again!
    Thanks for quick reply!
    The instance state says : closed.completed.
    Perhaps the problem is not the insert into db, but the transformation activity?
    This is what the audit trail (raw xml) looks like:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <audit-trail>
    - <event sid="0" cat="2" type="2" n="0" date="2008-06-24T10:16:21.875+02:00">
    - <message>
    - <![CDATA[ New instance of BPEL process "BPELProcess3" initiated (# "150001").
      ]]>
    </message>
    </event>
    - <event sid="BpPrc0.1" cat="1" type="2" label="process" n="1" date="2008-06-24T10:16:21.875+02:00" psid="0">
    - <message>
    - <![CDATA[ _cr_
      ]]>
    </message>
    </event>
    - <event sid="BpTry0.2" cat="1" type="2" n="2" date="2008-06-24T10:16:21.890+02:00" psid="BpPrc0.1">
    - <message>
    - <![CDATA[ _cr_
      ]]>
    </message>
    </event>
    - <event sid="BpSeq0.3" cat="1" type="2" label="sequence" n="3" date="2008-06-24T10:16:21.890+02:00" psid="BpTry0.2">
    - <message>
    - <![CDATA[ _cr_
      ]]>
    </message>
    </event>
    - <event sid="BpSeq0.3" cat="2" type="2" wikey="150001-BpRcv0-BpSeq0.3-1" n="4" date="2008-06-24T10:16:21.921+02:00">
    - <message>
    - <![CDATA[ Received "inputVariable" call from partner "client"
      ]]>
    </message>
    - <details>
    - <![CDATA[
    <inputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload"><ns1:BPELProcess3ProcessRequest xmlns:ns1="http://xmlns.oracle.com/BPELProcess3">
                <ns1:stations>18700</ns1:stations>
                <ns1:username/>
            </ns1:BPELProcess3ProcessRequest>
    </part></inputVariable>
      ]]>
    </details>
    </event>
    - <event to="GetStationProperties_getStationsProperties_InputVariable" sid="BpSeq0.3" cat="2" type="1" wikey="150001-BpAss0-BpSeq0.3-2" n="5" date="2008-06-24T10:16:21.953+02:00">
    - <message>
    - <![CDATA[ Updated variable "GetStationProperties_getStationsProperties_InputVariable"
      ]]>
    </message>
    - <details>
    - <![CDATA[
    <GetStationProperties_getStationsProperties_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="stations"><stations>18700</stations>
    </part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="username"><username xmlns="" xmlns:def="http://www.w3.org/2001/XMLSchema" xsi:type="def:string" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
    </part></GetStationProperties_getStationsProperties_InputVariable>
      ]]>
    </details>
    </event>
    - <event to="GetStationProperties_getStationsProperties_InputVariable" sid="BpSeq0.3" cat="2" type="1" wikey="150001-BpAss0-BpSeq0.3-2" n="6" date="2008-06-24T10:16:21.953+02:00">
    - <message>
    - <![CDATA[ Updated variable "GetStationProperties_getStationsProperties_InputVariable"
      ]]>
    </message>
    - <details>
    - <![CDATA[
    <GetStationProperties_getStationsProperties_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="stations"><stations>18700</stations>
    </part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="username"><username/>
    </part></GetStationProperties_getStationsProperties_InputVariable>
      ]]>
    </details>
    </event>
    - <event sid="BpSeq0.3" cat="2" type="2" wikey="150001-BpInv0-BpSeq0.3-3" partnerWSDL="MetDataService2Ref.wsdl" n="7" date="2008-06-24T10:16:22.968+02:00">
    - <message>
    - <![CDATA[ Invoked 2-way operation "getStationsProperties" on partner "MetDataService".
      ]]>
    </message>
    - <details>
    - <![CDATA[
    <messages><GetStationProperties_getStationsProperties_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="stations"><stations>18700</stations>
    </part><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="username"><username/>
    </part></GetStationProperties_getStationsProperties_InputVariable><GetStationProperties_getStationsProperties_OutputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="return"><return xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:Array" xmlns:ns3="http://no.met.metdata/IMetDataService.xsd" ns2:arrayType="ns3:no_met_metdata_StationProperties[1]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <item xsi:type="ns3:no_met_metdata_StationProperties">
    <toDay xsi:type="xsd:int">0</toDay>
    <toMonth xsi:type="xsd:int">0</toMonth>
    <fromYear xsi:type="xsd:int">1937</fromYear>
    <municipalityNo xsi:type="xsd:int">301</municipalityNo>
    <amsl xsi:type="xsd:int">94</amsl>
    <latDec xsi:type="xsd:double">59.9427</latDec>
    <lonDec xsi:type="xsd:double">10.7207</lonDec>
    <toYear xsi:type="xsd:int">0</toYear>
    <department xsi:type="xsd:string">OSLO</department>
    <fromMonth xsi:type="xsd:int">2</fromMonth>
    <stnr xsi:type="xsd:int">18700</stnr>
    <wmoNo xsi:type="xsd:int">492</wmoNo>
    <latLonFmt xsi:type="xsd:string">decimal_degrees</latLonFmt>
    <name xsi:type="xsd:string">OSLO - BLINDERN</name>
    <fromDay xsi:type="xsd:int">25</fromDay>
    </item>
    </return>
    </part></GetStationProperties_getStationsProperties_OutputVariable></messages>
    ]]>
    </details>
    </event>
    - <event to="StoreStationProperties_insert_InputVariable" sid="BpSeq0.3" cat="2" type="1" wikey="150001-BpAss1-BpSeq0.3-4" n="8" date="2008-06-24T10:16:23.000+02:00">
    - <message>
    - <![CDATA[ Updated variable "StoreStationProperties_insert_InputVariable"
      ]]>
    </message>
    - <details>
    - <![CDATA[
    <StoreStationProperties_insert_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="EklimaStationsTblCollection"><EklimaStationsTblCollection xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/db" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/db"/>
    </part></StoreStationProperties_insert_InputVariable>
      ]]>
    </details>
    </event>
    - <event sid="BpSeq0.3" cat="2" type="2" wikey="150001-BpInv1-BpSeq0.3-5" partnerWSDL="db.wsdl" n="9" date="2008-06-24T10:16:27.312+02:00">
    - <message>
    - <![CDATA[ Invoked 1-way operation "insert" on partner "db".
      ]]>
    </message>
    - <details>
    - <![CDATA[
    <StoreStationProperties_insert_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="EklimaStationsTblCollection"><EklimaStationsTblCollection xmlns:ns0="http://xmlns.oracle.com/pcbpel/adapter/db/top/db" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/db"/>
    </part></StoreStationProperties_insert_InputVariable>
      ]]>
    </details>
    </event>
    - <event sid="BpSeq0.3" cat="2" type="2" wikey="150001-BpRpl0-BpSeq0.3-6" n="10" date="2008-06-24T10:16:27.312+02:00">
    - <message>
    - <![CDATA[ Reply to partner "client".
      ]]>
    </message>
    - <details>
    - <![CDATA[
    <outputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload"><BPELProcess3ProcessResponse xmlns="http://xmlns.oracle.com/BPELProcess3"/>
    </part></outputVariable>
      ]]>
    </details>
    </event>
    - <event sid="BpSeq0.3" cat="1" type="2" n="11" date="2008-06-24T10:16:27.312+02:00">
    - <message>
    - <![CDATA[ _cl_
      ]]>
    </message>
    </event>
    - <event sid="BpPrc0.1" cat="1" type="2" n="12" date="2008-06-24T10:16:27.312+02:00">
    - <message>
    - <![CDATA[ _cl_
      ]]>
    </message>
    </event>
    - <event sid="BpPrc0.1" cat="2" type="2" n="13" date="2008-06-24T10:16:27.328+02:00">
    - <message>
    - <![CDATA[ BPEL process instance "150001" completed
      ]]>
    </message>
    </event>
    </audit-trail>
    The webservice-method I'm calling in this case is getStationsProperties.
    Kind regards
    Jørn Eirik

  • PHP/MySQL Test/Production Server best practices

    Hello,
         I am currently learning PHP/MySql and have setup a test server to develop on and a production server to go live with. I wanted to know what are the best practices for synchronizing the test server with the production. Should I export the database from the test server and import it to the production server each time I make a change or is there better way to incrementally sync the databases. I am using Dreamweaver to design the web site.
    Thanks,
    Nick

    Thanks, but does this mean that after I go live I should make changes on the production database only and not use the development database, if say I need to add a new table or record(s)?
    Procedure
    1. Take production web site down
    2. Export/Save current database
    3. Make changes to production database
    4. Export/Save new database
    5. Bring production web site up
    Is this correct?

  • CAS array internal DNS IP address best practice

    Hi, Just a question about a best practice approach for DNS and CAS arrays.
    I have an Exchange 2010 Org. I have two CAS/HUB servers and two MBX servers. My external DNS (mail.mycompany.biz) host record points to a public IP address which is NAT'd to the internal IP address of my NLB CAS cluster. I maintain a split brain
    DNS. Should the internal DNS entry for mail.mycompany.biz also point to the public IP address or should it point to the internal IP address of the NLB cluster?

    A few comments:
    The reason you have split DNS is to do exactly these sort of things: inside users hit the inside IP and outside users hit the outside IP.  You'll have to look at your overall network design to see if it makes sense for users to take this shortest route
    to the services, or if there is value in knowing all users simply take the same path.
    You should not be using the same DNS name for your web services (e.g. OWA) as you are for your CAS array.  This can cause very long connection delays on Outlook clients, not to mention overall confusion in your design.  Many orgs will use something
    like "outlook.domain.com" for the Client Access Array and "mail.domain.com" for the web services.  Only the later of these two need to be exposed to the internet.
    Keep in mind, Exchange 2013 dramatically changes this guidance.  There is no more CAS array, and the
    recommended design is to use dedicated namespaces for each web service.
    Mike Crowley | MVP
    My Blog --
    Planet Technologies

  • Best practices for storing logon/password info

    I'm curious what are the best practices and/or what other organizations are using to store the logon/password information that needs to be shared by several users. This could be, for example, RFC logon that is used in several interfaces; FTP logon, etc. Such information may need to be accessible to all the developers yet should be stored safely.
    In my previous assignments this was usually managed by a Basis admin, but we don't have a designated admin here so it needs to be handled by developers. A suggestion has been made to store it in a Z table in SAP, but we're trying to explore other options.
    Thank you.

    The SecureStore is a protected area only accessible via the SAP kernel functions. It is SAP standard (used by transactions such as SM59, etc) and is accessed by the system at runtime.
    But if you only want these connections to be temporarily available (so, without stored logon data) then there is a guru solution you might want to consider for those access in ABAP systems.
    For general password management of generic users or large numbers of them you can alternately also consider a [password-vault|http://www.google.com/#hl=de&source=hp&biw=1276&bih=599&q=password+vault&rlz=1R2ADSA_deCH392&aq=f&aqi=g3&aql=&oq=&gs_rfai=&fp=ec103d87630c3cc0] . These can however typically not be accessed at runtime.
    Shall I move this to the security forum, ABAP general, NW Admin or is someone still going to get themselves Guestified here? 
    Cheers,
    Julius

  • Best practices to use stored procedure

    Just wondering about best practices of using Stored procedures in TOPLink with respect to Objects. Any thoughts on this?
    I find the approach suggested at re:Coding for Stored Procedures is a lot of work! seems to be fine.
    Is there any thoughts on converting results directly into Java objects?
    Murali

    I encountered the same problems.
    See the topic I posted: Re: Mapping a Java attribute to the result of a function call
    The solution I used is good, but has its restrictions.
    I created a database view on the query that uses stored functions. Then, I mapped my object to the database view. Problem solved.
    However, like I said, this solution has its restrictions:
    1) Your database must support views
    2) This only works for read-only queries
    I hope this helps you any further.
    Kind regards,
    Erwin

  • Best Practice for storing user preferences

    Is there something like best practice or guideline for storing user preferences for desktop application such as window position, layout setting, etc. ?

    java.util.prefs

  • Storing data - best practice?

    Hi,
    I wonder if there is any best practice to store data in my EP6.0 portal? For instance, in a standard website if you have a list of events, each event can be stored in a related sql-database and can then be fetched and updated whenever necessary.
    What is the best way to do developing portal content? The reason I am asking is because I want to develop a WebDynpro application where I can select a date and then display all registered events on that day in my portal.
    Best regards
    Øyvind Isaksen

    Okey, and then using a RFC call from the webdynpro application to fetch data from the sap database?
    This answered my question:
    Best regards
    Øyvind Isaksen

  • Best practice for presenting different storage vendors arrays..?

    Hi, can't seem to find a specific answer in writing on this.
    Typical FlexPod already deployed, with different vsans on different n5ks.
    Uplinks from UCS / NetApp are FCoE.
    So I now want to present some normal FC (not FCoE, nexsan) storage to the same blades on the UCS system via the n5ks.
    My main questions are can I use same vsans / vHBAs as for NetApp storage, or should you be creating different vsans and vHBAs for different storage vendors?
    If multiple vsan is recommended, is Trunking multiple vsans over FCoE from UCS to FC fine, I'm sure it is but just want some experience on it.
    Thanks!

    Thanks guys for the input, interesting to see there is a difference of opinion on this topic. Makes me feel happier that I'm not being too stupid and someones posted back a link to a best practice guide on the subject that I've blatantly missed! (still time for that no doubt!)
    Like I've said, I haven't found anything specific in writing on this, but keeping vendors on seperate vsans / hbas feels like the best way to do it anyway with only a little extra config in the grand scheme of things.

  • Best practice for storing/loading medium to large amounts of data

    I just have a quick question regarding the best medium to store a certain amount of data. Currently in my application I have a Dictionary<char,int> that I've created, that I subsequently populate with hard-coded static values.
    There are about 30 items in this Dictionary, so this isn't presented as much of a problem, even though it does make the code slightly more difficult to read, although I will be adding more data structures in the future with a similar number of items.
    I'm not sure whether it's best practice to hard-code these values in, so my question is, is there a better way to store this information, retrieve and load it at run-time?

    You could use one of the following methods:
    Use the application.config file. Upside is that it is easy to maintain. Downside is a user could edit it manually as its just an xml file.
    You could use a settings file. You can specify where the setting file is persisted including under the user's profile or the application. You could serialize/deserialize your settings to a section in the settings. See
    this MSDN help section
    on details abut the settings.
    Create a .txt, .json, or .xml file (depending on the format you will be deserializing your data) in your project and have it be copied to the output path with each build. The upside is that you could push out new versions in the future of the file without
    having to re-compile your application. Downside is that it could be altered if the user has O/S permissions to that directory.
    If you really do not want anyone to access it and are thinking of pushing out a new application version every time something changes you could create a .txt, .json, .xml file (depending on the format you will be deserializing your data) just like the previous
    step but this time mark it as an embedded resource in your project (you can do this in the properties of the  file in visual studio). It will essentially get compiled in your application. Content retrieval is outlined in
    this how to from Microsoft and then you just deserialize the retrieved content the same as the previous step.
    As far as formats of your data. I recommend you use either XML or JSON or a text file if its just a flat list of items (ie. list of strings). Personally I find JSON much easier to read compared to XML and change and there are plenty of supported serializers
    out there. XML is great too if you need to be strict as to what the schema is.
    Mark as answer or vote as helpful if you find it useful | Igor

Maybe you are looking for