Implementing a chess game database

Code, algorithms, languages, construction...
Post Reply
kevinfat
Posts: 13
Joined: Tue Aug 09, 2011 3:42 am

Implementing a chess game database

Post by kevinfat » Tue Aug 09, 2011 3:47 am

Does anyone know how chess game databases are implemented? What kind of on disk representations are used? What kind of in-memory data structures are used? And what are the tradeoffs that one needs to consider in regards to optimizing performance?

trojanfoe
Posts: 1
Joined: Sun Jul 31, 2011 10:33 am
Real Name: Andy Duplain

Re: Implementing a chess game database

Post by trojanfoe » Wed Aug 10, 2011 3:34 pm

This is a good question. The database needs to use a binary format that is efficient to update/insert/delete/search etc. You cannot use a text format, like PGN. There are a couple of formats already being used by free programs (like SCID), but I have no idea if they have any limitations.

If I were going to start a new format (and I have considered it in the past) I would consider using sqlite3 to provide the framework for player/event searching and perhaps storing the game data within a blob. All that would be required then is some method of improving position searching.

Andy

Post Reply