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. The Lounge
  3. Today I have committed to doing something I said I will never do

Today I have committed to doing something I said I will never do

Scheduled Pinned Locked Moved The Lounge
databasecsharpandroidsql-servercom
20 Posts 11 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.
  • E Offline
    E Offline
    Ennis Ray Lynch Jr
    wrote on last edited by
    #1

    Today I have committed to doing something I said I will never do: I will be using the XML data type in SQL Server as a primary storage mechanism for a project instead of a normalized database. I am crying a little on the inside but it is the best solution :( (well the best solution that involves using SQL Server)

    Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

    L S P E M 8 Replies Last reply
    0
    • E Ennis Ray Lynch Jr

      Today I have committed to doing something I said I will never do: I will be using the XML data type in SQL Server as a primary storage mechanism for a project instead of a normalized database. I am crying a little on the inside but it is the best solution :( (well the best solution that involves using SQL Server)

      Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

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

      XML. What an absoloute farce it is. It wa supposed ot be the next best thing and all its ended up being used for is storing info like an ini file, only harder to read. What a farce...

      Morality is indistinguishable from social proscription

      E L M S 4 Replies Last reply
      0
      • L Lost User

        XML. What an absoloute farce it is. It wa supposed ot be the next best thing and all its ended up being used for is storing info like an ini file, only harder to read. What a farce...

        Morality is indistinguishable from social proscription

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        Well this farce should net me 6 figures in less than 2 years if I can achieve a penetration of 0.1%! I will accept a farce.

        Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

        1 Reply Last reply
        0
        • E Ennis Ray Lynch Jr

          Today I have committed to doing something I said I will never do: I will be using the XML data type in SQL Server as a primary storage mechanism for a project instead of a normalized database. I am crying a little on the inside but it is the best solution :( (well the best solution that involves using SQL Server)

          Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

          S Offline
          S Offline
          Single Step Debugger
          wrote on last edited by
          #4

          I can feel your pain. The queries targeting XML type of data are terribly looking, defining the schema is not intuitive and the whole thing is a big mess. I passed through this about year ago, when I was making an application change log based on XML data and Microsoft Diff Diagram. It was a huge timewaster and it’s not Microsoft or SQL Server fault it’s because the XML is evil.

          The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word. Advertise here – minimum three posts per day are guaranteed.

          1 Reply Last reply
          0
          • E Ennis Ray Lynch Jr

            Today I have committed to doing something I said I will never do: I will be using the XML data type in SQL Server as a primary storage mechanism for a project instead of a normalized database. I am crying a little on the inside but it is the best solution :( (well the best solution that involves using SQL Server)

            Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

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

            There's an XML data type? I'd just stick it in a varchar.

            E 1 Reply Last reply
            0
            • P PIEBALDconsult

              There's an XML data type? I'd just stick it in a varchar.

              E Offline
              E Offline
              Ennis Ray Lynch Jr
              wrote on last edited by
              #6

              The xml type is similar to a VARCHAR(MAX) except it also comes with operators that support XPath as well as indexing elements in the xml file through an XML index.

              Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

              P 1 Reply Last reply
              0
              • L Lost User

                XML. What an absoloute farce it is. It wa supposed ot be the next best thing and all its ended up being used for is storing info like an ini file, only harder to read. What a farce...

                Morality is indistinguishable from social proscription

                L Offline
                L Offline
                LloydA111
                wrote on last edited by
                #7

                fat_boy wrote:

                XML. What an absoloute farce it is. It wa supposed ot be the next best thing and all its ended up being used for is storing info like an ini file, only harder to read. What a farce...

                I agree.


                ▬▬▬▬▬▬▬▬▬▬▬▬

                1 Reply Last reply
                0
                • E Ennis Ray Lynch Jr

                  The xml type is similar to a VARCHAR(MAX) except it also comes with operators that support XPath as well as indexing elements in the xml file through an XML index.

                  Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

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

                  I suppose it might be good for postal addresses from multiple countries and such. Even in the U.S. there is a wide variety in addressing.

                  1 Reply Last reply
                  0
                  • E Ennis Ray Lynch Jr

                    Today I have committed to doing something I said I will never do: I will be using the XML data type in SQL Server as a primary storage mechanism for a project instead of a normalized database. I am crying a little on the inside but it is the best solution :( (well the best solution that involves using SQL Server)

                    Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

                    E Offline
                    E Offline
                    Electron Shepherd
                    wrote on last edited by
                    #9

                    "Pragmatism must take precedence over elegance, for Nature cannot be impressed."

                    Server and Network Monitoring

                    P 1 Reply Last reply
                    0
                    • L Lost User

                      XML. What an absoloute farce it is. It wa supposed ot be the next best thing and all its ended up being used for is storing info like an ini file, only harder to read. What a farce...

                      Morality is indistinguishable from social proscription

                      M Offline
                      M Offline
                      Marc Clifton
                      wrote on last edited by
                      #10

                      fat_boy wrote:

                      and all its ended up being used for is storing info like an ini file

                      Clue less. Marc

                      1 Reply Last reply
                      0
                      • E Ennis Ray Lynch Jr

                        Today I have committed to doing something I said I will never do: I will be using the XML data type in SQL Server as a primary storage mechanism for a project instead of a normalized database. I am crying a little on the inside but it is the best solution :( (well the best solution that involves using SQL Server)

                        Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

                        M Offline
                        M Offline
                        Marc Clifton
                        wrote on last edited by
                        #11

                        Ennis Ray Lynch, Jr. wrote:

                        I will be using the XML data type in SQL Server as a primary storage mechanism

                        Welcome to the xark side. It's cool, but it's also an incredible PITA. Beware of an interesting bug I discovered when joining tables--fully qualify your tables when refering to XML fields in some of those bizarre joins, if you don't you will get random results back from your queries. Marc

                        1 Reply Last reply
                        0
                        • E Ennis Ray Lynch Jr

                          Today I have committed to doing something I said I will never do: I will be using the XML data type in SQL Server as a primary storage mechanism for a project instead of a normalized database. I am crying a little on the inside but it is the best solution :( (well the best solution that involves using SQL Server)

                          Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

                          K Offline
                          K Offline
                          KenJohnson
                          wrote on last edited by
                          #12

                          Indeed so sad, My dealings with the xml datatype in tables have been painful. Hopefully you bill by the hour. Ken By the way the xml datatype as a parameter in a stored procedure is amazing, truely wicked fast for multi data entry.

                          P 1 Reply Last reply
                          0
                          • E Ennis Ray Lynch Jr

                            Today I have committed to doing something I said I will never do: I will be using the XML data type in SQL Server as a primary storage mechanism for a project instead of a normalized database. I am crying a little on the inside but it is the best solution :( (well the best solution that involves using SQL Server)

                            Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

                            A Offline
                            A Offline
                            Andy Brummer
                            wrote on last edited by
                            #13

                            Ennis Ray Lynch, Jr. wrote:

                            (well the best solution that involves using SQL Server)

                            I'm guessing one of the many nosql options would work brilliantly here.

                            I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon

                            1 Reply Last reply
                            0
                            • E Electron Shepherd

                              "Pragmatism must take precedence over elegance, for Nature cannot be impressed."

                              Server and Network Monitoring

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

                              "I am the Ratt Buoy! I'm not impressed!" -- The Ratt Buoy

                              1 Reply Last reply
                              0
                              • K KenJohnson

                                Indeed so sad, My dealings with the xml datatype in tables have been painful. Hopefully you bill by the hour. Ken By the way the xml datatype as a parameter in a stored procedure is amazing, truely wicked fast for multi data entry.

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

                                KenJohnson wrote:

                                for multi data entry.

                                Perhaps you'd be interested in my recent tip[^].

                                K 1 Reply Last reply
                                0
                                • P PIEBALDconsult

                                  KenJohnson wrote:

                                  for multi data entry.

                                  Perhaps you'd be interested in my recent tip[^].

                                  K Offline
                                  K Offline
                                  KenJohnson
                                  wrote on last edited by
                                  #16

                                  The tip looks very interesting. Do you have performance data? Is it faster than sending xml and ripping it upon arrival. I've found that perfomance for things like an order and its order details is great when they are submitted as an xml doc. Does your method add items one at a time or do the equivalent of creating an in memory table an then performing an insert select statement. Ken

                                  P 1 Reply Last reply
                                  0
                                  • E Ennis Ray Lynch Jr

                                    Today I have committed to doing something I said I will never do: I will be using the XML data type in SQL Server as a primary storage mechanism for a project instead of a normalized database. I am crying a little on the inside but it is the best solution :( (well the best solution that involves using SQL Server)

                                    Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

                                    G Offline
                                    G Offline
                                    Gary R Wheeler
                                    wrote on last edited by
                                    #17

                                    I don't understand why XML keeps getting a bad rap. It is well suited for handling data that has a variable 'shape'. It is easy to debug, as opposed to some opaque binary serializaton mechanism. It's my mechanism of choice for persisting information that isn't going into a data base. Granted, it's not the most efficient storage mechanism there is, but that's not a primary consideration in the cases I use it. I can even see using it in a data base application. I wouldn't use it for something I need to search against, or that required heavy lifting with the data base itself. It would be useful though for information that doesn't fit the table/row/column paradigm, like a value that was unique for each entry in the data base.

                                    Software Zen: delete this;
                                    Fold With Us![^]

                                    1 Reply Last reply
                                    0
                                    • K KenJohnson

                                      The tip looks very interesting. Do you have performance data? Is it faster than sending xml and ripping it upon arrival. I've found that perfomance for things like an order and its order details is great when they are submitted as an xml doc. Does your method add items one at a time or do the equivalent of creating an in memory table an then performing an insert select statement. Ken

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

                                      I have no data on that, but I don't see how this could be slower.

                                      KenJohnson wrote:

                                      an insert select statement

                                      So far I've only used the queries I included -- I haven't had an opportunity to use this technique in a real-world scenario. I haven't used it to perform an INSERT, but I expect I could do INSERT INTO table ... SELECT * FROM @datatable. However, I probably wouldn't because I prefer to insert rows one at a time so I can deal will Exceptions as they happen without affecting the other rows. Bear in mind, that (as far as I can tell) the DataTable IS_A table.

                                      1 Reply Last reply
                                      0
                                      • L Lost User

                                        XML. What an absoloute farce it is. It wa supposed ot be the next best thing and all its ended up being used for is storing info like an ini file, only harder to read. What a farce...

                                        Morality is indistinguishable from social proscription

                                        S Offline
                                        S Offline
                                        swjam
                                        wrote on last edited by
                                        #19

                                        have you heard of xsl transforms?

                                        ---------------------------------------------------------- Lorem ipsum dolor sit amet.

                                        L 1 Reply Last reply
                                        0
                                        • S swjam

                                          have you heard of xsl transforms?

                                          ---------------------------------------------------------- Lorem ipsum dolor sit amet.

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

                                          swjam wrote:

                                          have you heard of xsl transforms?

                                          No, and I am pretty sure I dont want to! ;P I am a kernel engineer. I use C and write drivers. I keep about as far away form trendy stuff as possible. I use a language that hasnt changed for decades in a kernel that isnt far behind.

                                          Morality is indistinguishable from social proscription

                                          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