Results 1 to 2 of 2

Thread: xml or db?

  1. #1
    Peter is offline Senior Member
    Join Date
    Jun 2007
    Posts
    119
    Rep Power
    0

    Default xml or db?

    I'm new in java but I'm not sure how to choose a data handling solution.
    How can I know when I have to choose a file vs. xml vs. DB? I'm sure a file is not what I want, but xml and DB both seem appropriate, is it true?
    thanks

  2. #2
    bbq
    bbq is offline Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Rep Power
    0

    Default

    mm
    It's depends.
    1) A file is appropriate for storing settings.

    2)XML is suitable for more complex data structures.
    The Java platform offers some outstanding XML tools, like JAXB. XML is handy because of these tools, not because the format itself is programmer-friendly.

    3)A database is best if you need to support transactions, more than one user or just a lot of data.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •