Im trying to create a database of tables. The tables are City, VideoGameStore, VideoGame, Console, Accessory, Employee. Each one of these has its on attributes. I am wanting to know if I am doing this correctly. I am coding in SQL *Plus in Oracle 10g.
CODE
drop table videogame
drop table videogamestore
drop table city
drop table console
drop table accessory
drop table employee
spool c:\results.txt
create table videogame(GID integer, Game System char(10),
Game Title char(30), Game Genre char(15),
Game Rating char(15), Game Cost float,
Game Developer char(20),
primary key(GID));
insert into videogame values (0000, Xbox 360, Gears of War, Shooter, Mature, $59.99, Epic Games)
insert into videogame values (0001, Xbox 360, Call of Duty, Shooter, Teen, $59.99, Treyarch Invention)
insert into videogame values (0002, Xbox 360, WWE SVR, Sports, Teen, $59.99, THQ)
insert into videogame values (0003, Xbox 360, College Hoops 2K7, Sports, Everyone, $59.99, 2K Sports)
insert into videogame values (0004, Xbox 360, Marvel:Ultimate Alliance, Action, Teen, $59.99, Raven Software)
insert into videogame values (0006, Xbox 360, Superman Returns: The Video Game, Action, Everyone, $59.99, EA Tiburon)
insert into videogame values (0007, Xbox 360, Enchanted Arms, Role Playing, Teen, $59.99, Edge Works)
insert into videogame values (0008, Xbox 360, Lost Odyssey, Role Playing, Teen, $59.99, Mistwalker)
insert into videogame values (0009, Xbox 360, Madden NFL 2007, Sports, Everyone, $59.99, EA Sports)
insert into videogame values (0010, Xbox 360, NCAA Football 2007, Sports, Everyone, $59.99, EA Sports)
insert into videogame values (0011, Xbox 360, Tiger Woods PGA Tour 2007, Sports, Everyone, $59.99, EA Sports)
insert into videogame values (0012, Xbox 360, Open Season, Adventure, Everyone, $49.99, Ubi Soft)
insert into videogame values (0013, Xbox 360, Sonic The HedgeHog, Adventure, Everyone, $59.99, Sega of America)
insert into videogame values (0014, PS3, Madden NFL 2007, Sports, Everyone, $59.99, EA Sports)
insert into videogame values (0015, PS3, NCAA Football 2007, Sports, Everyone, $59.99, EA Sports)
insert into videogame values (0016, PS3, Tiger Woods PGA Tour 2007, Sports, Everyone, $59.99, EA Sports)
insert into videogame values (0017, PS3, Fight Night Round 3, Sports, Teen, $59.99, EA Sports)
insert into videogame values (0018, PS3, Virtual Fighter 5, Fighting, Teen, $59.99, Sega of America)
insert into videogame values (0019, PS3, The GetAway 3, Action, Mature, $59.99, SCEA)
insert into videogame values (0020, PS3, Need For Speen: Carbon, Racing, Everyone, $59.99, Electronic Arts)
insert into videogame values (0021, PS3, Grand Turismo HD, Racing, Everyone, $59.99, Polyphony Digital)
insert into videogame values (0022, PS3, Marvel:Ultimate Alliance, Role Playing, Teen, $59.99, Raven Software)
insert into videogame values (0023, PS3, Superman Returns: The Video Game, Action, Everyone, $59.99, EA Tiburon)
insert into videogame values (0024, PS3, Grand Theft Auto IV, Action, Mature, $59.99, Rockstar Games)
insert into videogame values (0025, PS3, Tony Hawk Project 8, Sports, Teen, $59.99, Neversoft)
insert into videogame values (0026, PS3, Tekken 6, Fighting, Teen, $59.99, Namco)
insert into videogame values (0027, PS2, WWE SVR, Sports, Teen, $49.99, THQ)
insert into videogame values (0028, PS2, Madden NFL 2007, Sports, Everyone, $39.99, EA Sports)
insert into videogame values (0029, PS2, NCAA Football 2007, Sports, Everyone, $39.99, EA Sports)
insert into videogame values (0030, PS2, Tony Hawk Project 8, Sports, Teen, $49.99, Neversoft)
insert into videogame values (0031, PS2, Need For Speen: Carbon, Racing, Everyone, $39.99, Electronic Arts)
insert into videogame values (0032, PS2, Mortal Kombat:Armageddon, Fighting, Mature, $39.99, Midway)
insert into videogame values (0033, PS2, Scarface, Action, Mature, $49.99, Radical Entertainment)
insert into videogame values (0034, PS2, Cars, Adventure, Everyone, $29.99, Rainbow Studios)
insert into videogame values (0035, PS2, Shrek 2, Adventure, Everyone, $25.99, Activision)
insert into videogame values (0036, Nintendo Wii, Cars, Adventure, Everyone, $49.99, Rainbow Studios)
insert into videogame values (0037, Nintendo Wii, Need For Speen: Carbon, Racing, Everyone, $49.99, Electronic Arts)
insert into videogame values (0038, Nintendo Wii, Madden NFL 2007, Sports, Everyone, $49.99, EA Sports)
insert into videogame values (0039, Nintendo Wii, Marvel:Ultimate Alliance, Role Playing, Teen, $49.99, Raven Software)
insert into videogame values (0040, Nintendo Wii, DragonBall Z BT2, Fighting, Teen, $49.99, Atari)
insert into videogame values (0041, Nintendo Wii, Open Season, Adventure, Everyone, $49.99, Ubi Soft)
insert into videogame values (0042, Nintendo Wii, BarnYard, Adventure, Everyone, $49.99, THQ)
insert into videogame values (0043, Nintendo Wii, Ice Age 2:The Meltdown, Adventure, Everyone, $49.99, Vivendi Games)
insert into videogame values (0044, Nintendo Wii, Tiger Woods PGA Tour 2007, Sports, Everyone, $49.99, EA Sports)
insert into videogame values (0045, Nintendo Wii, Sonic The Secret Rings, Adventure, Everyone, $49.99, Sega of America)
insert into videogame values (0046, Nintendo Wii, Super Smash Brothers Brawl, Fighting, Everyone, $49.99, Nintendo)
insert into videogame values (0047, Nintendo Wii, Call of Duty, Shooter, Teen, $49.99, Treyarch Invention)
insert into videogame values (0048, Nintendo Wii, SpongeBob SquarePants, Action, Everyone, $49.99, THQ)
insert into videogame values (0049, Nintendo Wii, The Ant Bully, Adventure, Everyone, $49.99, Midway)
insert into videogame values (0050, Nintendo Wii, Tony Hawk's Downhill Jam, Sports, Everyone, $49.99, Activision)
insert into videogame values (0051, Nintendo Wii, NBA Live 2007, Sports, Everyone, $49.99, EA Sports)
create table city(CityID integer, City Name char(20)
primary key(CityID));
insert into City values (1000, 'Baton Rouge')
insert into City values (1001, 'Baker')
insert into City values (1002, 'Port Allen')
insert into City values (1003, 'New Orleans')
insert into City values (1004, 'Shreveport')
insert into City values (1005, 'Lake Charles')
insert into City values (1006, 'Lafayette')
insert into City values (1007, 'Opeleausas')
create table videogamestore(SID integer, Store Name char(20)
primary key(SID));
insert into videogamestore values (2000, 'Gamestop')
insert into videogamestore values (2001, 'Games R Us')
insert into videogamestore values (2002, 'Video Game City')
insert into videogamestore values (2003, 'GameBusters')
insert into videogamestore values (2004, 'Game Showcase')
insert into videogamestore values (2005, 'Game Palace')
insert into videogamestore values (2006, 'Video Game Haven')
create table console(CID integer, Console Name char(15),
Cost float, Manuf Name char(25),
primary key(CID));
insert into console values (3000, 'PS2', $149.99, 'Sony')
insert into console values (3001, 'PS3', $699.99, 'Sony')
insert into console values (3002, 'Xbox 360', $399.99, 'Microsoft')
insert into console values (3003, 'Nintendo Wii', $259.99, 'Nintendo')
create table accessory(AID integer, Acces. Name char(15),
Console Name char(15), Acces. Cost float,
Manuf Name char(25), primary key(AID));
insert into accessory values (4000, 'Controller', 'PS2', $14.99, 'Sony')
insert into accessory values (4001, 'Controller', 'PS2', $9.99, 'Mad Catz')
insert into accessory values (4002, 'Controller', 'Xbox 360', $14.99, 'Microsoft')
insert into accessory values (4003, 'Controller', 'Xbox 360', $9.99, 'Mad Catz')
insert into accessory values (4004, 'Controller', 'PS3', $29.99, 'Sony')
insert into accessory values (4005, 'Controller', 'PS3', $25.99, 'Mad Catz')
insert into accessory values (4006, 'Controller', 'Nintendo Wii', $19.99, 'Nintendo')
insert into accessory values (4007, 'Controller', 'Nintendo Wii', $9.99, 'Mad Catz')
insert into accessory values (4008, 'Memory Card', 'PS2', $14.99, 'Sony')
insert into accessory values (4009, 'Memory Card', 'PS2', $9.99, 'Mad Catz')
insert into accessory values (4010, 'Memory Card', 'Xbox 360', $24.99, 'Microsoft')
insert into accessory values (4011, 'Memory Card', 'Xbox 360', $14.99, 'Mad Catz')
insert into accessory values (4012, 'Memory Card', 'PS3', $29.99, 'Sony')
insert into accessory values (4013, 'Memory Card', 'PS3', $25.99, 'Mad Catz')
insert into accessory values (4014, 'Memory Card', 'Nintendo Wii', $14.99, 'Nintendo')
insert into accessory values (4015, 'Memory Card', 'Nintendo Wii', $9.99, 'Mad Catz')
create table employee(EID integer, Lname char(15),
Fname char(15), SID integer,
Store Name char(20), CID integer,
City Name char(20),
primary key(EID));
insert into employee values (5000, 'Smith', 'John', 2000, 'Gamestop', 1005, 'Lake Charles')
insert into employee values (5001, 'Taylor', 'Sallie', 2003, 'GameBusters', 1007, 'Opeleausas')
insert into employee values (5002, 'Jones', 'Ryan', 2006, 'Video Game Haven', 1000, 'Baton Rouge')
insert into employee values (5003, 'Walker', 'Shawn', 2003, 'GameBusters', 1007, 'Opeleausas')
insert into employee values (5004, 'Combs', 'Sean', 2000, 'Gamestop', 1000, 'Baton Rouge')
insert into employee values (5005, 'Carter', 'Sean', 2000, 'Gamestop', 1000, 'Baton Rouge')
insert into employee values (5006, 'Dorsey', 'Chris', 2001, 'Games R Us', 1003, 'New Orleans')
insert into employee values (5007, 'Carter', 'Dwayne', 2004, 'Game Showcase', 1001, 'Baker')
insert into employee values (5008, 'Tapp', 'James', 2002, 'Video Game City', 1003, 'New Orleans')
insert into employee values (5009, 'Gray', 'Terius', 2002, 'Video Game City', 1003, 'New Orleans')
insert into employee values (5010, 'Bishop', 'Eric', 2005, 'Game Palace', 1002, 'Port Allen')
insert into employee values (5011, 'Young', 'Andre', 2000, 'Gamestop', 1005, 'Lake Charles')
insert into employee values (5012, 'Simmons', 'Earl', 2005, 'Game Palace', 1002, 'Port Allen')
insert into employee values (5013, 'Miller', 'Corey', 2006, 'Video Game Haven', 1000, 'Baton Rouge')
insert into employee values (5014, 'Crump', 'Levell', 2001, 'Games R Us', 1003, 'New Orleans')
insert into employee values (5015, 'Stevens', 'Earl', 2004, 'Game Showcase', 1001, 'Baker')
insert into employee values (5016, 'Weston', 'Wesley', 2003, 'GameBusters', 1004, 'Shreveport')
insert into employee values (5017, 'Miller', 'Percy', 2003, 'GameBusters', 1004, 'Shreveport')
insert into employee values (5018, 'Tyler', 'Michael', 2000, 'Gamestop', 1006, 'Lafayette')
insert into employee values (5019, 'Shakur', 'Tupac', 2000, 'Gamestop', 1006, 'Lafayette')