Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request option to search a database for games where one of the players have at least a specified elo. #33

Open
Jonathan003 opened this issue Mar 6, 2022 · 1 comment

Comments

@Jonathan003
Copy link

I would like to specify somehow that only one player have to have an elo rating of minimum 2000 elo, for example.
So, games where one player has for example 1400 elo and the other player has 2100 elo would also be included.
Is it possible to search an ocgdb database for these games with Banksia?

@nguyenpham
Copy link
Owner

nguyenpham commented Mar 7, 2022

One of the strongest points of OCGDB is that it creates and works with SQL databases. Those databases can be queried/modified easily by using SQL - the strongest query language for databases. It is very flexible and covers almost all things, far beyond all functions we could implement and provide for users. SQL is quite close to English, not hard to learn, easy to understand and modify.

SQL could run with other programs, not requiring our programs. Below is the screen of the program SQLiteStudio (a freeware) working with our chess database, find and display all games as your request (one player has Elo from 2000).

SQL statement:

SELECT *
FROM Games
WHERE WhiteElo >= 2000 OR BlackElo >= 2000

Result:

SQLiteStudio

The main drawback of using normal SQL programs is that they don’t know about chess and can’t display chessboard or extract PGN. Users may copy the game ID then run OCGDB to extract PGN.

Another solution is to use chess GUIs that integrate OCGDB. Below is a screen from BanksiaGUI (which has been being integrated with OCGDB). After querying, users can click on any line in the table and the GUI will display the appropriate game.

BSG

If anyone is new to SQL, he can ask here. We or anyone who could help will create the SQL query (just a short text of a few lines), which he can copy to his programs and modify as needed (say, change the number of Elo, replace OR by AND…).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants