Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Repacing DB with XML files?

Repacing DB with XML files?

Scheduled Pinned Locked Moved .NET (Core and Framework)
databasexmlquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wmostafaw
    wrote on last edited by
    #1

    i think to replacing my data storage (DB) with XML files which each file represent a table in DB and make select and other operations on them. Is my think right and why? Thanks for replay!!

    S M 2 Replies Last reply
    0
    • W wmostafaw

      i think to replacing my data storage (DB) with XML files which each file represent a table in DB and make select and other operations on them. Is my think right and why? Thanks for replay!!

      S Offline
      S Offline
      silkkeng
      wrote on last edited by
      #2

      In this case, you are just exposing your data to other user. In terms of security, have you really consider? Besides, it means everytime u have to use dataset to read the xml to filter, and perform database functionality. Would it be efficient ?

      1 Reply Last reply
      0
      • W wmostafaw

        i think to replacing my data storage (DB) with XML files which each file represent a table in DB and make select and other operations on them. Is my think right and why? Thanks for replay!!

        M Offline
        M Offline
        Mike Burroughs
        wrote on last edited by
        #3

        Hard to answer the question without understanding why you would want to do this? XML files are portable and easily readable and editable, but as an operational data store they are not very functional. The issues that I would see with this are: 1) Consistency. With a database system you are guaranteed data is consistent based on the queries run against it, even through a system crash. With XML files, writing to one file may succeed, writing to the next may fail. What state is your data in at that point? 2) Performance. Database systems are optimized for performance, especially query performance. For large data sets a database system is going to be able to query optimally even if the data set it is querying is to big to fit in memory. In order to get any performance out of XML you are probably going to have to load the whole thing into memory, which may be difficult if your data set gets big. XPath is pretty powerful but nobody claims it is a speed burner. 3) Data Relationship Maintenance. If you want to maintain relationships between data tables that are parts of separate documents, each with a separate schema, how are you going to load the relationship information into the DataSet? 4) Query Capability. You will loose significant query capability and performance using your model. 5) Multiuser Capability. Your system of files is a single user solution at best. If you are building a stand alone, single user application that you expect to have a limited data set size and are dead set on XML files, then I would at least explore putting all the tables into one XML file. Otherwise stick with a database system. XML files are best used for import and export of data and transfer of data between systems. Granted, XML files are cheap, but MySQL and SQL Server 2005 Express are free as well and much better options for a database engine.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups