Сайт кафедры ИТСайт кафедры ИТ
Направления подготовки
Учебные материалы
О кафедре
На главнуюGitHub
Направления подготовки
Учебные материалы
О кафедре
  • ОП.08 - Практический экзамен - Вариант №1

ОП.08 - Практический экзамен - Вариант №1

База данных музыкальной коллекции

Необходимо разработать БД, в которой должны быть отражены следующие сущности:

  • Сущность «Альбом»
    • Атрибут «Название альбома»
    • Атрибут «Дата выпуска альбома»
  • Сущность «Исполнитель»
    • Атрибут «Имя исполнителя» (название группы)
  • Сущность «Композиция»
    • Атрибут «Наименование композиции» (название песни)
  • Сущность «Жанр»
    • Атрибут «Название жанра»

При этом, учесть, что:

  • У исполнителя может быть несколько альбомов
  • У композиции всегда только один исполнитель
  • В альбоме может находиться одна или несколько композиций, но при этом конкретная композиция может находиться только в одном альбоме
  • У композиции может быть указан только один жанр

Необходимо четко указывать названия таблиц и полей, в которые будет занесена информация.

Необходимо импортировать в созданную БД данные:

exam_var_1_data.sql
DROP TABLE IF EXISTS tmp;
CREATE TABLE IF NOT EXISTS tmp(
  id       INTEGER  NOT NULL  PRIMARY KEY  AUTO_INCREMENT
  ,song    VARCHAR(255)
  ,artist  VARCHAR(255)
  ,year    INTEGER
  ,album   VARCHAR(255)
  ,genre   VARCHAR(255)
);
INSERT INTO tmp(song,artist,year,album,genre) VALUES
 ('Smells Like Teen Spirit','Nirvana',1991,'Nevermind','Grunge')
