Professional Documents
Culture Documents
Video Game Collection: A Database by Alex Smith Bit 275 - Fall 2016 (Instructor: Craig Duckett)
Video Game Collection: A Database by Alex Smith Bit 275 - Fall 2016 (Instructor: Craig Duckett)
Games
Contains video games from my video game collection,
along with games on my wish list.
Platform
Contains all the platforms that are contained in the
Games table (e.g. Super Nintendo, PlayStation, etc.)
[one-to-many relationship]
Developer
A table containing video game developers seen in the
Games table. [one-to-many relationship]
Publisher
All the video game publishers shown in the Games
table. [one-to-many relationship]
Genres
All the video game genres seen in the Games table.
[one-to-many relationship]
Games Table CREATE TABLE [dbo].[Games]
GO
Joining Table CREATE TABLE [DBO].
[Developer]
Layout (
[ID] INT NOT NULL PRIMARY KEY
IDENTITY (1,1),
[DeveloperName] NVARCHAR(50)
NOT NULL
)
Select All AS
SELECT dbo.Games.GameName,
Games in dbo.Games.ReleaseDate,
dbo.Platform.PlatformName, dbo.Genres.Genre,
dbo.Developer.DeveloperName,
Table dbo.Publisher.PublisherName,
dbo.Games.Owned
FROM dbo.Games INNER JOIN
What dbo.Developer ON
dbo.Games.Developer = dbo.Developer.Id INNER
JOIN
games dbo.Genres ON
dbo.Games.GenreID = dbo.Genres.GenreID INNER
are in my JOIN
dbo.Platform ON
collection dbo.Games.Platform = dbo.Platform.Id INNER
JOIN
? dbo.Publisher ON
dbo.Games.Publisher = dbo.Publisher.Id
GO
Select All
Games Results
Select All SELECT dbo.Games.GameName,
Sony dbo.Games.ReleaseDate,
dbo.Platform.PlatformName,
Games dbo.Developer.DeveloperName,
dbo.Publisher.PublisherName,
dbo.Games.Owned
by Sony?
Select All Sony
Games Results
Stored QUICKLY INSERT DATA INTO
VARIOUS TABLES WITH
Procedures MINIMUM KEYSTROKES.
Insert into Joining Tables
Inserts (@GameName,
@ReleaseDate, @Platform,
@Developer, @Publisher, @Genre,
@Owned) into the Games table.
Games data