MySQL Forums
Forum List  »  Newbie

Re: Advice for card game database structure
Posted by: Peter Brawley
Date: February 21, 2022 08:56AM

> I could make a big string field in the player table and store all their cards in a comma separated list,

The worst possible idea. It breaks the fundamental rule of atomicity, one value per cell. Make yourself familiar with the basics of the relationa model, eg https://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch01.pdf

From your sketchy description of the requirement, you need tables for cards, for players, and for player_cards as Phil indicates. But that's just an initial impression, not a design. You won't know what else you need till you execute a database design method like https://www.artfulsoftware.com/dbdesignbasics.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Advice for card game database structure
February 21, 2022 08:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.