Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE DATABASE Exercise9
- GO
- USE Exercise9
- GO
- CREATE TABLE Genre (
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [Name] [nvarchar](256) NOT NULL,
- [Description] [nvarchar](max) NOT NULL,
- PRIMARY KEY ([Id])
- )
- GO
- SET IDENTITY_INSERT Genre ON
- GO
- INSERT INTO Genre (Id, [Name], [Description])
- VALUES
- (1, 'Rock', 'Otherwise known as ‘Rock & Roll,’ rock music has been a popular genre since the early 1950s.'),
- (2, 'Jazz', 'Identifiable with blues and swing notes, Jazz has origins in European and West African culture.'),
- (3, 'Electronic Dance Music', 'Typically referred to as EDM, this type of music is created by DJs who mix a range of beats and tones to create unique music.'),
- (4, 'Dubstep', 'Dubstep is an electronic dance music subgenre that originated in the late 1990s’ in South London.'),
- (5, 'Techno', 'Techno is yet another sub-genre of electronic dance music. This genre became popular in Germany towards the end of the 1980s and was heavily influenced by house music, funk, synthpop, and futuristic fiction.'),
- (6, 'Rhythm and Blues (R&B)', 'R & B is one of the world’s top music genres combining gospel, blues, and jazz influences.'),
- (7, 'Country', 'Country music is another one of the world’s top music genres. Originating in the 1920s, Country has its roots in western music and American folk.'),
- (8, 'Pop', 'The term ‘Pop’ is derived from the word ‘popular.’ Therefore, Pop music is a genre that contains music generally favored throughout society.'),
- (9, 'Indie Rock', 'In terms of genre, Indie Rock lies somewhere between pop music and rock and roll.'),
- (10, 'Electro', 'Electro blends electronic music and hip hop to create music that is similar to disco in sound.')
- GO
- SET IDENTITY_INSERT Genre OFF
- GO
- CREATE TABLE Song (
- Id int NOT NULL IDENTITY (1, 1),
- [Name] nvarchar(256) NOT NULL,
- [Year] int NULL,
- GenreId int NOT NULL,
- DeletedAt datetime2(7) NULL,
- CONSTRAINT PK_Song
- PRIMARY KEY (Id),
- CONSTRAINT FK_Song_Genre
- FOREIGN KEY(GenreId)
- REFERENCES dbo.Genre (Id)
- )
- SET IDENTITY_INSERT Song ON
- GO
- INSERT INTO Song (Id, [Name], [Year], GenreId, DeletedAt)
- VALUES
- (1, 'A-ha - Take On Me', 1985, 8, NULL),
- (2, 'Tina Turner - What''s Love Got to Do with It', 1984, 8, NULL),
- (3, 'Van Halen - Jump', 1984, 1, NULL),
- (4, 'Franz Ferdinand - Take Me Out', 2004, 9, NULL),
- (5, 'DJ Snake - Lean On', 2015, 10, NULL),
- (6, 'Louis Armstrong - What a Wonderful World', 1967, 2, NULL),
- (7, 'Deleted Song', 1967, 2, '2024-04-27 11:41:00')
- GO
- SET IDENTITY_INSERT Song OFF
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement