Index - Contents - Home

Database Maintenance

Most Scid Database maintenance can be done from the Maintenance Window (Control+m).

Operations include - using Delete (and other Game Flags), Spellcheck Names, Compact and Sort databases, and delete PGN Tags, Comments and Variations.

Flags, Compaction and Sorting features are documented separately.

Deleting Twin Games

Delete Twin Games facilitates removal of duplicate games. It identifies game twins, and flags one as deleted. Two games are considered twins if their Players, and any other tags that you specify, exactly match. If you specify the "Same moves" option (strongly recommended) each pair must have the same moves; up to the length of the shorter game , or 60 moves maximum.

When you have identified twins, it is good practice to confirm they have been correctly marked. Selecting "Set filter to twins to be deleted" allows easy perusal through the Twin Game Checker window (which automatically appears). Here, tag differences are highlighted, and Scid vs. PC shows a inline comparison of game variations and comments.

Use the Arrow Keys to progress through the games, "1", "2" and "t" keys to toggle the Delete Fields, and "u" to Undelete both games.

To actually delete the games, you must compact the database.

Editing Names

The Name Editor is a tool to selectively edit entity names (eg Player names).

Each unique name is only stored once in the name file, so changing a name actually changes all occurrences of it. Similarly, some names in the name file may not actually be used. To remove such names, perform a namebase compaction.

An single asterisk '*' may be used to match any name. This global substitution is only available for the Event, Site and Round names - not the Player, Elo or Date names.

Date and Eventdate fields must be of the form YYYY.MM.DD (year, month, day)

Please take care when using the Name Editor. Changes are not properly undoable if the new name already exists. There is also a safety mechanism - Using '*' or '?' is not allowed with 'All games in database'.

Spellcheck File

The spellcheck file spelling.ssp contains information about Player Names, Titles, Birth & Death dates, and Country(s) of origin. Please use with caution. The names it contains may not be unique, and player initials may be incorrectly identified. It is also possible to substitute the larger ratings.ssp, which includes Elo ratings and FIDE Biographical data.

The file should be loaded on startup, or can be loaded manually. Updated versions are available at the Scid Website.

Spell Checking

Scid's Spell Checking feature is used to standardize Player, Event, Site and Round names throughout a database. To do so, a spelling file must be loaded.

When Spell Check is run, a list of proposed corrections is produced. These should be perused and edited before actually making the corrections on disk. The normal keyboard shortcuts for Cut, Copy, Paste, Undo and Redo apply.

The format of each correction is:
"Old Name" > > "New Name" (N) Birthdate--Deathdate
There should be no space before "Old Name", and "N" represents the number of games matching the original player name.

One may discard any correction by deleting it, or adding a space or any other character at the start of the line. Player names with a surname only do not get corrected by default. Simliarly , Ambiguous name substitutions are not performed unless one manually removes the Ambiguous prefix from each line.

Name substitution will not occur in games dated before the Player's birth, or after death - unless the birth and death dates are removed from the translation.

For problematic PGN files, it may be necessary to use regexps and a word processor such as "vi". For example - the first two examples remove four digit ELOs from player names. The last removes trailing spaces from all tags.
:%s/\(White .*\) *[[:digit:]][[:digit:]][[:digit:]][[:digit:]].*"/\1"/g
:%s/\(Black .*\) *[[:digit:]][[:digit:]][[:digit:]][[:digit:]].*"/\1"/g
:%s/ *"]$/"]/

Adding Elo Ratings

The spelling file ratings.ssp contains ELO / Date information for rated players. The Add Elo Ratings button (in the Maintenance window) searches games and adds the appropriate ELO rating at the date of the game. There is also the option to overwrite existing ratings.

The spellcheck file provided with Scid does not contain the Elo rating information needed for this function. Instead, the larger ratings.ssp file should be used.

Ratings are not added to games with known aliases. One may wish to run the Spell Checker first, which changes names using player aliases.

The Cleaner

The Cleaner window is a tool for doing a number of maintenance tasks at one time. You can choose which tasks you want to do, and Scid will perform them on the current database without requiring user interaction. This is especially useful for maintenance of large databases.

Autoloading a Game

When a database is opened, one may automatically load a particular game using the Maintenance Autoload game feature. Note: Because of design of si4 header, this number's upper limit is 16,777,214 (Approximately 2^(8*3)).

Strip Comments/Variations

Use with caution. Bulk stripping Comments and Variations cannot be undone.

Strip Extra Tags

This feature scans the database for extra PGN tags (such as "Annotator"). Then, one may strip these tags, or adjust the filter to show the matching games.

Check Games

This feature performs basic checks on every game/filter games.

Each Game
* Has index entry fetched
* Read from disk
* And is Decoded.

Any errors are reported.

Repair a Base

In the rare case that a Scid Database is corrupted, one might try to repair it using Tools--> Maintenance--> Repair base. For this to work, the base in question must not be opened (which is not possible in most cases anyway). Scid will then try its best to get the database back in a consistent and usable state.

Updated: Scid vs. PC 4.17, August 2016