-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.sql
More file actions
62 lines (53 loc) · 1.27 KB
/
database.sql
File metadata and controls
62 lines (53 loc) · 1.27 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
--
-- Database: stephsako_footlite
--
-- --------------------------------------------------------
--
-- Table structure for table SUPPORTER
--
DROP TABLE IF EXISTS SUPPORTER ;
CREATE TABLE SUPPORTER (
idSupporter int(2) AUTO_INCREMENT NOT NULL,
pseudo varchar(30) NOT NULL,
password varchar(30) NOT NULL,
favoriteTeam int(4) DEFAULT NULL,
favoriteTeamName varchar(35) NOT NULL,
CONSTRAINT id_SUPPORTER_PK PRIMARY KEY (idSupporter)
);
--
-- Dumping data for table SUPPORTER
--
INSERT INTO SUPPORTER (pseudo, password, favoriteTeam, favoriteTeamName) VALUES
('stephsako', 'borussia', 4, 'Borussia Dortmund BVB 09');
--
-- Table structure for table BET
--
CREATE TABLE BET (
idBet int(4) AUTO_INCREMENT NOT NULL,
idMatch int(7) NOT NULL,
idWinner int(4) NOT NULL,
idSupporter int(2) NOT NULL,
CONSTRAINT id_BET_PK PRIMARY KEY (idBet),
CONSTRAINT Id_SUPPORTER_Fk FOREIGN KEY (idSupporter) REFERENCES SUPPORTER(idSupporter)
);
--
-- Dumping data for table BET
--
INSERT INTO BET (idMatch, idWinner, idSupporter) VALUES
(251214, 1521, 1),
(271415, 15, 1),
(271419, 1, 1),
(271414, 4, 1),
(271413, 2, 1),
(271412, 9, 1),
(271527, 24, 1),
(271440, 4, 1),
(271426, 2, 1),
(271476, 19, 1),
(271478, 9, 1),
(271515, 3, 1),
(271477, 4, 1),
(273646, 88, 1),
(271484, 4, 1),
(271486, 18, 1),
(264421, 76, 1);