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. I know I'm old ...

I know I'm old ...

Scheduled Pinned Locked Moved The Lounge
databasecombeta-testingxmlquestion
5 Posts 5 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.
  • C Offline
    C Offline
    CHill60
    wrote on last edited by
    #1

    .. and crotchety and lots of other things but there some things I'm not sure that I want to understand. I'm no longer brave enough to ask "Why?" There was a conversation in QA yesterday (Programming, data storage, database[^]) about storing numeric IDs as strings. Drives me to distraction and I'm obviously not alone Today I find a column at work called ACTV_IND. Hm, thinks I, could this column contain an indicator to state whether or not this item is currently "Active". Well, yes it does. Except instead of an "indicator" it contains the words "Yes" or "No". I was sort of expecting a char Y or N, or even a bit 1 or 0. But it's "Yes" or "No" .This in a database that has otherwise been normalized to death (oh yeah, there are max 5 "type" of record and each type is max 3 chars - but that has been normalized away into a separate table). At a site where they are talking about destroying historical data "to save storage space". Just when I thought it couldn't get any worse, I noticed the table schema has this as varchar(15). That's longer than the longest word I've ever heard of for "Yes"! (Urdu by the way - Dschii haan, except it wouldn't be in that alphabet, but there again varchar not nvarchar) I don't know what made me do it, perhaps some innate sadomasochistic streak, but I checked out the numeric Ids while I was there ... yep, they're all varchar(15) as well. :sigh: I'm just going to quietly write my query, get the data and get outta here.

    H L 2 Replies Last reply
    0
    • C CHill60

      .. and crotchety and lots of other things but there some things I'm not sure that I want to understand. I'm no longer brave enough to ask "Why?" There was a conversation in QA yesterday (Programming, data storage, database[^]) about storing numeric IDs as strings. Drives me to distraction and I'm obviously not alone Today I find a column at work called ACTV_IND. Hm, thinks I, could this column contain an indicator to state whether or not this item is currently "Active". Well, yes it does. Except instead of an "indicator" it contains the words "Yes" or "No". I was sort of expecting a char Y or N, or even a bit 1 or 0. But it's "Yes" or "No" .This in a database that has otherwise been normalized to death (oh yeah, there are max 5 "type" of record and each type is max 3 chars - but that has been normalized away into a separate table). At a site where they are talking about destroying historical data "to save storage space". Just when I thought it couldn't get any worse, I noticed the table schema has this as varchar(15). That's longer than the longest word I've ever heard of for "Yes"! (Urdu by the way - Dschii haan, except it wouldn't be in that alphabet, but there again varchar not nvarchar) I don't know what made me do it, perhaps some innate sadomasochistic streak, but I checked out the numeric Ids while I was there ... yep, they're all varchar(15) as well. :sigh: I'm just going to quietly write my query, get the data and get outta here.

      H Offline
      H Offline
      honey the codewitch
      wrote on last edited by
      #2

      Ouch. I was looking for the appropriate emoji thing to respond to this post with, but nothing quite fits. It does remind me of a time an otherwise brilliant (and self taught) programmer was doing all his JOINs in PHP instead of in SQL. I got out of there, so I understand. There are simply wrong ways to use a database, although recently I *might* be guilty of that myself (as per my post at the top of the lounge at the moment) *hides*

      Real programmers use butterflies

      1 Reply Last reply
      0
      • C CHill60

        .. and crotchety and lots of other things but there some things I'm not sure that I want to understand. I'm no longer brave enough to ask "Why?" There was a conversation in QA yesterday (Programming, data storage, database[^]) about storing numeric IDs as strings. Drives me to distraction and I'm obviously not alone Today I find a column at work called ACTV_IND. Hm, thinks I, could this column contain an indicator to state whether or not this item is currently "Active". Well, yes it does. Except instead of an "indicator" it contains the words "Yes" or "No". I was sort of expecting a char Y or N, or even a bit 1 or 0. But it's "Yes" or "No" .This in a database that has otherwise been normalized to death (oh yeah, there are max 5 "type" of record and each type is max 3 chars - but that has been normalized away into a separate table). At a site where they are talking about destroying historical data "to save storage space". Just when I thought it couldn't get any worse, I noticed the table schema has this as varchar(15). That's longer than the longest word I've ever heard of for "Yes"! (Urdu by the way - Dschii haan, except it wouldn't be in that alphabet, but there again varchar not nvarchar) I don't know what made me do it, perhaps some innate sadomasochistic streak, but I checked out the numeric Ids while I was there ... yep, they're all varchar(15) as well. :sigh: I'm just going to quietly write my query, get the data and get outta here.

        L Offline
        L Offline
        lmoelleb
        wrote on last edited by
        #3

        If you do not use a string as datatype for this column, how would you fit "FILE NOT FOUND" into it? :confused:

        D L 2 Replies Last reply
        0
        • L lmoelleb

          If you do not use a string as datatype for this column, how would you fit "FILE NOT FOUND" into it? :confused:

          D Offline
          D Offline
          DerekT P
          wrote on last edited by
          #4

          and, if you don't define it as a string, how on earth do you get key values like "one", "two", "three" etc. into it??

          1 Reply Last reply
          0
          • L lmoelleb

            If you do not use a string as datatype for this column, how would you fit "FILE NOT FOUND" into it? :confused:

            L Offline
            L Offline
            Luc Pattyn
            wrote on last edited by
            #5

            404 :confused:

            Luc Pattyn [My Articles] If you can't find it on YouTube try TikTok...

            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