3 Replies Latest reply on May 16, 2008 1:04 PM by brad carvey-kplRXI

    Flex and XML vrs. Database

      I want to build a website using flex that will display data on a website. All of the data combined will be quite large (about 120,000 questions, 120,000 answers, ect... ( about 8 database columns (or fields) altogether ). My question regarding xml is, if I am only going to display the data when it is called (through a button) and only display 10 to 20 questions and answers at a time, and not add data to the xml file or database from the website, could I store the data inside one large xml file, or multiple xml files? Or would it be better to put the data into a database? If so why? Sammy

        • 1. Re: Flex and XML vrs. Database
          ntsiii Level 3
          If you use an xml file, then you will have to pull the entire file to the client(or build some serverside xml parsing filtering functionality). If this initial download of data can happen reasonably fast, then the app will be very fast since no further server hits will be required.

          If you use a database, then you can limit the amout of data that goes over the wire by querying for only the needed data. This means many more server calls, but they will be quite fast.

          Databases are more suited to updating/maintaining than xml files.

          • 2. Re: Flex and XML vrs. Database
            ntsiii Level 3
            If you can use multiple smaller xml files, and call them as needed, that is a good approach.

            Again, maintenance on all those files is harder than with a db. But a DB means additional administration, and requires a middle tier.

            I have done this both ways.

            • 3. Re: Flex and XML vrs. Database
              brad carvey-kplRXI
              If the data will rarely change, I would try it with one large XML file. If the load time is too long, you might look into compressing the XML file on the server side and decompressing it on the client side.

              If you still feel like the load time is too slow, then I would probably go with a database. Managing a bunch of small XML files sounds like a hassle and problematic.