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.
Author |
Topic |
NickC
Yak Posting Veteran
68 Posts |
Posted - 2011-09-15 : 19:48:49
|
HelloBelow 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 sectionFIFA DatabasePlayer InformationUserID: AutoNumberPKFirst Name: varchar(50)Surname: varchar(50)Owns Console: bitTeam InformationTeamID:AutoNumberPKName: varchar(50)Country? varchar(50)League: varchar(50)Star Rating: decimal (1,2)Match DetailsMatchID: AutoNumberPKSeriesNumber: SeriesID IntegerTeam 1: TeamID IntegerTeam 2: TeamID IntegerPlayer 1: UserID IntegerPlayer 2: UserID IntegerPlayer 3: UserID IntegerPlayer 4: UserID IntegerMatch Result: IntegerExtra Time: bitPenalties: bitReferee: 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 DetailsSeriesID:AutoNumberPKMatchID1: 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 |
|
|
|
|
|