-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrestart.sql
More file actions
94 lines (75 loc) · 2.48 KB
/
Copy pathrestart.sql
File metadata and controls
94 lines (75 loc) · 2.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
-- phpMyAdmin SQL Dump
-- version 4.1.14.8
-- http://www.phpmyadmin.net
--
-- Host: db662455209.db.1and1.com
-- Generation Time: Dec 28, 2016 at 07:36 PM
-- Server version: 5.5.53-0+deb7u1-log
-- PHP Version: 5.4.45-0+deb7u6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `db662455209`
--
-- --------------------------------------------------------
--
-- Table structure for table `albums`
--
CREATE TABLE IF NOT EXISTS `albums` (
`albumID` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`artistID` int(11) NOT NULL,
`year` int(11) NOT NULL,
PRIMARY KEY (`albumID`),
KEY `artistID` (`artistID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `artists`
--
CREATE TABLE IF NOT EXISTS `artists` (
`name` varchar(255) NOT NULL,
`yearformed` int(11) NOT NULL,
`country` varchar(255) NOT NULL,
`artistID` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`artistID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=18 ;
--
-- Dumping data for table `artists`
--
INSERT INTO `artists` (`name`, `yearformed`, `country`, `artistID`) VALUES
('Muse', 1994, 'United Kingdom', 1),
('Nirvana', 1987, 'United States', 2),
('Vince Guaraldi', 1953, 'United States', 3);
-- --------------------------------------------------------
--
-- Table structure for table `songs`
--
CREATE TABLE IF NOT EXISTS `songs` (
`title` varchar(255) NOT NULL,
`albumID` int(11) NOT NULL,
`artistID` int(11) NOT NULL,
KEY `albumID` (`albumID`),
KEY `artistID` (`artistID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `albums`
--
ALTER TABLE `albums`
ADD CONSTRAINT `albums_ibfk_1` FOREIGN KEY (`artistID`) REFERENCES `artists` (`artistID`);
--
-- Constraints for table `songs`
--
ALTER TABLE `songs`
ADD CONSTRAINT `songs_ibfk_1` FOREIGN KEY (`albumID`) REFERENCES `albums` (`albumID`),
ADD CONSTRAINT `songs_ibfk_2` FOREIGN KEY (`artistID`) REFERENCES `artists` (`artistID`);
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;