-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtestScript.sql
61 lines (56 loc) · 2.34 KB
/
testScript.sql
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
-- test script
-- insert potential players
insert into Player (PlayerName) values ('Ryan');
insert into Player (PlayerName) values ('Kevin');
insert into Player (PlayerName) values ('Alex');
insert into Player (PlayerName) values ('Mattijs');
-- create the tournaments
insert into Tournament (GameType) values ('Badmitton');
insert into Tournament (GameType) values ('Fencing');
-- register players for tournaments
insert into Registration (PlayerID, TournamentID) values (1, 1);
insert into Registration (PlayerID, TournamentID) values (2, 1);
insert into Registration (PlayerID, TournamentID) values (3, 1);
insert into Registration (PlayerID, TournamentID) values (4, 1);
insert into Registration (PlayerID, TournamentID) values (1, 2);
insert into Registration (PlayerID, TournamentID) values (2, 2);
insert into Registration (PlayerID, TournamentID) values (3, 2);
insert into Registration (PlayerID, TournamentID) values (4, 2);
-- report badmitton matches
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (1, 1, 2, 2, 0, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (1, 3, 1, 4, 0, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (1, 1, 3, 3, 2, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (1, 2, 1, 4, 0, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (1, 1, 3, 4, 1, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (1, 2, 4, 3, 3, False);
-- report fencing matches
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (2, 5, 12, 6, 3, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (2, 7, 9, 8, 4, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (2, 5, 11, 7, 10, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (2, 6, 8, 8, 2, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (2, 5, 14, 8, 12, False);
insert into Match (TournamentID, Winner, WinnerPoints,
Loser, LoserPoints, IsATie)
values (2, 6, 11, 7, 7, False);