Presentation is loading. Please wait.

Presentation is loading. Please wait.

What list of information would you need to buy the correct game?

Similar presentations


Presentation on theme: "What list of information would you need to buy the correct game?"— Presentation transcript:

1

2

3 What list of information would you need to buy the correct game?

4 Platform PS3 Fallout 3 Title Version Game of year edition Do these pieces of information uniquely identify this game? How else could we uniquely identify this game? GameID 1202 No other game will have the same ID No other game will have the same ID

5 Unique identifiers for the game could be: Title + Version + Platform GameID or a combination of Key Composite Key What do we call the pieces of information that uniquely identify the game ?

6 We can use keys to find game information from different sources: Gamereviews GamePrices Title + Version + Platform Title + Version + Platform £

7

8 Steve Kim Jo Gamer: Games: How many games could Steve own? How many people could own Modern Warfare”?

9 1 gamer can have many games 1 gamer can have many games many gamers can have the same game many gamers can have the same game GamerGame many to many relationship (n:n) many to many relationship (n:n) What kind of relationship is this?

10

11

12

13 Modern Warfare 2 Bioshock Tomb Raider Fable II Using these lists would you be able to buy the correct game & send it to the correct gamer? Kim Steve Jo

14 Platform X360 Title Modern Warfare 2 GameID 5426 CompanyName Infinity Ward Modern Warfare 2 Bioshock Tomb Raider Fable II

15 GameID Title Platform Company Name 5426 2112 1110 7003 1110 Modern Warfare 2 Fable II Tomb Raider Bioshock Tomb Raider X360 Infinity Ward LionHead EIDOS 2K EIDOS Game list has information that uniquely identifies the game e.g. GameID Modern Warfare 2 Bioshock Tomb Raider Fable II

16 Steve Lonely GamerID 9089 A unique GamerID would be ideal !! A unique GamerID would be ideal !! Name 23 Jan 1980 DateofBirth Kim Steve Jo

17 GamerID Name DateofBirth Steve Lonely23 Jan 19809089 Kim Newbie10 Mar 19913120 Jo Headshot31 Dec 19687707 Gamer list has information that uniquely identifies the gamer e.g. GamerID Kim Steve Jo

18 GamerID Name DateofBirth Steve Lonely23 Jan 19809089 Kim Newbie10 Mar 19913120 Jo Headshot31 Dec 19687707 GameID Title Platform Company Name 5426 2112 1110 7003 1110 Modern Warfare 2 Fable II Tomb Raider Bioshock Tomb Raider X360 Infinity Ward LionHead EIDOS 2K EIDOS Which gamer wants which game?

19 Modern Warfare 2 Bioshock Tomb Raider Steve

20 Steve - Modern Warfare, Bioshock, Tomb Raider Write all games in a line against Steves name …. How do we add games to the list ?

21 GamerID Name DateofBirth Steve Lonely23 Jan 19809089 This is called a ‘repeating’ field … GameID 5426 GameID 1110 GameID 7003 GameID 1910 GameID 4410 GameID 2010 GameID 9910 GameID 12310 GameID 1210

22 Steve - Modern Warfare Steve – Bioshock Steve - Tomb Raider Write Steves name against each game.. How do we add games to the list ?

23 GamerID Name DateofBirth Steve Lonely 23 Jan 1980 90895426 1110 7003Steve Lonely 23 Jan 1980 9089 Steve Lonely 23 Jan 1980 9089 GameID 980Steve Lonely 23 Jan 1980 90897720Steve Lonely 23 Jan 1980 9089

24 Steve – Modern Warfare 2, Bioshock, Tomb Raider… Steve - Modern Warfare 2 Steve - Bioshock Steve - Tomb Raider OR

25 Step 1 of the normalisation process ‘Avoid repeating fields when linking lists/tables’

26

27 GamerID Name DateofBirth Steve Lonely23 Jan 19809089 GameID Title Platform Company Name 5426 1110 7003 Modern Warfare 2 Tomb Raider Bioshock X360 Infinity Ward EIDOS 2K We have a link – is there a problem? GameID 5426

28 GamerID Name DateofBirth GameID Key field GamerID Repeating field GameID make the repeating field part of the key …GamerIDGameID

29 GamerID Name DateofBirth Steve Lonely 23 Jan 1980 90895426 1110 7003Steve Lonely 23 Jan 1980 9089 Steve Lonely 23 Jan 1980 9089 GameID 980Steve Lonely 23 Jan 1980 90897720Steve Lonely 23 Jan 1980 9089 Good design No repeating fields !!

30 Step 2 of the normalisation process ‘non key fields should depend upon all parts of the key’

31 GamerID Name DateofBirth Steve Lonely 23 Jan 1980 90895426 1110 7003Steve Lonely 23 Jan 1980 9089 Steve Lonely 23 Jan 1980 9089 GameID 980Steve Lonely 23 Jan 1980 9089 7720Steve Lonely 23 Jan 1980 9089 Is ‘DateofBirth’ Gamer data or Game data or both? Is ‘Name’ Gamer data or Game data or both? Gamer only ! (GamerID) (GamerID) non key fields depend on just a bit of the key not all of it !!!.. we can improve this design.. … but whats the point …. ? To remove all that duplicate data !!!!

32 5426 1110 7003 GameID 980 7720 Name DateofBirth Steve Lonely 23 Jan 1980 Steve Lonely 23 Jan 1980 Steve Lonely 23 Jan 1980 Steve Lonely 23 Jan 1980 Steve Lonely 23 Jan 1980 GamerID 9089 GamerID Name DateofBirth Steve Lonely23 Jan 19809089 But what about the GameID field? 5426 1110 7003 GameID 980 7720 GameID needs to remain with the GamerID to keep the link between games and gamers

33 GamerID Name DateofBirth Steve Lonely 23 Jan 1980 90895426 1110 7003Steve Lonely 23 Jan 1980 9089 Steve Lonely 23 Jan 1980 9089 GameID 980Steve Lonely 23 Jan 1980 9089 7720Steve Lonely 23 Jan 1980 9089 GamerID Name DateofBirth Steve Lonely23 Jan 19809089 5426 1110 7003 GameID 980 7720 GamerID 9089 original tablebecomes

34 GamerID Name DateofBirth Steve Lonely23 Jan 19809089 5426 1110 7003 GameID 980 7720 GamerID 9089 GameID Title Platform Company ID 5426 1110 7003 Modern Warfare 2 Tomb Raider Bioshock X360 4322 1120 5422 980Dead SpaceX3600922 7720GOWX3608727 Company Name Infinity Ward EIDOS 2K EA EPIC

35 Step 3 of the normalisation process ‘remove non key dependencies’

36 GameID Title Platform Company ID 5426 Etc. 7003 Modern Warfare 2 Bioshock X360 4322 5422 Company Name Infinity Ward 2K CompanyName is dependent upon ComanyID not GameID Move CompanyName to its own table

37 GameID Title Platform Company ID 5426 Etc. 7003 Modern Warfare 2 Bioshock X360 4322 5422 Company Name Infinity Ward 2K GameID Title Platform Company ID 5426 Etc. 7003 Modern Warfare 2 Bioshock X360 4322 5422 Company ID 4322 5422 Company Name Infinity Ward 2K becomes 2 tables

38


Download ppt "What list of information would you need to buy the correct game?"

Similar presentations


Ads by Google