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. C#
  4. Data in XmlFiles or in Database

Data in XmlFiles or in Database

Scheduled Pinned Locked Moved C#
csharpdatabasemysqllinqxml
25 Posts 7 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.
  • R RedDk

    Strictly from the database side of the equation I'd vouch for the use of xml stored in the database as xml almost solely on the ease of using one table to stack all the individual "xml" up. It's sort of a side-effect that turns out to be exceedingly useful. Isn't this the reason there are TABLE in SQL? And not FILE?

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #7

    RedDK wrote:

    Isn't this the reason there are TABLE in SQL? And not FILE?

    In Paradox, those concepts were the same.

    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

    1 Reply Last reply
    0
    • F Frygreen

      I store almost all of my data for my applications in xml-files. Works fine, especially with Linq-Support But I continuously ask myself, if it is not better to store data in a database (SqlExpress or MySql) with much advanced data-handling-capabilities One advantage of xml is, that files can be easily moved around via simple copy/paste. Do I loose this feature with a database?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #8

      Frygreen wrote:

      One advantage of xml is, that files can be easily moved around via simple copy/paste. Do I loose this feature with a database?

      Depends what database-system you'll be choosing. For local data, I prefer SQLite (over SqlCE) as it's available on both Windows and Linux. One can XCopy such a file-database if no-one is using it at that particular moment. SqlExpress or MySQL would be recommended if your user wanted to share his/her data. A huge advantage of using a database over a custom structure is the fact that a database has been built for the explicit reason of storing data, and has been optimized over years to do so. It'd be faster, more secure, and it'd cut the dependency to the custom structure (iow, it'd be "standardizing" on Sql).

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

      F 1 Reply Last reply
      0
      • L Lost User

        Frygreen wrote:

        One advantage of xml is, that files can be easily moved around via simple copy/paste. Do I loose this feature with a database?

        Depends what database-system you'll be choosing. For local data, I prefer SQLite (over SqlCE) as it's available on both Windows and Linux. One can XCopy such a file-database if no-one is using it at that particular moment. SqlExpress or MySQL would be recommended if your user wanted to share his/her data. A huge advantage of using a database over a custom structure is the fact that a database has been built for the explicit reason of storing data, and has been optimized over years to do so. It'd be faster, more secure, and it'd cut the dependency to the custom structure (iow, it'd be "standardizing" on Sql).

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        F Offline
        F Offline
        Frygreen
        wrote on last edited by
        #9

        For the moment: Thanks for all of these replies. This dicussion is exactly what I'm looking for

        1 Reply Last reply
        0
        • J Jasmine2501

          Features are never loose with a database, they are always tight. Your "advantage" that you say with XML is actually a problem if you are talking about shared data. The problem is User 1 edits some data and sends it to User 2 - then User 2 edits some data and sends it to User 3 - at this point, User 1 has WRONG DATA, because they are still holding an old copy of the file and they have no way of knowing that User2 made changes. So, as a general rule, any data which will be used by multiple users needs to be in a database. Well, it needs to be in a central location that everyone is using - so it could be an XML file on the network, right? Your problem here isn't about the technology being used to store the data, the issues you need to solve are about how the data is used. Files can cause major problems if the data is used by multiple users, while databases are specifically designed for that situation. Many companies have an internal problem knowing what the truth is about the company, because they don't all pull their data from a central source. Don't be like that. On the other hand, users love files! They like to have control over 'their' data and when it's in a file on their machine, they feel comfortable with that. This is good practice for data that is work product, such as images produced by graphic designers, or engineering drawings from AutoCad, things like that. They control it while they want to, and they control how that information is shared. If you need user-level control like that, staying with files might be more appropriate.

          J Offline
          J Offline
          jschell
          wrote on last edited by
          #10

          Jasmine2501 wrote:

          Features are never loose with a database, they are always tight.

          That isn't true - using your definition. It is a common problem that an update to a database does not instantly appear in all clients. So one must account for that. Usually by just ignoring it because actual business cases (not hypothetical development cases) do not allow for it.

          Jasmine2501 wrote:

          Many companies have an internal problem knowing what the truth is about the company, because they don't all pull their data from a central source

          Which of course isn't solved by technology but rather architecture (people).

          J 1 Reply Last reply
          0
          • F Frygreen

            I store almost all of my data for my applications in xml-files. Works fine, especially with Linq-Support But I continuously ask myself, if it is not better to store data in a database (SqlExpress or MySql) with much advanced data-handling-capabilities One advantage of xml is, that files can be easily moved around via simple copy/paste. Do I loose this feature with a database?

            P Offline
            P Offline
            PIEBALDconsult
            wrote on last edited by
            #11

            Sql Server CE may be a good in-between solution. Or even Excel X| which can be accessed like a database via ADO.net / OleDb / Jet/ACE But I second the concern about each user having his own copy rather than a centralized database. It will bite you.

            1 Reply Last reply
            0
            • J jschell

              Jasmine2501 wrote:

              Features are never loose with a database, they are always tight.

              That isn't true - using your definition. It is a common problem that an update to a database does not instantly appear in all clients. So one must account for that. Usually by just ignoring it because actual business cases (not hypothetical development cases) do not allow for it.

              Jasmine2501 wrote:

              Many companies have an internal problem knowing what the truth is about the company, because they don't all pull their data from a central source

              Which of course isn't solved by technology but rather architecture (people).

              J Offline
              J Offline
              Jasmine2501
              wrote on last edited by
              #12

              You missed the joke, and the heinous spelling error. Your pants can be loose. Your database can't.

              J 1 Reply Last reply
              0
              • J Jasmine2501

                You missed the joke, and the heinous spelling error. Your pants can be loose. Your database can't.

                J Offline
                J Offline
                jschell
                wrote on last edited by
                #13

                Jasmine2501 wrote:

                You missed the joke

                So you are stating that your entire posting was a joke?

                J 1 Reply Last reply
                0
                • J jschell

                  Jasmine2501 wrote:

                  You missed the joke

                  So you are stating that your entire posting was a joke?

                  J Offline
                  J Offline
                  Jasmine2501
                  wrote on last edited by
                  #14

                  No just the part you didn't get.

                  J 1 Reply Last reply
                  0
                  • J Jasmine2501

                    No just the part you didn't get.

                    J Offline
                    J Offline
                    jschell
                    wrote on last edited by
                    #15

                    Jasmine2501 wrote:

                    No just the part you didn't get.

                    I responded to the entire posting - and it was incorrect as I stated.

                    J 1 Reply Last reply
                    0
                    • J jschell

                      Jasmine2501 wrote:

                      No just the part you didn't get.

                      I responded to the entire posting - and it was incorrect as I stated.

                      J Offline
                      J Offline
                      Jasmine2501
                      wrote on last edited by
                      #16

                      Stop it, you're making yourself look bad. The joke is obvious, I even bolded it.

                      J 1 Reply Last reply
                      0
                      • J Jasmine2501

                        Stop it, you're making yourself look bad. The joke is obvious, I even bolded it.

                        J Offline
                        J Offline
                        jschell
                        wrote on last edited by
                        #17

                        Jasmine2501 wrote:

                        Stop it, you're making yourself look bad

                        You are making assumptions about me.

                        Jasmine2501 wrote:

                        The joke is obvious, I even bolded it.

                        As I already said - I was responding to your entire post. And as I said, it was wrong.

                        J 1 Reply Last reply
                        0
                        • J jschell

                          Jasmine2501 wrote:

                          Stop it, you're making yourself look bad

                          You are making assumptions about me.

                          Jasmine2501 wrote:

                          The joke is obvious, I even bolded it.

                          As I already said - I was responding to your entire post. And as I said, it was wrong.

                          J Offline
                          J Offline
                          Jasmine2501
                          wrote on last edited by
                          #18

                          jschell wrote:

                          As I already said - I was responding to your entire post. And as I said, it was wrong.

                          No it's not. There is nothing wrong about my post. Everything I said was 100% true, and backed by 25 years of experience in this industry. There was a joke about horrible spelling in there, and that wasn't wrong or right, it was funny if you got it, which you didn't. The fact that you responded to that was funny for a minute but now it's just lame. http://dictionary.reference.com/browse/loose?s=t[^] http://dictionary.reference.com/browse/lose?s=t[^] Get it now?

                          J 1 Reply Last reply
                          0
                          • J Jasmine2501

                            jschell wrote:

                            As I already said - I was responding to your entire post. And as I said, it was wrong.

                            No it's not. There is nothing wrong about my post. Everything I said was 100% true, and backed by 25 years of experience in this industry. There was a joke about horrible spelling in there, and that wasn't wrong or right, it was funny if you got it, which you didn't. The fact that you responded to that was funny for a minute but now it's just lame. http://dictionary.reference.com/browse/loose?s=t[^] http://dictionary.reference.com/browse/lose?s=t[^] Get it now?

                            J Offline
                            J Offline
                            jschell
                            wrote on last edited by
                            #19

                            Jasmine2501 wrote:

                            Everything I said was 100% true,

                            My original post explained why it was wrong. If you didn't understand that you should have asked.

                            Jasmine2501 wrote:

                            and backed by 25 years of experience in this industry

                            I have that beat.

                            Jasmine2501 wrote:

                            it was funny if you got it, which you didn't.

                            And you obviously keep ignoring that I was responding to you entire post despite me stating it explicitly multiple times. Your continued restatement that you were attempting to be funny will not change that nor does it alter what I said.

                            J 1 Reply Last reply
                            0
                            • J jschell

                              Jasmine2501 wrote:

                              Everything I said was 100% true,

                              My original post explained why it was wrong. If you didn't understand that you should have asked.

                              Jasmine2501 wrote:

                              and backed by 25 years of experience in this industry

                              I have that beat.

                              Jasmine2501 wrote:

                              it was funny if you got it, which you didn't.

                              And you obviously keep ignoring that I was responding to you entire post despite me stating it explicitly multiple times. Your continued restatement that you were attempting to be funny will not change that nor does it alter what I said.

                              J Offline
                              J Offline
                              Jasmine2501
                              wrote on last edited by
                              #20

                              I said "features are never loose with a database, they are always tight" which was a joke on the mistaking of "loose" for "lose" and you responded as if it was a serious statement. That was your mistake, and this lame attempt to defend yourself is only pointing out the fact that you missed the joke. Now stop it, you're embarrassing yourself. Secondly, even if your response was not about the part you quoted, but also about the rest of what I said, that particular response didn't make a whole lot of sense and I disagree with it, based on my many years of experience in the real business world, which is more like 30 years, but it isn't a competition. I have enough experience to know that what I said is absolutely true almost anywhere you go and if you disagree with it, that's fine, I will leave it to the readers to decide for themselves.

                              J 1 Reply Last reply
                              0
                              • J Jasmine2501

                                I said "features are never loose with a database, they are always tight" which was a joke on the mistaking of "loose" for "lose" and you responded as if it was a serious statement. That was your mistake, and this lame attempt to defend yourself is only pointing out the fact that you missed the joke. Now stop it, you're embarrassing yourself. Secondly, even if your response was not about the part you quoted, but also about the rest of what I said, that particular response didn't make a whole lot of sense and I disagree with it, based on my many years of experience in the real business world, which is more like 30 years, but it isn't a competition. I have enough experience to know that what I said is absolutely true almost anywhere you go and if you disagree with it, that's fine, I will leave it to the readers to decide for themselves.

                                J Offline
                                J Offline
                                jschell
                                wrote on last edited by
                                #21

                                Jasmine2501 wrote:

                                I said "features are never loose with a database, they are always tight" which was a joke on the mistaking of "loose" for "lose" and you responded as if it was a serious statement. That was your mistake, and this lame attempt to defend yourself is only pointing out the fact that you missed the joke. Now stop it, you're embarrassing yourself.

                                I suggest you re-read the sub thread. Pay particular attention to where I told you repeatedly that I was responding to your entire post.

                                Jasmine2501 wrote:

                                based on my many years of experience in the real business world,

                                Since it isn't possible to instantaneously update all clients I can't imagine what business experience you have had.

                                J 1 Reply Last reply
                                0
                                • J jschell

                                  Jasmine2501 wrote:

                                  I said "features are never loose with a database, they are always tight" which was a joke on the mistaking of "loose" for "lose" and you responded as if it was a serious statement. That was your mistake, and this lame attempt to defend yourself is only pointing out the fact that you missed the joke. Now stop it, you're embarrassing yourself.

                                  I suggest you re-read the sub thread. Pay particular attention to where I told you repeatedly that I was responding to your entire post.

                                  Jasmine2501 wrote:

                                  based on my many years of experience in the real business world,

                                  Since it isn't possible to instantaneously update all clients I can't imagine what business experience you have had.

                                  J Offline
                                  J Offline
                                  Jasmine2501
                                  wrote on last edited by
                                  #22

                                  jschell wrote:

                                  I suggest you re-read the sub thread. Pay particular attention to where I told you repeatedly that I was responding to your entire post.

                                  I already addressed that problem.

                                  jschell wrote:

                                  Since it isn't possible to instantaneously update all clients I can't imagine what business experience you have had.

                                  I did not say it was. This is really annoying. If you're trying to annoy me, it's working. If you're trying to disprove something I said, that's not working.

                                  J 1 Reply Last reply
                                  0
                                  • J Jasmine2501

                                    jschell wrote:

                                    I suggest you re-read the sub thread. Pay particular attention to where I told you repeatedly that I was responding to your entire post.

                                    I already addressed that problem.

                                    jschell wrote:

                                    Since it isn't possible to instantaneously update all clients I can't imagine what business experience you have had.

                                    I did not say it was. This is really annoying. If you're trying to annoy me, it's working. If you're trying to disprove something I said, that's not working.

                                    J Offline
                                    J Offline
                                    jschell
                                    wrote on last edited by
                                    #23

                                    Jasmine2501 wrote:

                                    If you're trying to annoy me, it's working

                                    I am pointing out an incorrect statement. Your emotional state has nothing to do with it.

                                    Jasmine2501 wrote:

                                    If you're trying to disprove something I said, that's not working.

                                    I don't need to disprove it since you already agreed that one can't update all clients immediately. Not with an xml file and not with a database. You claime the former and ignored the latter.

                                    J 1 Reply Last reply
                                    0
                                    • J jschell

                                      Jasmine2501 wrote:

                                      If you're trying to annoy me, it's working

                                      I am pointing out an incorrect statement. Your emotional state has nothing to do with it.

                                      Jasmine2501 wrote:

                                      If you're trying to disprove something I said, that's not working.

                                      I don't need to disprove it since you already agreed that one can't update all clients immediately. Not with an xml file and not with a database. You claime the former and ignored the latter.

                                      J Offline
                                      J Offline
                                      Jasmine2501
                                      wrote on last edited by
                                      #24

                                      jschell wrote:

                                      I am pointing out an incorrect statement. Your emotional state has nothing to do with it.

                                      It is absolutely correct and you are wrong, and that is absolutely annoying and it would be to anyone. Seriously, let it go dude, nobody cares any more.

                                      J 1 Reply Last reply
                                      0
                                      • J Jasmine2501

                                        jschell wrote:

                                        I am pointing out an incorrect statement. Your emotional state has nothing to do with it.

                                        It is absolutely correct and you are wrong, and that is absolutely annoying and it would be to anyone. Seriously, let it go dude, nobody cares any more.

                                        J Offline
                                        J Offline
                                        jschell
                                        wrote on last edited by
                                        #25

                                        Jasmine2501 wrote:

                                        It is absolutely correct and you are wrong

                                        You are wrong.

                                        Jasmine2501 wrote:

                                        and that is absolutely annoying and it would be to anyone

                                        Again that is an emotional context which doesn't interest me and has nothing to do with the technical merits.

                                        Jasmine2501 wrote:

                                        Seriously, let it go dude, nobody cares any more.

                                        And yet you keep responding and keep claiming that I am wrong.

                                        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