,('Love Will Tear Us Apart','Joy Division',1980,'Substance','Rock')
,('I Feel Love','Donna Summer',1977,'I Remember Yesterday','Romantic')
,('How Soon Is Now?','The Smiths',1985,'Hatful of Hollow','Rock')
,('Last Nite','The Strokes',2001,'Is This It','Rock')
,('Common People','Pulp',1995,'Different Class','Rock')
,('I Bet You Look Good on the Dancefloor','Arctic Monkeys',2005,'Whatever People Say I Am, Thats What Im Not','Indie rock')
,('Blue Monday','New Order',1983,'Substance','Rock')
,('Be My Baby','The Ronettes',1963,'Presenting the Fabulous Ronettes','Rock')
,('Good Vibrations','The Beach Boys',1966,'Smiley Smile','Rock')
,('Eleanor Rigby','The Beatles',1966,'Revolver','Rock')
,('There Is a Light That Never Goes Out','The Smiths',1986,'The Queen Is Dead','Rock')
,('Live Forever','Oasis',1994,'Definitely Maybe','Rock')
,('God Only Knows','The Beach Boys',1966,'Pet Sounds','Rock')
,('Heroes','Дэвид Боуи',1977,'Heroes','Rock')
,('Seven Nation Army','The White Stripes',2003,'Elephant','Electronic')
,('A Day in the Life','The Beatles',1967,'Sgt. Peppers Lonely Hearts Club Band','Rock')
,('Hey Ya!','OutKast',2003,'Speakerboxxx/The Love Below','Hip-hop')
,('Heart of Glass','Blondie',1978,'Parallel Lines','Rock')
,('Girls & Boys','Blur',1994,'Parklife','Punk rock')
,('Ghost Town','The Specials',1981,'The Singles Collection','Rock')
,('There She Goes','The Las',1988,'The Las','Rock')
,('Waterloo Sunset','The Kinks',1967,'Something Else by The Kinks','Rock')
,('Hurricane','Боб Дилан',1975,'Desire','Rock')
,('Wake Up','Arcade Fire',2005,'Funeral','Grunge')
,('Losing My Edge','LCD Soundsystem',2002,'LCD Soundsystem','Electronic')
,('God Save the Queen','Sex Pistols',1977,'Never Mind the Bollocks, Heres the Sex Pistols','Rock')
,('Time for Heroes','The Libertines',2002,'Up the Bracket','Rock')
,('Gimme Shelter','The Rolling Stones',1969,'Let It Bleed','Rock')
,('Once in a Lifetime','Talking Heads',1980,'Remain in Light','Rock')
,('Fools Gold','The Stone Roses',1989,'The Stone Roses','Rock')
,('London Calling','The Clash',1979,'London Calling','Rock')
,('Animal Nitrate','Suede',1993,'Suede','Rock')
,('Life on Mars?','Дэвид Боуи',1971,'Hunky Dory','Rock')
,('Strawberry Fields Forever','The Beatles',1967,'Magical Mystery Tour','Rock')
,('Wonderwall','Oasis',1995,'(Whats the Story) Morning Glory?','Rock')
,('River Deep, Mountain High','Айк и Тина Тёрнеры',1966,'River Deep Mountain High','Pop')
,('Nothing Compares 2 U','Шинейд ОКоннор',1990,'I Do Not Want What I Havent Got','Pop')
,('Maps','Yeah Yeah Yeahs',2003,'Fever to Hell','Rock')
,('99 Problems','Jay-Z',2004,'The Black Album','Rap')
,('Back to Black','Эми Уайнхаус',2006,'Back to Black','Pop')
,('The Universal','Blur',1995,'The Great Escape','Punk rock')
,('A Design for Life','Manic Street Preachers',1996,'Everything Must Go','Rock')
,('Debaser','Pixies',1989,'Doolittle','Rock')
,('Paranoid Android','Radiohead',1997,'OK Computer','Hard rock')
,('I Heard It Through the Grapevine','Марвин Гэй',1968,'In the Groove','Romantic')
,('Like a Prayer','Мадонна',1989,'Like a Prayer','Pop')
,('Boys Dont Cry','The Cure',1979,'Boys Dont Cry','Rock')
,('Like a Rolling Stone','Боб Дилан',1965,'Highway 61 Revisited','Rock')
,('Walk on the Wild Side','Лу Рид',1972,'Transformer','Rock')
,('Ashes to Ashes','Дэвид Боуи',1980,'Scary Monsters (and Super Creeps)','Rock')
,('One More Time','Daft Punk',2000,'Discovery','Electronic')
,('Paper Planes','M.I.A.',2008,'Kala','Indie rock')
,('Born to Run','Брюс Спрингстин',1975,'The BEST of','Rock')
,('The Model', 'Kraftwerk', 1981, 'The Man-Machine', 'Electronic')
,('Sabotage', 'Beastie Boys', 1994, 'Ill Communication', 'Hip Hop')
,('Billie Jean', 'Майкл Джексон', 1982, 'Thriller', 'Pop')
,('Suspicious Minds', 'Элвис Пресли', 1968, 'From Elvis in Memphis', 'Rock')
,('Loaded', 'Primal Scream', 1991, 'Screamadelica', 'Alternative Rock')
,('Babies', 'Pulp', 1992, 'His & Hers', 'Indie Rock')
,('True Faith', 'New Order', 1987, 'Substance 1987', 'Synthpop')
,('Young Americans', 'Дэвид Боуи', 1975, 'Young Americans', 'Funk / Soul')
,('Unfinished Sympathy', 'Massive Attack', 1991, 'Blue Lines', 'Trip Hop')
,('This Charming Man', 'The Smiths', 1983, 'The Smiths', 'Indie Pop')
,('Stand by Me', 'Бен Э. Кинг', 1961, 'Dont Play That Song!', 'Soul')
,('Straight Outta Compton', 'N.W.A', 1988, 'Straight Outta Compton', 'Hip Hop')
,('Cigarettes & Alcohol', 'Oasis', 1995, '(Whats the Story) Morning Glory?', 'Rock')
,('Blackbird', 'The Beatles', 1968, 'The Beatles (The White Album)', 'Rock')
,('(White Man) In Hammersmith Palais', 'The Clash', 1978, 'The Clash', 'Punk Rock')
,('My Generation', 'The Who', 1965, 'My Generation', 'Rock')
,('Ever Fallen in Love (With Someone You Shouldntve)','Buzzcocks',1978,'Love Bites','Punk')
,('Venus in Furs','The Velvet Underground',1967,'The Velvet Underground & Nico','Art Rock')
,('Sheela-Na-Gig','Пи Джей Харви',1991,'Dry','Alternative Rock')
,('Take Me Out','Franz Ferdinand',2004,'Franz Ferdinand','Indie Rock')
,('Dry Your Eyes','The Streets',2004,'A Grand Dont Come for Free','Hip-Hop')
,('Wuthering Heights','Кейт Буш',1978,'The Kick Inside','Art Pop')
,('Hey Jude','The Beatles',1968,'1967-1970','Rock')
,('Into My Arms','Nick Cave and the Bad Seeds',1997,'The Boatmans Call','Alternative Rock')
,('Fell in Love With a Girl','The White Stripes',2001,'White Blood Cells','Garage Rock')
,('Taxman','The Beatles',1966,'Revolver','Rock')
,('Niggas in Paris','Jay-Z и Канье Уэст',2011,'Watch the Throne','Hip-Hop')
,('Crazy in Love','Бейонсе',2003,'Dangerously in Love','R&B')
,('Complete Control','The Clash',1977,'The Story of the Clash, Volume 1','Punk')
,('Anarchy in the U.K.','Sex Pistols',1976,'Never Mind the Bollocks, Heres the Sex Pistols','Rock')
,('Every Day Is Like a Sunday','Моррисси',1988,'Viva Hate','Alternative Rock')
,('Get Ur Freak On','Мисси Эллиотт',2001,'Miss E... So Addictive','Hip-Hop')
,('Video Games','Лана Дель Рей',2011,'Born to Die','Indie Pop')
,('Lose Yourself','Эминем',2002,'Music from and Inspired by the Motion Picture 8 Mile','Rap')
,('Hallelujah','Джеф Бакли',1994,'Grace','Rock')
,('Time to Pretend','MGMT',2007,'Oracular Spectacular','Indie Rock')
,('All My Friends','LCD Soundsystem',2007,'Sound of Silver','Alternative Dance')
,('Toxic','Бритни Спирс',2004,'In the Zone','Pop')
,('Gold Digger','Канье Уэст',2005,'Late Registration','Hip-Hop')
,('Do You Realize??','The Flaming Lips',2002,'Yoshimi Battles the Pink Robots','Alternative Rock')
,('Fight the Power','Public Enemy',1989,'Fear of a Black Planet','Hip-Hop')
,('What a Waster','The Libertines',2002,'Up the Bracket','Indie Rock')
,('The Message','Grandmaster Flash and the Furious Five',1982,'The Message','Hip-Hop')
,('Killing in the Name','Rage Against the Machine',1992,'Rage Against the Machine','Alternative Metal')
,('No One Knows','Queens of the Stone Age',2002,'Songs for the Deaf','Hard Rock')
,('I Am the Resurrection','The Stone Roses',1989,'The Stone Roses','Madchester')
,('Losing My Religion','R.E.M.',1991,'Out of Time','Alternative Rock')
,('Motorcycle Emptiness','Manic Street Preachers',1992,'Generation Terrorists','Grunge')
,('Superstition','Стиви Уандер',1972,'Talking Book','Funk')
,('The Drowners','Suede',1993,'Suede','Britpop')
,('Song 2','Blur',1996,'Blur','Alternative Rock')
,('Dont Look Back in Anger','Oasis',1995,'(Whats the Story) Morning Glory?','Britpop')
,('House of Jealous Lovers','The Rapture',2002,'Echoes','Dance-punk')
,('Running Up That Hill','Кейт Буш',1985,'House of Love','Art Pop')
,('Standing in the Way of Control','The Gossip',2006,'Standing in the Way of Control','Indie Rock')
,('Ice Hockey Hair','Super Furry Animals',1998,'Ice Hockey Hair','Alternative Rock')
,('Rescue Me','Фонтелла Басс',1965,'The New Look','Soul')
,('Supersonic','Oasis',1994,'Definitely Maybe','Britpop')
,('When Doves Cry','Принс',1984,'Purple Rain','Pop')
,('Step On','Happy Mondays',1990,'Pills ''n'' Thrills and Bellyaches','Madchester')
,('Bitter Sweet Symphony','The Verve',1997,'Urban Hymns','Britpop')
,('Mr. Brightside','The Killers',2003,'Hot Fuss','Indie Rock')
,('Geno','Dexys Midnight Runners',1980,'Searching for the Young Soul Rebels','New Wave')
,('Someday','The Strokes',2002,'Is This It','Indie Rock')
,('Waterfall','The Stone Roses',1989,'The Stone Roses','Madchester')
,('Virginia Plain','Roxy Music',1972,'Greatest Hits','Glam Rock')
,('Celebrity Skin','Hole',1998,'Celebrity Skin','Grunge')
,('Hotel Yorba','The White Stripes',2001,'White Blood Cells','Garage Rock')
,('Purple Rain','Принс',1984,'Purple Rain','Pop')
,('Teenage Kicks','The Undertones',1977,'The Undertones','Punk Rock')
,('Disco 2000','Pulp',1995,'Different Class','Britpop')
,('Just Like Honey','The Jesus and Mary Chain',1985,'Psychocandy','Alternative Rock')
,('Regulate','Warren G при участии Nate Dogg',1994,'Regulate..G Funk Era','Gangsta Rap')
,('The Eton Rifles','The Jam',1979,'Setting Sons','Mod Revival')
,('A Change Is Gonna Come','Сэм Кук',1964,'Aint That Good News','Soul')
,('Wichita Lineman','Глен Кэмпбелл',1968,'Wichita Lineman','Country')
,('Jumpin Jack Flash','The Rolling Stones',1968,'Through the Past, Darkly (Big Hits Vol. 2)','Rock')
,('Pretty Vacant','Sex Pistols',1977,'Never Mind the Bollocks, Heres the Sex Pistols','Punk')
,('Gigantic','Pixies',1988,'Surfer Rosa','Indie Rock')
,('Over and Over','Hot Chip',2006,'The Warning','Indie Electronic')
,('The Only One I Know','The Charlatans',1990,'Some Friendly','Britpop')
,('Paint It, Black','The Rolling Stones',1966,'Aftermath','Rock')
,('Mens Needs','The Cribs',2007,'Mens Needs, Womens Need, Whatever','Indie Rock')
,('Monster','Канье Уэст при участии Jay-Z, Ники Минаж и Bon Iver',2010,'My Beautiful Dark Twisted Fantasy','Hip-Hop')
,('No Woman, No Cry','Bob Marley & the Wailers',1974,'Natty Dread','Reggae')
,('Windowlicker','Aphex Twin',1999,'26 Mixes for Cash','Electronic')
,('Alone Again Or','Love',1967,'Forever Changes','Folk Rock')
,('Creep','Radiohead',1992,'Pablo Honey','Alternative Rock')
,('Hello Goodbye','The Beatles',1967,'Magical Mystery Tour','Pop Rock')
,('Atomic','Blondie',1980,'Eat to the Beat','New Wave')
,('Some Velvet Morning','Нэнси Синатра и Ли Хэзлвуд',1967,'Moving with Nancy','Baroque Pop')
,('Soon','My Bloody Valentine',1991,'Loveless','Shoegaze')
,('Number 9 Dream','Джон Леннон',1974,'Walls and Bridges','Rock')
,('West End Girls','Pet Shop Boys',1984,'Please','Synthpop')
,('All the Young Dudes','Mott the Hoople',1972,'All the Young Dudes','Glam Rock')
,('(Sittin on) The Dock of the Bay','Отис Реддинг',1972,'The Dock of the Bay','Soul')
,('Follow the Leader','Eric B. & Rakim',1988,'Follow the Leader','Hip-Hop')
,('Dancing in the Street','Martha and the Vandellas',1964,'Dance Party','Soul')
,('Freak Scene','Dinosaur Jr.',1988,'Bug','Alternative Rock')
,('Papas Got a Brand New Bag','Джеймс Браун',1965,'Papas Got a Brand New Bag','Funk')
,('Ace of Spades','Motorhead',1980,'Ace of Spades','Heavy Metal')
,('I Want to Hold Your Hand','The Beatles',1963,'The Beatles Long Sally','Pop Rock')
,('Louie Louie','The Kingsmen',1963,'The Kingsmen in Prison','Rock')
,('Tiny Dancer','Элтон Джон',1972,'Madman Across the Water','Pop Rock')
,('Purple Haze','The Jimi Hendrix Experience',1966,'Are You Experienced','Psychedelic Rock')
,('Transmission','Joy Division',1980,'Substance','Post-Punk')
,('Son of a Preacher Man','Дасти Спрингфилд',1968,'Dusty in Memphis','Soul')
,('Changes','Дэвид Боуи',1972,'Hunky Dory','Glam Rock')
,('I Want You Back','The Jackson 5',1969,'Diana Rose Presents The Jackson 5','Pop')
,('Fix Up, Look Sharp','Диззи Раскал',2002,'Boy in da Corner','Grime')
,('Cannonball','The Breeders',1993,'Last Splash','Alternative Rock')
,('(You Gotta) Fight for Your Right (To Party!)','Beastie Boys',1987,'Licensed to Ill','Hip-Hop')
,('Temporary Secretary','Пол Маккартни',1980,'McCartney II','Electronic')
,('Daniel','Bat for Lashes',2009,'Two Suns','Art pop')
,('Green Onions','Booker T. & the M.G.s',1962,'Green Onions','Rhythm and blues')
,('Higher Than the Sun','Primal Scream',1991,'Screamadelica','Alternative dance')
,('A-Punk','Vampire Weekend',2007,'Vampire Weekend','Indie rock')
,('Someone Great','LCD Soundsystem',2007,'Sound of Silver','Dance-punk')
,('Rebel Without a Pause','Public Enemy',1987,'It Takes a Nation of Millions to Hold Us Back','Hip hop')
,('Yes','McAlmont & Butler',1995,'The Sound of McAlmont & Butler','Pop rock')
,('Wont Get Fooled Again','The Who',1971,'Whos Next','Hard rock')
,('Cant Stand Me Now','The Libertines',2004,'The Libertines','Indie rock')
,('Roll Over Beethoven','Чак Берри',1956,'Rock, Rock, Rock','Rock and roll')
,('The Tracks of My Tears','The Miracles',1965,'Going to a Go-Go','Soul')
,('Never Understand','The Jesus and Mary Chain',1985,'Psychocandy','Post-punk')
,('Shake Some Action','Flamin Groovies',1976,'Shake Some Action','Power pop')
,('Protect Ya Neck','Wu-Tang Clan',1993,'Enter the Wu-Tang Clan (36 chambers)','Hip hop')
,('I Can See for Miles','The Who',1967,'The Who Sell Out','Psychedelic rock')
,('No Good (Start the Dance)','The Prodigy',1994,'Music for the Jilted Generation','Electronic dance')
,('Under Pressure','Queen и Дэвид Боуи',1981,'Hot Space','Pop rock')
,('There Goes the Fear','Doves',2002,'The Last Broadcast','Indie rock')
,('Subterranean Homesick Blues','Боб Дилан',1965,'Bringing It All Back Home','Folk rock')
,('The Concept','Teenage Fanclub',1991,'Bandwagonesque','Alternative rock')
,('Murdy Bum','Arctic Monkeys',2005,'Whatever People Say I Am, Thats What Im Not','Indie rock')
,('Dont Look Back into the Sun','The Libertines',2004,'Dont Look Back into the Sun','Indie rock')
,('Shoot Speed/Kill Light','Primal Scream',2000,'XTRMNTR','Electronica')
,('Nowhere to Run','Martha and the Vandellas',1964,'Dance Party','Soul')
,('Sign o the Times','Принс',1987,'Sign o the Times','Funk')
,('Tender','Blur',1999,'13','Alternative rock')
,('Alright','Supergrass',1995,'I Should Coco','Britpop')
,('Atmosphere','Joy Division',1980,'Substance','Post-punk')
,('Made of Stone','The Stone Roses',1989,'The Stone Roses','Madchester')
,('Monkey Gone to Heaven','Pixies',1989,'Doolittle','Alternative rock')
,('This Is a Low','Blur',1994,'Parklife','Britpop')
,('Light My Fire','The Doors',1967,'The Doors','Psychedelic rock')
,('Where Is My Mind?','Pixies',1988,'Surfer Rosa','Alternative rock')
,('Im Waiting for the Man','The Velvet Underground',1967,'The Velvet Underground & Nico','Proto-punk')
,('Whats Going On','Марвин Гэй',1971,'Whats Going On','Soul')
,('Crazy','Пэтси Клайн',1961,'Patsy Cline Showcase','Country pop')
,('Fairytale of New York','The Pogues при участии Кирсти Маккол',1987,'If I Should Fall from Grace with God','Celtic punk')
,('Reptilia','The Strokes',2004,'Room of Fire','Garage rock')
,('Rise','Public Image Ltd',1986,'Album','Post-punk')
,('Levi Stabbs Tears','Билли Брэгг',1986,'Talking with the Taxman about Poetry','Folk rock')
,('Da Funk','Daft Punk',1995,'Homework','Electronic')
,('Jealous Guy','Джон Леннон',1971,'Imagine','Rock')
,('Hit the North','The Fall',1987,'Seminal Live','Post-punk')
,('You Keep Me Hangin On','The Supremes',1966,'The Supremes Sing Holland-Dozier-Holland','Soul')
,('Radio Free Europe','R.E.M.',1981,'Murmur','Alternative rock')
,('Here Comes Your Man','Pixies',1989,'Doolittle','Alternative rock')
,('Solsbury Hill','Питер Гэбриэл',1977,'Peter Gabriel','Art rock')
,('Lithium','Nirvana',1991,'Nevermind','Grunge')
,('Lithium','Nirvana',1991,'Nevermind','Grunge')
,('Rip It Up','Orange Juice',1983,'Rip It Up','Post-punk')
,('Faster','Manic Street Preachers',1994,'The Holy Bible','Alternative rock')
,('Straight to You','Nick Cave and the Bad Seeds',1992,'Henrys Dream','Alternative rock')
,('You Really Got Me','The Kinks',1964,'Kinks','Rock')
,('End of a Century','Blur',1994,'Parklife','Britpop')
,('Mrs. Robinson','Simon & Garfunkel',1968,'Bookends','Folk rock')
,('Golden Skans','Klaxons',2007,'Myths of the Near Future','Indie rock')
,('Electicity','Spiritualized',1995,'Ladies and Gentlemen We Are Floating in Space','Space rock')
,('Birthday','The Sugarcubes',1987,'Lifes Too Good','Alternative rock')
,('Get Up (I Feel Like Being a) Sex Machine','Джеймс Браун',1970,'Sex Machine','Funk')
,('Respect','Арета Франклин',1967,'I Never Loved a Man the Way I Love You','Soul')
,('Sympathy for the Devil','The Rolling Stones',1968,'Beggars Banquet','Rock')
,('Temptation','New Order',1983,'Substance','Dance-rock')
,('Oblivion','Граймс',2012,'Visions','Experimental pop')
,('Ms. Jackson','OutKast',2001,'Stankonia','Hip hop')
,('Do I Wanna Know?','Arctic Monkeys',2012,'AM','Indie rock')
,('(Dont Fear) The Reaper','Blue Öyster Cult',1976,'Agents of Fortune','Hard rock')
,('Get It On','T. Rex',1971,'Electric Warrior','Glam rock')
,('Psycho Killer','Talking Heads',1977,'Talking Heads: 77','New wave')
,('Jailhouse Rock','Элвис Пресли',1957,'Jailhouse Rock','Rock and roll')
,('In Between Days','The Cure',1985,'The Head on the Door','Post-punk')
,('Blitzkrieg Bop','The Ramones',1976,'Ramones','Punk rock')
,('Tupelo','Nick Cave and the Bad Seeds',1985,'The Firstborn Is Dead','Blues rock')
,('Whatever','Oasis',1994,'Definitely Maybe','Britpop')
,('Rent','Pet Shop Boys',1987,'Actually','Synth-pop')
,('Sour Times','Portishead',1994,'Dummy','Trip hop')
,('Public Image','Public Image Ltd',1978,'First Issue','Post-punk')
,('Dry the Rain','The Beta Band',1997,'Champion Versions','Indie rock')
,('Motown Junk','Manic Street Preachers',1991,'Forever Delayed','Alternative rock')
,('Fuck Forever','Babyshambles',2005,'Down in Albion','Indie rock')
,('Voodoo Child (Slight Return)','The Jimi Hendrix Experience',1968,'Electric Ladyland','Blues rock')
,('Intergalactic','Beastie Boys',1998,'Hello Nasty','Hip hop')
,('My Girls','Animal Collective',2009,'Merriweather Post Pavilion','Experimental pop')
,('Sexy Boy','Air',1997,'Moon Safari','Downtempo')
,('Space Oddity','Дэвид Боуи',1969,'Space Oddity','Art rock')
,('Olivers Army','Elvis Costello and the Attractions',1979,'Armed Forces','New wave')
,('Still D.R.E.','Dr. Dre',1999,'2001','Rap')
,('Come On Eileen','Dexys Midnight Runners',1982,'Too-Rye-Ay','Pop')
,('This Is Hardcore','Pulp',1998,'This Is Hardcore','Alternative Rock')
,('Got Your Money','Ol Dirty Bastard',1999,'Nigga Please','Hip Hop')
,('Sea Within a Sea','The Horrors',2009,'Primary Colours','Post-Punk')
,('Feel Good Hit of the Summer','Queens of the Stone Age',2000,'Rated R','Rock')
,('Walk This Way','Run-D.M.C.',1986,'Raising Hell','Hip Hop')
,('Waterfalls','TLC',1995,'CrazySexyCool','R&B')
,('Sexx Laws','Бек',1999,'Midnite Vultures','Alternative Rock')
,('Born Slippy .NUXX','Underworld',1996,'Trainspotting','Electronic')
,('Music Sounds Better With You','Stardust',1998,'Music Sounds Better With You','House')
,('Hound Dog','Элвис Пресли',1956,'Elvis Golden Records','Rock and Roll')
,('Paperback Writer','The Beatles',1966,'A Collection of Beatles Oldies','Rock')
,('Empire State of Mind','Jay-Z',2009,'The Blueprint 3','Hip Hop')
,('Shake Your Body (Down to the Ground)','The Jacksons',1978,'Destiny','Funk')
,('Trash','Suede',1996,'Coming Up','Alternative Rock')
,('Only Love Can Break Your Heart','Saint Etienne',1990,'Foxbase Alpha','Electronic')
,('Perfect Day','Лу Рид',1972,'Transformer','Rock')
,('My Sweet Lord','Джордж Харрисон',1970,'All Things Must Pass','Rock')
,('You Love Us','Manic Street Preachers',1992,'Generation Terrorists','Rock')
,('Hallelujah','Happy Mondays',1989,'Hallelujah','Alternative Dance')
,('Leave Them All Behind','Ride',1992,'Going Black Again','Shoegazing')
,('Reach Out Ill Be There','Four Tops',1966,'Reach Out','Soul')
,('Little Fluffy Clouds','The Orb',1990,'The Orbs Adventures Beyond the Ultraworld','Ambient')
,('My Name Is','Эминем',1999,'The Slim Shady LP','Rap')
,('Tangled Up in Blue','Боб Дилан',1975,'Blood on the Tracks','Folk Rock')
,('Hounds of Love','Кейт Буш',1985,'Hounds of Love','Art Pop')
,('Velouria','Pixies',1990,'Bossanova','Alternative Rock')
,('She Loves You','The Beatles',1963,'The Beatles Second Album','Rock')
,('One Day Like This','Elbow',2008,'The Seldom Seen Kid','Indie Rock')
,('Connnection','Elastica',1994,'Elastica','Britpop')
,('Bigmouth Strikes Again','The Smiths',1986,'The Queen Is Dead','Indie Rock')
,('Caught by the Fuzz','Supergrass',1994,'I Should Coco','Britpop')
,('Crimewave','Crystal Castles',2007,'Crystal Castles','Electronic')
,('Band on the Run','Wings',1973,'Band on the Run','Rock')
,('Get Lucky','Daft Punk',2013,'Random Access Memories','Electronic')
,('Its a Mans Mans Mans World','Джеймс Браун',1966,'Its a Mans Mans Mans World','Soul')
,('Rebellion (Lies)','Arcade Fire',2005,'Funeral','Indie Rock')
,('Daddys Gone','Glasvegas',2007,'Glasvegas','Indie Rock')
,('Shipbuilding','Роберт Уайетт',1982,'Nothing Can Stop Us','Art Rock')
,('Mr. Blue Sky','Electric Light Orchestra',1977,'Out of the Blue','Progressive Pop')
,('For Lovers','Wolfman при участии Питера Доэрти',2004,'For Lovers','Indie Rock')
,('Family Affair','Sly and the Family Stone',1971,'Theres a Riot Goin On','Funk')
,('Fashion','Дэвид Боуи',1980,'Scary Monsters (and Super Creeps)','Rock')
,('You Cant Always Get What You Want','The Rolling Stones',1969,'Let It Bleed','Rock')
,('The Words That Maketh Murder','Пи Джей Харви',2011,'Let England Shake','Rock')
,('Jump Around','House of Pain',1992,'House of Pain','Hip Hop')
,('Crash','The Primitives',1988,'Lovely','Indie')
,('20th Century Boy','T. Rex',1973,'Hits! The Very Best of T. Rex','Rock')
,('Enjoy the Silence','Depeche Mode',1990,'Violator','Rock')
,('Fake Plastic Trees','Radiohead',1995,'The Bends','Alternative')
,('Suzanne','Леонард Коэн',1967,'Songs of Leonard Cohen','Folk')
,('Something','The Beatles',1969,'Abbey Road','Rock')
,('Beetlebum','Blur',1996,'Blur','Alternative')
,('Going Underground','The Jam',1980,'Greatest Hits of Rock','Rock')
,('Spanish Sahara','Foals',2010,'Total Life Forever','Indie')
,('Outdoor Miner','Wire',1978,'Chairs Missing','Post-Punk')
,('Papa Was a Rollin Stone','The Temptations',1972,'All Directions','Soul')
,('Ticket to Ride','The Beatles',1965,'Help!','Rock')
,('History','The Verve',1995,'A Northern Soul','Britpop')
,('1999','Принс',1982,'1999','Pop')
,('Kick Out the Jams','MC5',1969,'Kick Out the Jams','Rock')
,('All Along the Watchtower','The Jimi Hendrix Experience',1968,'Electric Ladyland','Rock')
,('Here','Pavement',1992,'Slanted and Enchanted','Indie')
,('Zero','Yeah Yeah Yeahs',2009,'Its Blitz!','Alternative')
,('Ring of Fire','Джонни Кэш',1963,'Ring of Fire: The Best of Johnny Cash','Country')
,('One Nation Under a Groove','Funkadelic',1978,'One Nation Under a Groove','Funk')
,('Brimful of Asha','Cornershop',1997,'When I Was Born for the 7th Time','Indie')
,('Itchycoo Park','Small Faces',1967,'There Are But Four Small Faces','Psychedelic Rock')
,('Big Time Sensuality','Бьорк',1993,'Debut','Electronic')
,('Personal Jesus','Depeche Mode',1990,'Violator','Rock')
,('Destroy the Heart','The House of Love',1990,'The House of Love','Indie')
,('Strange Fruit','Билли Холидей',1939,'Lady Sings the Blues','Jazz')
,('Sexual Healing','Марвин Гэй',1982,'Midnight Love','Soul')
,('Man in the Mirror','Майкл Джексон',1988,'Bad','Pop')
,('My Favourite Dress','The Wedding Present',1987,'George Best','Indie')
,('Two Steps, Twice','Foals',2008,'Antidotes','Indie')
,('Novocaine for the Soul','Eels',1996,'Beautiful Freak','Alternative')
,('Karmacoma','Massive Attack',1995,'Protection','Electronic')
,('Rave On!','Бадди Холли',1958,'Buddy Holly','Rock')
,('Go West','Pet Shop Boys',1993,'Very','Electronic')
,('She Bangs the Drums','The Stone Roses',1989,'The Stone Roses','Indie')
,('The Man Dont Give a Fuck','Super Furry Animals',1996,'Out Spaced','Alternative')
,('Come Together','The Beatles',1969,'Abbey Road','Rock')
,('All Day and All of the Night','The Kinks',1964,'Kinks-Size','Rock')
,('Dare','Gorillaz',2005,'Demon Days','Alternative')
,('Because the Night','Патти Смит',1978,'Easter','Rock')
,('Stan','Эминем',2000,'The Marshall Mathers LP','Rap')
,('Caught out There','Келис',2000,'Kaleidoscope','R&B')
,('Club Foot','Kasabian',2004,'Kasabian','Rock')
,('California Dreamin','The Mamas & the Papas',1965,'If You Can Believe Your Eyes and Ears','Folk Rock')
,('Runaway','Канье Уэст при участии Pusha T',2010,'My Beautiful Dark Twisted Fantasy','Hip Hop')
,('Fluorescent Adolescent','Arctic Monkeys',2007,'Favourite Worst Nightmare','Indie rock')
,('Only You','Yazoo',1982,'Upstairs at Erics','Electronic')
,('Clint Eastwood','Gorillaz',2001,'Gorillaz','Electronic')
,('Eight Miles High','The Byrds',1966,'Fifth Dimension','Psychedelic Rock')
,('Just Cant Get Enough','Depeche Mode',1981,'Speak & Spell','Rock')
,('Rehab','Эми Уайнхаус',2006,'Back to Black','Soul')
,('Float On','Modest Mouse',2004,'Good News for People Who Love Bad News','Indie rock')
,('The Boxer','Simon & Garfunkel',1970,'Bridge over Troubled Water','Folk Rock')
,('Hey Boy Hey Girl','The Chemical Brothers',1999,'Surrender','Electronic')
,('Loser','Бек',1993,'Mellow Gold','Alternative')
,('Millionaire','Келис',2004,'Tasty','R&B')
,('Close to Me','The Cure',1985,'The Head on the Door','Alternative')
,('The Sun Aint Gonna Shine (Anymore)','The Walker Brothers',1966,'The Sun Aint Gonna Shine Anymore','Pop')
,('Sex & Drugs & Rock & Roll','Иэн Дьюри',1977,'New Boots and Panties!!','Rock')
,('For Tomorrow','Blur',1993,'Modern Life Is Rubbish','Britpop')
,('Pictures of You','The Cure',1989,'Disintegration','Alternative')
,('Paid in Full','Eric B. & Rakim',1987,'Paid in Full','Hip Hop')
,('Enter Sandman','Metallica',1991,'Metallica','Heavy Metal')
,('Bad Moon Rising','Creedence Clearwater Revival',1969,'Green River','Rock')
,('Killing of a Flashboy','Suede',1994,'Sci-Fi Lullabies','Britpop')
,('Teen Age Riot','Sonic Youth',1988,'Daydream Nation','Alternative')
,('Friday Im in Love','The Cure',1992,'Wish','Alternative')
,('Voodoo Ray','A Guy Called Gerald',1988,'Hot Lemonade','Electronic')
,('You Made Me Realise','My Bloody Valentine',1988,'You Made Me Realise','Shoegaze')
,('Half the World Away','Oasis',1994,'The Masterplan','Rock')
,('The Wild Ones','Suede',1994,'Dog Man Star','Britpop')
,('Hyperballad','Бьорк',1996,'Post','Electronic')
,('Dont Believe the Hype','Public Enemy',1988,'It Takes a Nation of Millions to Hold Us Back','Hip Hop')
,('Brianstorm','Arctic Monkeys',2007,'Favourite Worst Nightmare','Indie rock')
,('Love Action (I Believe in Love)','The Human League',1981,'Dare','Synthpop')
,('Dont Stop Til You Get Enough','Майкл Джексон',1979,'Off the Wall','Disco')
,('Roadrunner','The Modern Lovers',1976,'The Modern Lovers','Rock')
,('Bennie and the Jets','Элтон Джон',1973,'Goodbye Yellow Brick Road','Pop')
,('Where the Wild Roses Grow','Nick Cave and the Bad Seeds и Кайли Миноуг',1995,'Murder Ballads','Alternative')
,('Ill Feel a Whole Lot Better','The Byrds',1965,'Mr. Tambourine Man','Folk Rock')
,('Piledriver Waltz','Arctic Monkeys',2011,'Suck It and See','Indie rock')
,('Kids','MGMT',2007,'Oracular Spectacular','Indie pop')
,('While My Guitar Gently Weeps','The Beatles',1968,'The Beatles','Rock')
,('Lapdance','NERD',2001,'In Search Of...','Hip Hop')
,('Typical Girls','The Slits',1979,'Cut','Post-punk')
,('Champagne Supernova','Oasis',1995,'(Whats the Story) Morning Glory?','Britpop')
,('Cut Your Hair','Pavement',1991,'Crooked Rain, Crooked Rain','Indie rock')
,('Oh, Pretty Woman','Пол Саймон',1964,'Orbisongs','Pop')
,('The Boy with the Thorn in His Side','The Smiths',1986,'The Queen Is Dead','Indie rock')
,('Theres No Other Way','Blur',1991,'Leisure','Britpop')
,('Me and Julio Down by the Schoolyard','Пол Саймон',1972,'Paul Simon','Folk Rock')
,('Paranoid','Black Sabbath',1977,'Paranoid','Heavy Metal')
,('I Feel for You','Чака Хан',1984,'I Feel for You','R&B')
,('To The End','Blur',1994,'Parklife','Britpop')
,('No More Heroes','The Stranglers',1977,'No More Heroes','Punk rock')
,('Sheila','Джейми Ти',2006,'Panic Prevention','Indie pop')
,('The Real Slim Shady','Эминем',2000,'The Marshall Mathers LP','Rap')
,('The Mercy Seat','Nick Cave and the Bad Seeds',1988,'Tender Prey','Alternative')
,('Us','Регина Спектор',2004,'Soviet Kitsch','Anti-folk')
,('Slide Away','Oasis',1994,'Definitely Maybe','Rock')
,('Learn to Fly','Foo Fighters',1999,'There Is Nothing Left to Lose','Alternative')
,('Television, the Drug of the Nation','The Disposable Heroes of Hiphoprisy',1991,'Hypocrisy Is the Greatest Luxury','Hip Hop')
,('The Boys Are Back in Town','Thin Lizzy',1976,'Jailbreak','Hard Rock')
,('Reverend Black Grape','Black Grape',1995,'Its Great When Youre Straight... Yeah','Alternative')
,('Where the Streets Have No Name','U2',1987,'The Joshua Tree','Rock')
,('Bad Girls','M.I.A.',2012,'Matangi','Electronic')
,('Breezeblocks','Alt-J',2012,'An Awesome Wave','Indie rock')
,('Sheena Is a Punk Rocker','The Ramones',1977,'Rocket to Russia','Punk rock')
,('Fake Tales of San Francisco','Arctic Monkeys',2005,'Whatever People Say I Am, Thats What Im Not','Indie rock')
,('Baby, I Love You','The Ronettes',1963,'Presenting the Fabulous Ronettes','Pop')
,('Hurt','Nine Inch Nails',1994,'The Downward Spiral','Industrial rock')
,('Watching the Detectives','Fugazi',1988,'Fugazi','Post-hardcore')
,('Paris','Friendly Fires',2007,'Friendly Fires','Alternative dance')
,('Watching the Detectives','Elvis Costello and the Attractions',1977,'My Aim is True','New wave')
,('Another Girl, Another Planet','The Only Ones',1978,'The Only Ones','Post-punk')
,('Youre So Vain','Карли Саймон',1972,'No Secrets','Soft rock')
,('For Tomorrow','Blur',1993,'Modern Life Is Rubbish','Britpop')
,('Start!','Tindersticks',1993,'Sound Affects','Alternative rock')
,('Come as You Are','Nirvana',1991,'Nevermind','Grunge')
,('Start!','The Jam',1980,'Sound Affects','Mod revival')
,('Yellow','Coldplay',2000,'Parachutes','Alternative rock')
,('Holland, 1945','Neutral Milk Hotel',1998,'In the Aeroplane Over the Sea','Indie folk')
,('The Book of Love','The Magnetic Fields',1999,'69 Love Songs','Indie pop')
,('Paradise City','Guns N Roses',1987,'Appetite for Destruction','Hard rock')
,('Down by the Water','Пи Джей Харви',1995,'To Bring You My Love','Alternative rock')
,('Plug In Baby','Muse',2001,'Origin of Symmetry','Alternative rock')
,('Elephant','Tame Impala',2012,'Lonerism','Psychedelic rock')
,('Hate to Say I Told You So','The Hives',2000,'Veni Vidi Vicious','Garage punk')
,('Golden Years','Дэвид Боуи',1975,'Station to Station','Rock')
,('Buddy Holly','Weezer',1994,'Weezer','Alternative rock')
,('Uptown Top Ranking','Althea & Donna',1977,'Uptown Top Ranking','Reggae')
,('Shame, Shame, Shame','Shirley & Company',1974,'Shame, Shame, Shame','Disco')
,('The Drugs Dont Work','The Verve',1997,'Urban Hymns','Alternative rock')
,('One Armed Scissor','At the Drive-In',2000,'Relationship of Command','Post-hardcore')
,('Sunny Afternoon','The Kinks',1966,'Face to Face','Rock')
,('R U Mine?','Arctic Monkeys',2012,'AM','Indie rock')
,('The Bucket','Kings of Leon',2004,'Aha Shake Heartbreak','Southern rock')
,('Free Nelson Mandela','The Specials',1984,'In the Studio','Ska')
,('Material Girl','Мадонна',1984,'Like a Virgin','Pop')
,('Pills And Soap','The Imposter',1983,'Punch the Clock','New wave')
,('Where Its At','Бек',1996,'Odelay','Alternative rock')
,('I Fought the Law','The Bobby Fuller Four',1965,'I Fought the Law','Rock and roll')
,('Witness (1 Hope)','Рутс Манува',2001,'Run Come Save Me','Hip hop')
,('Sorted for Es & Wizz','Pulp',1995,'Different Class','Britpop')
,('Open Up','Leftfield',1993,'Leftism','Electronica')
,('End of a Century','Blur',1992,'Midlife: A Beginners Guide to Blur','Britpop')
,('Tumbling Dice','The Rolling Stones',1972,'Exile on Main St.','Rock')
,('Do You Remember the First Time?','Pulp',1994,'His n Hers','Britpop')
,('The Scientist','Coldplay',2002,'A Rush of Blood to the Head','Alternative rock')
,('A New England','Билли Брэгг',1983,'Lifes a Riot with Spy Vs Spy','Folk punk')
,('I Am the Walrus','The Beatles',1967,'Magical Mystery Tour','Psychedelic rock')
,('Setting Sun','The Chemical Brothers при участии Ноэла Галлахера',1996,'Dig Your Own Hole','Big beat')
,('Whole Lotta Love','Led Zeppelin',1969,'Led Zeppelin II','Hard rock')
,('Town Called Malice','The Jam',1982,'The Gift','Mod revival')
,('Race for the Prize','The Flaming Lips',1999,'The Soft Bulletin','Indie rock')
,('One Way or Another','Blondie',1978,'Parallel Lines','New wave')
,('Whats My Name?','Snoop Dogg',1993,'Doggystyle','West Coast hip hop')
,('Firestarter','The Prodigy',1996,'The Fat Of The Land','Electronica')
,('Umbrella','Рианна',2007,'Good Girl Gone Bad','Pop')
,('Lust for Life','Игги Поп',1977,'Lust for Life','Rock')
,('Its the End of the World as We Know It (And I Feel Fine)','R.E.M.',1987,'Document','Alternative rock')
,('Live and Let Die','Wings',1973,'Band on the Run','Rock')
,('If You Wanna','The Vaccines',2011,'What Did You Expect from The Vaccines?','Indie rock')
,('I Will Survive','Глория Гейнор',1978,'Love Tracks','Disco')
,('About a Girl','Nirvana',1989,'Bleach','Grunge')
,('Goddess on a Hiway','Mercury Rev',1998,'Deserters Songs','Dream pop')
,('Push It','Salt-n-Pepa',1987,'Hot, Cool & Vicious','Hip hop')
,('Star Sign','Teenage Fanclub',1991,'Bandwagonesque','Alternative rock')
,('Dreaming of You','The Coral',2002,'The Coral','Indie rock')
,('Bloodbuzz Ohio','The National',2010,'High Violet','Indie rock')
,('Movin on Up','Primal Scream',1991,'Screamadelica','Alternative dance')
,('Sweet Child o Mine','Guns N Roses',1987,'Appetite for Destruction','Hard rock')
,('Best of Friends','Palma Violets',2012,'180','Indie rock')
,('Lola','The Kinks',1970,'Lola Versus Powerman and the Moneygoround, Part One','Rock')
,('Disarm','The Smashing Pumpkins',1993,'Siamese Dream','Alternative rock')
,('Crazy','Gnarls Barkley',2006,'St. Elsewhere','Soul')
,('Imagine','Джон Леннон',1971,'Imagine','Pop')
,('Nuthin But a G Thang','Dr. Dre',1993,'The Chronic','Hip hop')
,('Highway to Hell','AC/DC',1979,'Highway to Hell','Hard rock')
,('Wouldnt It Be Nice','The Beach Boys',1966,'Pet Sounds','Baroque pop')
,('Ziggy Stardust','Дэвид Боуи',1972,'The Rise and Fall of Ziggy Stardust and the Spiders from Mars','Glam rock')
,('The Killing Moon','Echo & the Bunnymen',1984,'Ocean Rain','Post-punk')
,('Darts of Pleasure','Franz Ferdinand',2003,'Franz Ferdinand','Indie rock')
,('Come to Daddy','Aphex Twin',1997,'Come to Daddy','Electronic')
,('Some Might Say','Oasis',1995,'(Whats the Story) Morning Glory?','Britpop')
,('Starman','Дэвид Боуи',1972,'The Rise and Fall of Ziggy Stardust and the Spiders from Mars','Glam rock')
,('Across 110th Street','Бобби Уомак',1972,'Across 110th Street Soundtrack','Soul')
,('Suedehead','Моррисси',1988,'Viva Hate','Alternative rock')
,('Golden Brown','The Stranglers',1981,'La Folie','New wave')
,('Red Right Hand','Nick Cave and the Bad Seeds',1994,'Let Love In','Alternative rock')
,('Riders on the Storm','The Doors',1971,'L.A. Woman','Psychedelic rock')
,('One','Джонни Кэш',2000,'American III: Solitary Man','Country')
,('New York City Cops','The Strokes',2001,'Is This It','Indie rock')
,('Overload','Sugababes',2000,'One Touch','R&B')
,('Everybody Hurts','R.E.M.',1992,'Automatic for the People','Alternative rock')
,('Hey Joe','The Jimi Hendrix Experience',1966,'Are You Experienced','Blues rock')
,('Kill All Hippies','Primal Scream',2000,'XTRMNTR','Electronica')
,('Girl from Mars','Ash',1995,'1977','Alternative rock')
,('Out of Time','Blur',2003,'Think Tank','Alternative rock')
,('Five Years','Дэвид Боуи',1972,'The Rise and Fall of Ziggy Stardust and the Spiders from Mars','Glam rock')
;

