• vrek@programming.dev
    link
    fedilink
    English
    arrow-up
    17
    ·
    7 months ago

    This actually gave me an idea. Over break I wanted to practice dB design and entity framework. Designing a database and interface for santa to track kids naughty or nice could be a fun/interesting way of doing it.

    • jubilationtcornpone@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      4
      ·
      7 months ago

      Just FYI, LinqPad is a really neat tool for messing around with EFCore. I use it all the time for testing ideas or doing quick tasks that I don’t want to spin up a new project for.

    • ericbomb@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      7 months ago

      Ooh this is actually a good learning example.

      Kids will have their wish list that’s another table that we wanna reference. Then of course do we have the name of the toys in the table, or simple reference “Toys” table.

      Also need an address table as some kids get Santa gifts at more than one house…

      • vrek@programming.dev
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 months ago

        I didn’t even consider incorporating toy distribution… At what levels should kids get a small gift(a toy or game) vs a large gift(bike, game system etc).

        In a real world scenario I would probably spilt this between 2 databases… One for kids (“with a nice score of 2 you get a toy of value 4 or less”) and one for toys (“the toys available with a value less than 4 are…”)

        • ericbomb@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          7 months ago

          Gonna need a whole auto converter thing to make sure that requests for “ps” “play station” and “new play station” all get converted to same thing!

          • vrek@programming.dev
            link
            fedilink
            English
            arrow-up
            2
            ·
            7 months ago

            Yeah… Which is 100x more complicated cause Microsoft has no idea how to name consoles

  • FellowHuman@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    7 months ago

    Hope that the behavior is enum and indexed. …and that the table doesn’t have to many columns …and there aren’t many nice people …god damn it just select only what you need and use limit

    • Alien Nathan Edward@lemm.ee
      link
      fedilink
      English
      arrow-up
      3
      ·
      7 months ago

      select only what you need and use limit

      you don’t know the structure of the contacts table, and do you really want christmas gifts to only go to the first x number of nice people?

      update contacts set name = ‘Grinch’ where name = ‘FellowHuman’;

  • Seasm0ke@lemmy.world
    link
    fedilink
    arrow-up
    8
    ·
    7 months ago

    He maintains when you are sleeping, he backs up while you’re awake. BEGIN TRANS so if your code is no good you can ROLLBACK your mistakes.

  • TDCN@feddit.dk
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    7 months ago

    This is mandatory to be posted every year for Christmas. Always makes me smile and sing along

  • Drbreen@sh.itjust.works
    link
    fedilink
    arrow-up
    2
    arrow-down
    10
    ·
    7 months ago

    What if the ignorances of the plenty curled up within the masses. But if the time was taken to count, in the end all that is forced will become infinity.