Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Creating a test football result database to learn

Author  Topic 

NickC
Yak Posting Veteran

68 Posts

Posted - 2011-09-15 : 19:48:49
Hello

Below is a proposed structure for a database I want to make to test if a, I can make a relationship database, build reports off. I figure its better to create something I enjoy.

Can people let me know if I have done this right, never created a database before, just usually report off them. I dont know muchabout relationships / foreign keys so any help would be amazing!

Sorry if this is the wrong section


FIFA Database

Player Information

UserID: AutoNumberPK
First Name: varchar(50)
Surname: varchar(50)
Owns Console: bit

Team Information
TeamID:AutoNumberPK
Name: varchar(50)
Country? varchar(50)
League: varchar(50)
Star Rating: decimal (1,2)

Match Details
MatchID: AutoNumberPK
SeriesNumber: SeriesID Integer
Team 1: TeamID Integer
Team 2: TeamID Integer
Player 1: UserID Integer
Player 2: UserID Integer
Player 3: UserID Integer
Player 4: UserID Integer
Match Result: Integer
Extra Time: bit
Penalties: bit
Referee: varchar(max)
Player1 Result (W/L/D/P) varchar(1)
Player2 Result (W/L/D/P) varchar(1)
Player3 Result (W/L/D/P) varchar(1)
Player4 Result (W/L/D/P) varchar(1)
Player 1 Scored: integer
Player 2 Scored: integer
Player 3 Scored: integer
Player 4 Scored: integer
Player 1 Red Cards: integer
Player 2 Red Cards: integer
Player 3 Red Cards: integer
Player 4 Red Cards: integer

Series Details
SeriesID:AutoNumberPK
MatchID1: Integer
MatchID2: Integer
MatchID3: Integer
MatchID4: Integer
MatchID5: Integer

chris_cs
Posting Yak Master

223 Posts

Posted - 2011-09-20 : 12:00:39
I'd consider breaking up the Match Details table. You should consider having a match table and a match details table.

What is the field Player 1 Scored trying to represent in the match details table?

Junior DBA learning the ropes
Go to Top of Page
   

- Advertisement -