-1

Assuming a table with the following columns

UserID, UserName, Console, GameID, 
GameTitle, GameVendor, VendorCountry, Game Genre, NumberOfPlayers

Is this the correct 3NF?

Users(UserID,UserName, Console)

Games(GameID,GameVendor,GameTitle,GameGenre,NumberOfPlayers)

Vendors(GameVendor, VendorCountry)
  • 2
    That depends on the semantics of the columns. Can you explain what the columns mean? – Laurenz Albe Oct 22 at 16:07
1

None column can depend of non-key columns and need depend exclusive of primary key. That is, The third normal form states that you should eliminate fields in a table that do not depend on the key.

To be in the third normal form the entity must be meeting 2FN and 1FN.

Obviously, if you want to get a better answer you need inform more details of scope to we understand of what is being designed and the purpose of each column.

However, based on the information what you put in your question, the console does not depend on the user ID in the USERS table. So, I Believe that there must have more tables to controls console information:

CONSOLE(id, type)

GAME_GENRE(id,type)

GAMES(id,gameVendor,gameTitle,gameGenreId,numberOfPlayer)

CONSOLE_GAME(id, consoleId, gameId)

USERS(id,userName, consoleId)

VENDOR(gameVendor, vendorCountry)

Notice that I has created a entity called GAME_GENRE. Is a good pratick is padronize the datas with category tables.

I recommend a quick read of this links:

Both links has examples

There are other speeches with examples on this topic:

  • 1
    I agree with your overall ideas. A note to add for the very new and students, is that you added foreign key constraints and lookup tables for GAME_GENRE and CONSOLE. That isn't necessarily required as far as normalization, but is a good practice to save space in larger tables, and to reduce the chances of problems like hyphens and mistakes in spellings. An example is having a console of "XBox", "X-Box", and "X Box". All three mean the same thing to a person, but a query would get tripped up by that. Having a lookup table would mean only one time the console name gets spelled out – John Herbert Oct 22 at 14:35
  • @JohnHerbert Thanks for the collaboration. I wanted exemplify that (>>Notice that I has created a entity called GAME_GENRE. Is a good pratick is padronize the datas with category tables.<<) but I think don't I made that clear in my answer. Thank you. – Leonardo Lacerda Oct 22 at 14:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.