I had the idea of building a working Chess game using purely SQL.
The chess framing is a bit of a trojan horse, honestly. The actual point is that SQL can represent any stateful 2D grid. Calendars, heatmaps, seating plans, game of life. The schema is always the same: two coordinate columns and a value. The pivot query doesn't change.
A few people have asked why not just use a 64-char string or an array type. You could! But you lose all the relational goodness: joins, aggregations, filtering by piece type. SELECT COUNT(*) FROM board WHERE piece = '♙' just works.
I'm still working on an idea to have a "state" check to know when checkmate happens but that's gonna take a wee bit more time.
But, the idea is very novel and very thought provoking and has provided me with a refreshing distraction from the boring problem I was working on before seeing your post.
I'd never heard of dbpro.app until now - and this article is just so awesome.
Nice job!
i once published a "translation" of the Opera Game (chess annotation as a literary device) after reading too much Lautremont so it is disgusting
> Let's build it.
Cool concept; but every blog post sounds exactly the same nowadays. I mean it’s like they are all written by the exact same person /s