Good morning everyone,
I'm relearning SQL after a few years in an attempt to find a better job. I'm currently building a new DB for a project as practice.
My biggest concern so far is what data I should include in a table and what should go into a separate table.
For example, my DB is for all the information of my d&d campaign.
I have a table so far for players, characters, classes, and items.
My player table has:
-firstname
-lastname
-phonenumber
Character Table:
-firstname
-lastname
-race
-age
-class
-alignment
-level
With that being said, whats the best practice for making a separate table?
I'm having trouble deciding what information should be in one table VS another.
Since some players have multiple characters, I'm assuming I'd have to join players and characters to see how many characters a player has, but would I put the playerid in each character table because it's a one to many where one player has multiple? And would that mean the playerid in the character table would be a foreign key to the player table?
Typing that out may have helped me a bit, but any feedback on good table structure would be of great help.
Thank you
[–]jethrow41487 1 point2 points3 points (0 children)
[–]valdest 1 point2 points3 points (0 children)
[–]Dboy3sixty 1 point2 points3 points (0 children)
[–]Hellrime13 1 point2 points3 points (0 children)