-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsert_into.sql
170 lines (145 loc) · 8.53 KB
/
insert_into.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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
-- Player table
-- two players
INSERT INTO Player (PlayerName) VALUES ("Hannu");
INSERT INTO Player (PlayerName) VALUES ("Antti");
INSERT INTO Player(PlayerName)
VALUES
("Ville");
-- Cash table
-- 30 x 500
INSERT INTO Cash (Value) VALUES (500),(500),(500),(500),(500);
INSERT INTO Cash (Value) VALUES (500),(500),(500),(500),(500);
INSERT INTO Cash (Value) VALUES (500),(500),(500),(500),(500);
INSERT INTO Cash (Value) VALUES (500),(500),(500),(500),(500);
INSERT INTO Cash (Value) VALUES (500),(500),(500),(500),(500);
INSERT INTO Cash (Value) VALUES (500),(500),(500),(500),(500);
-- 30x 100
INSERT INTO Cash (Value) VALUES (100),(100),(100),(100),(100);
INSERT INTO Cash (Value) VALUES (100),(100),(100),(100),(100);
INSERT INTO Cash (Value) VALUES (100),(100),(100),(100),(100);
INSERT INTO Cash (Value) VALUES (100),(100),(100),(100),(100);
INSERT INTO Cash (Value) VALUES (100),(100),(100),(100),(100);
INSERT INTO Cash (Value) VALUES (100),(100),(100),(100),(100);
-- 30x 50
INSERT INTO Cash (Value) VALUES (50),(50),(50),(50),(50);
INSERT INTO Cash (Value) VALUES (50),(50),(50),(50),(50);
INSERT INTO Cash (Value) VALUES (50),(50),(50),(50),(50);
INSERT INTO Cash (Value) VALUES (50),(50),(50),(50),(50);
INSERT INTO Cash (Value) VALUES (50),(50),(50),(50),(50);
INSERT INTO Cash (Value) VALUES (50),(50),(50),(50),(50);
-- total value of cash at this point: 19500
-- added 20, 10, 5 and 1 value cash
INSERT INTO Cash(Value)
VALUES
(20),(20),(20),(20),(20),(20),(20),(20),(20),(20),
(10),(10),(10),(10),(10),(10),(10),(10),(10),(10),
(10),(10),(10),(10),(10),(10),(10),(10),(10),(10),
(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),(5),
(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),
(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),
(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1);
-- Building table
-- 40 buildings
INSERT INTO Building (Type, Price) VALUES ("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100);
INSERT INTO Building (Type, Price) VALUES ("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100);
INSERT INTO Building (Type, Price) VALUES ("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100);
INSERT INTO Building (Type, Price) VALUES ("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100);
INSERT INTO Building (Type, Price) VALUES ("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100);
INSERT INTO Building (Type, Price) VALUES ("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100);
INSERT INTO Building (Type, Price) VALUES ("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100);
INSERT INTO Building (Type, Price) VALUES ("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100),("Hostel", 100);
-- 10 hotels
INSERT INTO Building (Type, Price) VALUES ("Hotel", 200),("Hotel", 200),("Hotel", 200),("Hotel", 200),("Hotel", 200);
INSERT INTO Building (Type, Price) VALUES ("Hotel", 200),("Hotel", 200),("Hotel", 200),("Hotel", 200),("Hotel", 200);
-- CellType table
-- maksa tulovero, sahkolaitos, vesilaitos ja maksa lisavero not implemented
INSERT INTO CellType (Name) values ("Start"),("Properties"),("Community"),("Transportation"),("Chance"),("Prison"),("Parking"),("Sentence");
-- Cell table
-- 1-10
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Start",0,0,0,1);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Korkeavuorenkatu",60,10,1,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Community Chest",0,0,0,3);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Kasarmikatu",60,10,1,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Pasilan asema",200,20,2,4);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Rantatie",100,15,3,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Chance",0,0,4,5);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Kauppatori",100,15,3,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Esplanadi",120,20,3,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Prison",0,0,0,6);
-- 11-19
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Hameentie",140,25,4,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Siltasaari",140,25,4,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Kaisaniemenkatu",160,30,4,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Sornaisten asema",200,20,2,4);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Liisankatu",180,35,5,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Community Chest",0,0,0,3);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Snellmaninkatu",180,35,5,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Unioninkatu",200,40,5,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Free parking",0,0,0,6);
-- 20-28
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Lonnrotinkatu",220,45,6,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Chance",0,0,4,5);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Annankatu",220,45,6,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Simonkatu",240,50,6,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Rautatieasema",200,20,2,4);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Mikonkatu",260,55,7,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Aleksanterinkatu",260,55,7,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Keskuskatu",280,60,7,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Go to Jail",0,0,0,6);
-- 29-38
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Tehtaankatu",300,65,8,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Eira",300,65,8,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Community Chest",0,0,0,3);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Bulevardi",320,70,8,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Tavara-asema",200,20,2,4);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Chance",0,0,4,5);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Mannerheimintie",350,75,9,2);
INSERT INTO Cell (Name,Price,Rent,SerieId,CellTypeId) VALUES ("Erottaja",400,85,9,2);
-- tokens
INSERT INTO Token (Name) VALUES ("Battleship"),("Cannon"),("Cat"),("Iron"),("Penguin"),("Racecar");
-- Initializing the first game
-- gamesession
INSERT INTO GameSession (WinnerId, WinnerCash, WinnerCell) VALUES (null, null, null);
INSERT INTO GameSession (WinnerId,WinnerCash,WinnerCell) VALUES (1,500,15),(2,300,20);
-- players to the gamesession. CellId is players' current position
INSERT INTO GameSession_has_player (PlayerId,GameSessionId,CellId) VALUES (1,1,1),(2,1,1);
INSERT INTO GameSession_has_player(PlayerId, GameSessionId, CellId)
VALUES
(3,1,1);
INSERT INTO GameSession_has_player (PlayerId,GameSessionId,CellId) VALUES (4,1,1);
INSERT INTO GameSession_has_player (PlayerId,GameSessionId,CellId) VALUES (1,2,5),(3,2,8);
-- Inserted starting cash to players; 2 x 500, 4 x 100, 1 x 50, 1 x 20, 2 x 10, 1 x 5, 5 x 1
INSERT INTO Player_has_Cash(PlayerId, CashId, GameSessionId)
VALUES
(1, 1, 1),(1, 2, 1),
(1, 31, 1),(1, 32, 1),(1, 33, 1),(1, 34, 1),
(1, 61, 1),
(1, 91, 1),
(1, 101, 1),(1, 102, 1),
(1, 121, 1),
(1, 141, 1),(1, 142, 1),(1, 143, 1),(1, 144, 1),(1, 145, 1),
(2, 3, 1),(2, 4, 1),
(2, 35, 1),(2, 36, 1),(2, 37, 1),(2, 38, 1),
(2, 62, 1),
(2, 92, 1),
(2, 103, 1),(2, 104, 1),
(2, 122, 1),
(2, 146, 1),(2, 147, 1),(2, 148, 1),(2, 149, 1),(2, 150, 1),
(3, 5, 1),(3, 6, 1),
(3, 39, 1),(3, 40, 1),(3, 41, 1),(3, 42, 1),
(3, 63, 1),
(3, 93, 1),
(3, 105, 1),(3, 106, 1),
(3, 123, 1),
(3, 151, 1),(3, 152, 1),(3, 153, 1),(3, 154, 1),(3, 155, 1);
INSERT INTO Player_has_Cash (PlayerId,CashId,GamesessionId) VALUES (4,7,1);
INSERT INTO Player_has_Cash (PlayerId,CashId,GameSessionId) VALUES (1,1,2),(3,2,2);
-- tokens to players
INSERT INTO Player_has_Token (PlayerId,TokenId,GameSessionId) VALUES (1,1,1),(2,2,1);
INSERT INTO Player_has_Token(PlayerId, TokenId, GameSessionId)
VALUES
(3, 3, 1);
-- buildings to players
INSERT INTO Player_has_Building (PlayerId,BuildingId,GameSessionId) VALUES (1,1,1),(1,2,1),(2,3,1);
-- properties (cells,shares) to players
INSERT INTO Player_has_Cell (PlayerId,CellId,GameSessionId) VALUES (1,2,1),(3,8,1),(2,15,1);