|
42 | 42 | }, |
43 | 43 | { |
44 | 44 | "cell_type": "code", |
45 | | - "execution_count": 3, |
| 45 | + "execution_count": 1, |
46 | 46 | "id": "fc703fb8", |
47 | 47 | "metadata": {}, |
48 | | - "outputs": [], |
| 48 | + "outputs": [ |
| 49 | + { |
| 50 | + "name": "stderr", |
| 51 | + "output_type": "stream", |
| 52 | + "text": [ |
| 53 | + "[2023-10-31 21:29:48,070][INFO]: Connecting [email protected]:3306\n", |
| 54 | + "[2023-10-31 21:29:48,100][INFO]: Connected [email protected]:3306\n" |
| 55 | + ] |
| 56 | + } |
| 57 | + ], |
49 | 58 | "source": [ |
50 | 59 | "import datajoint as dj\n", |
51 | 60 | "schema = dj.Schema('hotel')" |
52 | 61 | ] |
53 | 62 | }, |
54 | 63 | { |
55 | 64 | "cell_type": "code", |
56 | | - "execution_count": 4, |
| 65 | + "execution_count": 2, |
57 | 66 | "id": "62d97e04", |
58 | 67 | "metadata": {}, |
59 | 68 | "outputs": [], |
|
69 | 78 | }, |
70 | 79 | { |
71 | 80 | "cell_type": "code", |
72 | | - "execution_count": 5, |
| 81 | + "execution_count": 3, |
73 | 82 | "id": "280e7440", |
74 | 83 | "metadata": {}, |
75 | 84 | "outputs": [], |
|
86 | 95 | }, |
87 | 96 | { |
88 | 97 | "cell_type": "code", |
89 | | - "execution_count": 6, |
| 98 | + "execution_count": 4, |
90 | 99 | "id": "dc952e39", |
91 | 100 | "metadata": {}, |
92 | 101 | "outputs": [], |
|
103 | 112 | }, |
104 | 113 | { |
105 | 114 | "cell_type": "code", |
106 | | - "execution_count": 7, |
| 115 | + "execution_count": 5, |
107 | 116 | "id": "14929f5b", |
108 | 117 | "metadata": {}, |
109 | 118 | "outputs": [], |
|
120 | 129 | }, |
121 | 130 | { |
122 | 131 | "cell_type": "code", |
123 | | - "execution_count": 8, |
| 132 | + "execution_count": 6, |
124 | 133 | "id": "61f03f74", |
125 | 134 | "metadata": {}, |
126 | 135 | "outputs": [], |
|
134 | 143 | }, |
135 | 144 | { |
136 | 145 | "cell_type": "code", |
137 | | - "execution_count": 9, |
| 146 | + "execution_count": 7, |
138 | 147 | "id": "c163c97c", |
139 | 148 | "metadata": {}, |
140 | 149 | "outputs": [], |
|
148 | 157 | }, |
149 | 158 | { |
150 | 159 | "cell_type": "code", |
151 | | - "execution_count": 10, |
| 160 | + "execution_count": 8, |
152 | 161 | "id": "c98936a8", |
153 | 162 | "metadata": {}, |
154 | 163 | "outputs": [ |
|
159 | 168 | "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 323)\">\n", |
160 | 169 | "<title>%3</title>\n", |
161 | 170 | "<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-323 168,-323 168,4 -4,4\"/>\n", |
162 | | - "<!-- CheckIn -->\n", |
163 | | - "<g id=\"node1\" class=\"node\">\n", |
164 | | - "<title>CheckIn</title>\n", |
165 | | - "<g id=\"a_node1\"><a xlink:title=\"→ Reservation\r\">\n", |
166 | | - "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"99.5,-106 38.5,-106 38.5,-71 99.5,-71 99.5,-106\"/>\n", |
167 | | - "<text text-anchor=\"middle\" x=\"69\" y=\"-85.4\" font-family=\"arial\" font-size=\"12.00\" fill=\"darkgreen\">CheckIn</text>\n", |
168 | | - "</a>\n", |
169 | | - "</g>\n", |
170 | | - "</g>\n", |
171 | 171 | "<!-- CheckOut -->\n", |
172 | | - "<g id=\"node3\" class=\"node\">\n", |
| 172 | + "<g id=\"node1\" class=\"node\">\n", |
173 | 173 | "<title>CheckOut</title>\n", |
174 | | - "<g id=\"a_node3\"><a xlink:title=\"→ CheckIn\r\">\n", |
175 | | - "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"104,-35 34,-35 34,0 104,0 104,-35\"/>\n", |
176 | | - "<text text-anchor=\"middle\" x=\"69\" y=\"-14.4\" font-family=\"arial\" font-size=\"12.00\" fill=\"darkgreen\">CheckOut</text>\n", |
| 174 | + "<g id=\"a_node1\"><a xlink:title=\"→ CheckIn\r\">\n", |
| 175 | + "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"129,-35 59,-35 59,0 129,0 129,-35\"/>\n", |
| 176 | + "<text text-anchor=\"middle\" x=\"94\" y=\"-14.4\" font-family=\"arial\" font-size=\"12.00\" fill=\"darkgreen\">CheckOut</text>\n", |
177 | 177 | "</a>\n", |
178 | 178 | "</g>\n", |
179 | 179 | "</g>\n", |
180 | | - "<!-- CheckIn->CheckOut -->\n", |
181 | | - "<g id=\"edge1\" class=\"edge\">\n", |
182 | | - "<title>CheckIn->CheckOut</title>\n", |
183 | | - "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"2\" stroke-opacity=\"0.250980\" d=\"M69,-70.8C69,-59.95 69,-45.87 69,-35.05\"/>\n", |
184 | | - "</g>\n", |
185 | 180 | "<!-- Room -->\n", |
186 | 181 | "<g id=\"node2\" class=\"node\">\n", |
187 | 182 | "<title>Room</title>\n", |
188 | 183 | "<g id=\"a_node2\"><a xlink:title=\"room \r------------------------------\rroom_type \r\">\n", |
189 | | - "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"139.5,-319 90.5,-319 90.5,-284 139.5,-284 139.5,-319\"/>\n", |
190 | | - "<text text-anchor=\"start\" x=\"98.5\" y=\"-299.4\" font-family=\"arial\" text-decoration=\"underline\" font-size=\"12.00\" fill=\"darkgreen\">Room</text>\n", |
| 184 | + "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"73.5,-319 24.5,-319 24.5,-284 73.5,-284 73.5,-319\"/>\n", |
| 185 | + "<text text-anchor=\"start\" x=\"32.5\" y=\"-299.4\" font-family=\"arial\" text-decoration=\"underline\" font-size=\"12.00\" fill=\"darkgreen\">Room</text>\n", |
191 | 186 | "</a>\n", |
192 | 187 | "</g>\n", |
193 | 188 | "</g>\n", |
194 | 189 | "<!-- RoomAvailable -->\n", |
195 | 190 | "<g id=\"node5\" class=\"node\">\n", |
196 | 191 | "<title>RoomAvailable</title>\n", |
197 | 192 | "<g id=\"a_node5\"><a xlink:title=\"→ Room\rdate \r------------------------------\rprice \r\">\n", |
198 | | - "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"164,-248 66,-248 66,-213 164,-213 164,-248\"/>\n", |
199 | | - "<text text-anchor=\"start\" x=\"74\" y=\"-228.4\" font-family=\"arial\" text-decoration=\"underline\" font-size=\"12.00\" fill=\"darkgreen\">RoomAvailable</text>\n", |
| 193 | + "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"98,-248 0,-248 0,-213 98,-213 98,-248\"/>\n", |
| 194 | + "<text text-anchor=\"start\" x=\"8\" y=\"-228.4\" font-family=\"arial\" text-decoration=\"underline\" font-size=\"12.00\" fill=\"darkgreen\">RoomAvailable</text>\n", |
200 | 195 | "</a>\n", |
201 | 196 | "</g>\n", |
202 | 197 | "</g>\n", |
203 | 198 | "<!-- Room->RoomAvailable -->\n", |
204 | | - "<g id=\"edge2\" class=\"edge\">\n", |
| 199 | + "<g id=\"edge1\" class=\"edge\">\n", |
205 | 200 | "<title>Room->RoomAvailable</title>\n", |
206 | | - "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"0.75\" stroke-opacity=\"0.250980\" d=\"M115,-283.8C115,-272.95 115,-258.87 115,-248.05\"/>\n", |
| 201 | + "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"0.75\" stroke-opacity=\"0.250980\" d=\"M49,-283.8C49,-272.95 49,-258.87 49,-248.05\"/>\n", |
207 | 202 | "</g>\n", |
208 | | - "<!-- Guest -->\n", |
209 | | - "<g id=\"node4\" class=\"node\">\n", |
210 | | - "<title>Guest</title>\n", |
211 | | - "<g id=\"a_node4\"><a xlink:title=\"guest_id \r------------------------------\rguest_name \rINDEX (guest_name)\r\">\n", |
212 | | - "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"48,-248 0,-248 0,-213 48,-213 48,-248\"/>\n", |
213 | | - "<text text-anchor=\"start\" x=\"8\" y=\"-228.4\" font-family=\"arial\" text-decoration=\"underline\" font-size=\"12.00\" fill=\"darkgreen\">Guest</text>\n", |
| 203 | + "<!-- CheckIn -->\n", |
| 204 | + "<g id=\"node3\" class=\"node\">\n", |
| 205 | + "<title>CheckIn</title>\n", |
| 206 | + "<g id=\"a_node3\"><a xlink:title=\"→ Reservation\r\">\n", |
| 207 | + "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"124.5,-106 63.5,-106 63.5,-71 124.5,-71 124.5,-106\"/>\n", |
| 208 | + "<text text-anchor=\"middle\" x=\"94\" y=\"-85.4\" font-family=\"arial\" font-size=\"12.00\" fill=\"darkgreen\">CheckIn</text>\n", |
214 | 209 | "</a>\n", |
215 | 210 | "</g>\n", |
216 | 211 | "</g>\n", |
| 212 | + "<!-- CheckIn->CheckOut -->\n", |
| 213 | + "<g id=\"edge2\" class=\"edge\">\n", |
| 214 | + "<title>CheckIn->CheckOut</title>\n", |
| 215 | + "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"2\" stroke-opacity=\"0.250980\" d=\"M94,-70.8C94,-59.95 94,-45.87 94,-35.05\"/>\n", |
| 216 | + "</g>\n", |
217 | 217 | "<!-- Reservation -->\n", |
218 | | - "<g id=\"node6\" class=\"node\">\n", |
| 218 | + "<g id=\"node4\" class=\"node\">\n", |
219 | 219 | "<title>Reservation</title>\n", |
220 | | - "<g id=\"a_node6\"><a xlink:title=\"→ RoomAvailable\r------------------------------\r→ Guest\rcredit_card \r\">\n", |
221 | | - "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"109.5,-177 28.5,-177 28.5,-142 109.5,-142 109.5,-177\"/>\n", |
222 | | - "<text text-anchor=\"middle\" x=\"69\" y=\"-156.4\" font-family=\"arial\" font-size=\"12.00\" fill=\"darkgreen\">Reservation</text>\n", |
| 220 | + "<g id=\"a_node4\"><a xlink:title=\"→ RoomAvailable\r------------------------------\r→ Guest\rcredit_card \r\">\n", |
| 221 | + "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"134.5,-177 53.5,-177 53.5,-142 134.5,-142 134.5,-177\"/>\n", |
| 222 | + "<text text-anchor=\"middle\" x=\"94\" y=\"-156.4\" font-family=\"arial\" font-size=\"12.00\" fill=\"darkgreen\">Reservation</text>\n", |
223 | 223 | "</a>\n", |
224 | 224 | "</g>\n", |
225 | 225 | "</g>\n", |
226 | | - "<!-- Guest->Reservation -->\n", |
| 226 | + "<!-- Reservation->CheckIn -->\n", |
227 | 227 | "<g id=\"edge3\" class=\"edge\">\n", |
228 | | - "<title>Guest->Reservation</title>\n", |
229 | | - "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"0.75\" stroke-dasharray=\"5,2\" stroke-opacity=\"0.250980\" d=\"M34.89,-212.8C41.97,-201.95 51.15,-187.87 58.21,-177.05\"/>\n", |
| 228 | + "<title>Reservation->CheckIn</title>\n", |
| 229 | + "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"2\" stroke-opacity=\"0.250980\" d=\"M94,-141.8C94,-130.95 94,-116.87 94,-106.05\"/>\n", |
230 | 230 | "</g>\n", |
231 | 231 | "<!-- RoomAvailable->Reservation -->\n", |
232 | 232 | "<g id=\"edge4\" class=\"edge\">\n", |
233 | 233 | "<title>RoomAvailable->Reservation</title>\n", |
234 | | - "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"2\" stroke-opacity=\"0.250980\" d=\"M103.86,-212.8C96.63,-201.95 87.24,-187.87 80.03,-177.05\"/>\n", |
| 234 | + "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"2\" stroke-opacity=\"0.250980\" d=\"M59.89,-212.8C66.97,-201.95 76.15,-187.87 83.21,-177.05\"/>\n", |
235 | 235 | "</g>\n", |
236 | | - "<!-- Reservation->CheckIn -->\n", |
| 236 | + "<!-- Guest -->\n", |
| 237 | + "<g id=\"node6\" class=\"node\">\n", |
| 238 | + "<title>Guest</title>\n", |
| 239 | + "<g id=\"a_node6\"><a xlink:title=\"guest_id \r------------------------------\rguest_name \rINDEX (guest_name)\r\">\n", |
| 240 | + "<polygon fill=\"#00ff00\" fill-opacity=\"0.188235\" stroke=\"#00ff00\" stroke-opacity=\"0.188235\" points=\"164,-248 116,-248 116,-213 164,-213 164,-248\"/>\n", |
| 241 | + "<text text-anchor=\"start\" x=\"124\" y=\"-228.4\" font-family=\"arial\" text-decoration=\"underline\" font-size=\"12.00\" fill=\"darkgreen\">Guest</text>\n", |
| 242 | + "</a>\n", |
| 243 | + "</g>\n", |
| 244 | + "</g>\n", |
| 245 | + "<!-- Guest->Reservation -->\n", |
237 | 246 | "<g id=\"edge5\" class=\"edge\">\n", |
238 | | - "<title>Reservation->CheckIn</title>\n", |
239 | | - "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"2\" stroke-opacity=\"0.250980\" d=\"M69,-141.8C69,-130.95 69,-116.87 69,-106.05\"/>\n", |
| 247 | + "<title>Guest->Reservation</title>\n", |
| 248 | + "<path fill=\"none\" stroke=\"#000000\" stroke-width=\"0.75\" stroke-dasharray=\"5,2\" stroke-opacity=\"0.250980\" d=\"M128.86,-212.8C121.63,-201.95 112.24,-187.87 105.03,-177.05\"/>\n", |
240 | 249 | "</g>\n", |
241 | 250 | "</g>\n", |
242 | 251 | "</svg>" |
243 | 252 | ], |
244 | 253 | "text/plain": [ |
245 | | - "<datajoint.diagram.Diagram at 0x7fc158a80c40>" |
| 254 | + "<datajoint.diagram.Diagram at 0x7efe9ef203a0>" |
246 | 255 | ] |
247 | 256 | }, |
248 | | - "execution_count": 10, |
| 257 | + "execution_count": 8, |
249 | 258 | "metadata": {}, |
250 | 259 | "output_type": "execute_result" |
251 | 260 | } |
|
264 | 273 | }, |
265 | 274 | { |
266 | 275 | "cell_type": "code", |
267 | | - "execution_count": 11, |
| 276 | + "execution_count": 9, |
268 | 277 | "id": "64060872", |
269 | 278 | "metadata": {}, |
270 | 279 | "outputs": [], |
|
278 | 287 | }, |
279 | 288 | { |
280 | 289 | "cell_type": "code", |
281 | | - "execution_count": 12, |
| 290 | + "execution_count": 10, |
282 | 291 | "id": "281c8ca7", |
283 | 292 | "metadata": {}, |
284 | 293 | "outputs": [], |
|
289 | 298 | }, |
290 | 299 | { |
291 | 300 | "cell_type": "code", |
292 | | - "execution_count": 13, |
| 301 | + "execution_count": 11, |
293 | 302 | "id": "86bc4436", |
294 | 303 | "metadata": {}, |
295 | 304 | "outputs": [ |
296 | 305 | { |
297 | 306 | "name": "stderr", |
298 | 307 | "output_type": "stream", |
299 | 308 | "text": [ |
300 | | - "100%|██████████| 45/45 [00:02<00:00, 20.91it/s]\n" |
| 309 | + "100%|██████████| 45/45 [00:01<00:00, 23.68it/s]\n" |
301 | 310 | ] |
302 | 311 | } |
303 | 312 | ], |
|
325 | 334 | }, |
326 | 335 | { |
327 | 336 | "cell_type": "code", |
328 | | - "execution_count": 16, |
| 337 | + "execution_count": 12, |
329 | 338 | "id": "48470620", |
330 | 339 | "metadata": {}, |
331 | 340 | "outputs": [], |
|
340 | 349 | }, |
341 | 350 | { |
342 | 351 | "cell_type": "code", |
343 | | - "execution_count": 17, |
| 352 | + "execution_count": 13, |
344 | 353 | "id": "5603309c", |
345 | 354 | "metadata": {}, |
346 | 355 | "outputs": [], |
|
368 | 377 | }, |
369 | 378 | { |
370 | 379 | "cell_type": "code", |
371 | | - "execution_count": 18, |
| 380 | + "execution_count": 14, |
372 | 381 | "id": "fd3b9e30", |
373 | 382 | "metadata": {}, |
374 | 383 | "outputs": [], |
|
384 | 393 | }, |
385 | 394 | { |
386 | 395 | "cell_type": "code", |
387 | | - "execution_count": 19, |
| 396 | + "execution_count": 15, |
388 | 397 | "id": "09e340e2", |
389 | 398 | "metadata": {}, |
390 | 399 | "outputs": [], |
|
0 commit comments