• luciferofastora@feddit.org
      link
      fedilink
      arrow-up
      4
      ·
      3 hours ago

      Legacy system. Someone once started curating two spreadsheets for each year because they didn’t know better. They had different formats too, because the naughty one listed separate entries for each naughty deed and a column describing it. Whenever they added something to that list, they manually checked and deleted the kid from the nice list.

      Eventually, the amount of children they’re responsible for got too large, so they learned some basic SQL and built themselves a database. To import the legacy lists and keep their workflow, they built separate tables. Just be glad they eventually learned how to filter by year and stopped creating new schemas for every year.

    • ilinamorato@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      8 hours ago

      Relational database. He’s got children, which joins tonaughty and nice on childid and both record their status each year so that he can monitor trends.

    • unalivejoy@lemmy.zip
      link
      fedilink
      arrow-up
      75
      arrow-down
      1
      ·
      edit-2
      11 hours ago

      I would make two separate views.

      CREATE VIEW NiceList AS
       SELECT * FROM Children
        WHERE behavior = 'nice' 
         AND parent.income > 40000; 
      CREATE VIEW NaughtyList AS
       SELECT * FROM Children
        WHERE behavior = 'naughty';