简体   繁体   中英

Databases for chess games

A previous question wanted to save each move to a database as a game of chess plays out. And asked what database to use to do this. Various possibilities were given:

MongoDb, CouchDb, MySql, SQLite

One answer in particular mentioned a traditional one to many mapping:

The only advantage I can see to a mongodb or couchdb is that you could conceivably store the entire match in a single record, thus making your data a little simpler. You wouldn't have to do the traditional one to many mapping between moves table and a game table.

What exactly does this mean and what would this look like in say PostgreSql so I have a concrete idea of what this means?

Below example Entity Relationship Diagram based on SQL 2005, but with some tweaks to datatypes it can be transferred to MySql or PostgreSql.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM