| Author |
Topic |
|
lilmoore1000
Starting Member
2 Posts |
Posted - 2012-05-01 : 00:11:27
|
Okay, i am creating a database for my CSIS class, i am confused by 1nf, 2nf, and 3nf in my own tables, i was wondering if some of you more experienced with SQL could take a look at my Tables and tell me if they are in these forms. They are very basic tables, about random things. thank you!!!GA GAME_NAME GAME_DEVELOPER RELEASE_D-- --------------- --------------- ---------1 Halo Reach Bungie 14-OCT-112 BattleField 3 Dice 25-OCT-113 Modern Warfare3 Activision 08-NOV-114 HomeFront THQ 15-MAR-115 Halo 4 343 Studios 06-NOV-12Second TableMLB_TEAM GAMES HR BA SLG-------------------- ----- ----- ---------- ----------Chicago White Sox 22 23 .241 .398Cleveland Indians 20 16 .244 .371Detroit Tigers 22 23 .243 .391Kansas City Royals 21 20 .263 .424Minnesota Twins 21 14 .266 .4Any feedback or help understanding these would be greatly help me  |
|
|
vinu.vijayan
Posting Yak Master
227 Posts |
Posted - 2012-05-01 : 06:04:50
|
| Your tables seem to be Normalized. Following are two links which helped me with Normalization. Hop they help you too:[url]http://www.phlonx.com/resources/nf3/[/url][url]http://www.bkent.net/Doc/simple5.htm[/url]N 28° 33' 11.93148"E 77° 14' 33.66384" |
 |
|
|
vijays3
Constraint Violating Yak Guru
354 Posts |
Posted - 2012-05-01 : 08:01:40
|
Table1: Create below table with foreign key reference to Tabl2 DeveloperId is a Foreign key GA GAME_NAME RELEASE_D DeveloperId -- --------------- --------------- ---------1 Bungie 14-OCT-11 012 3 Dice 25-OCT-11 023 Activision 08-NOV-11 034 THQ 15-MAR-11 045 343 Studios 06-NOV-12 05Table2: DeveloperId is a primary key key DeveloperId GAME_DEVELOPER 01 Halo Reach 02 BattleField03 Modern Warfare304 HomeFront05 Halo 4 Your first table is in Third normal form |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-01 : 10:14:55
|
quote: Originally posted by vijays3
Table1: Create below table with foreign key reference to Tabl2 DeveloperId is a Foreign key GA GAME_NAME RELEASE_D DeveloperId -- --------------- --------------- ---------1 Bungie 14-OCT-11 012 3 Dice 25-OCT-11 023 Activision 08-NOV-11 034 THQ 15-MAR-11 045 343 Studios 06-NOV-12 05Table2: DeveloperId is a primary key key DeveloperId GAME_DEVELOPER 01 Halo Reach 02 BattleField03 Modern Warfare304 HomeFront05 Halo 4 Your first table is in Third normal form
what if multiple developers were part of developing a game?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-01 : 10:17:51
|
| if relationship is many to many i would do design like Game (GA, GAME_NAME, RELEASE_D)Developer (DeveloperId, GAME_DEVELOPER )GameDeveloper (DeveloperId (fk to Developer.DeveloperId),GameID (fk to Game.GA))------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
vijays3
Constraint Violating Yak Guru
354 Posts |
Posted - 2012-05-01 : 10:29:41
|
quote: Originally posted by visakh16 if relationship is many to many i would do design like Game (GA, GAME_NAME, RELEASE_D)Developer (DeveloperId, GAME_DEVELOPER )GameDeveloper (DeveloperId (fk to Developer.DeveloperId),GameID (fk to Game.GA))------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Your design is correct ..I only though about single developer But in my case I can add extra column Like ID coulum Which can uniquely the records .See records 15 and 16 ID GA GAME_NAME RELEASE_D DeveloperId -- --------------- --------------- ---------11 1 Bungie 14-OCT-11 0112 2 3 Dice 25-OCT-11 0213 3 Activision 08-NOV-11 0314 4 THQ 15-MAR-11 0415 5 343 Studios 06-NOV-12 0516 5 343 Studios 06-NOV-12 06Please comment on this . |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-01 : 10:40:00
|
| this is also not fully normalised as you've all details for the game repeated for every developer who was part of development team. This can still cause update anomalies------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
vijays3
Constraint Violating Yak Guru
354 Posts |
Posted - 2012-05-01 : 11:26:40
|
quote: Originally posted by visakh16 this is also not fully normalised as you've all details for the game repeated for every developer who was part of development team. This can still cause update anomalies------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Yes you are correct ..I will go with your design .Thanks for the comment |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-01 : 11:58:31
|
quote: Originally posted by vijays3
quote: Originally posted by visakh16 this is also not fully normalised as you've all details for the game repeated for every developer who was part of development team. This can still cause update anomalies------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Yes you are correct ..I will go with your design .Thanks for the comment
No problem you're welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|