• JackbyDev
    link
    fedilink
    English
    arrow-up
    21
    ·
    4 months ago

    Why would there be an age and my_age column on the table GIRLS?

    • lennivelkant@discuss.tchncs.de
      link
      fedilink
      arrow-up
      16
      arrow-down
      1
      ·
      4 months ago

      Good point.

      Should be age > (@my_age / 2) +7

      FTFOP - now my age is some value defined outside the immediate query.

      More likely, the GIRLS would be a view of some table persons and you could query my_age from that table too.

      • JackbyDev
        link
        fedilink
        English
        arrow-up
        2
        ·
        4 months ago

        Ah, but if we care at all about normalization and that’s calculatable from the other columns (it should be) then it shouldn’t be a column. Unless it’s expensive and this is a view, of course.