Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'd like to create a database to store information about events with the following details for each record:

Event, Player 1 name, Player 2 name, Final score

Round 1:
Date, location, Important detail 1, Important detail 2

Round 2:
Date, location, Important detail 1, Important detail 2

Could someone tell me how this would translate to a mySQL database please? I mean by that a suitable database name, whether I need one or multiple tables, what fields I need to create.

I might be over-complicating things in my mind, but I'm wondering if there are "layers" in a database or whether I would just have individual fields such as round1 date, round1 location, ...., round2 date etc, as opposed to something like event1 rounds with sub tables for each round.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
175 views
Welcome To Ask or Share your Answers For Others

1 Answer

When naming database it is normally project or company name. in this case your game name

for keeping data you need to consider normalization rules. from that you can think how many tables and which table data should go. in this case one event has multiple rounds

when naming tables i prefer prefixing parent so things can be find easily.

So putting altogether

Database name: company/game name

event
event_id(unique), player 1, player 2, final score ,

event_round
event_id, round_id(unique), round number, date, location,

event_round_important
round_id, important_data,


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...