Задачи

Необходимо разнести данные из временной таблицы tmp в каждую из вновь созданных в соответствии со структурой таблиц БД, при этом сохранив все связи, после чего таблицу tmp необходимо удалить из БД.

Необходимо написать соответствующие SQL-запросы для выполнения следующих действий с базой данных:

  1. Для каждого исполнителя показать список его альбомов (отсортировать по исполнителю)
  2. Найти все дублирующиеся композиции в рамках одного альбома одного исполнителя, удалить лишние, оставив только одну (на примере одного любого набора дублей)
  3. Добавить в коллекцию любую композицию любого исполнителя, при этом у композиции обязательно должны быть указаны альбом и жанр
  4. Вывести список композиций одного автора, выпущенных в одном году
  5. Вывести количество альбомов и композиций в них у определенного исполнителя на выбор
  6. Вывести все композиции в каком-либо одном жанре
  7. Вывести три самых новых композиции по году (любого исполнителя)

Совет

Рекомендуемый порядок разбора данных:

  1. Жанр (первичный ключ id генерируемый)
  2. Исполнитель (первичный ключ id генерируемый)
  3. Альбом (первичный ключ id генерируемый)
  4. Композиция (можно использовать id из tmp как первичный ключ)

Результат

Задание должно быть выполнено в локальной файловой системе компьютера. Папка со всеми файлами задания должна называться:

ОП.08 - Вариант 1 - Иванов И.И.

где вместо Иванов И.И. должны быть указаны фамилия и инициалы сдающего.

Результат выполнения задания должен быть оформлен в виде файлов:

  1. Файл дампа итоговой БД в формате SQL, должен называться: db_1.sql
  2. Файл последовательных SQL-запросов для каждого из пунктов задания, должен называться: task_1.sql, каждый запрос должен отделяться комментарием с номером соответствующего пункта задания
  3. Файл, отражающий ERD-диаграмму созданной БД со всеми связями, должен называться erd_1.png
Последнее обновление: 15.09.2025, 12:57
Следующая
ОП.08 - Практический экзамен - Вариант №2
© Кафедра информационных технологий ЧУВО «ВШП», 2025. Версия: 0.4.1
Материалы доступны в соответствии с лицензией: