Table
audio_guide_hire
Each hire: ticket, device, language, issuing and returning wing, times and payment.
Replaces in 2020: Hired Audio Guide
Rows 1,026–1,050 of 1,085
| hire_idINTEGER | ticket_id→ ticket.ticket_id | serial_number→ audio_guide_device.serial_number | order_id→ purchase_order.order_id | language_code→ language.language_code | issued_wing_id→ wing.wing_id | issued_atTEXT | returned_wing_id→ wing.wing_id | returned_atTEXT |
|---|---|---|---|---|---|---|---|---|
| 1026 | 9500 | D207S645U1857P52 | 5136 | zh | 3 | 2019-12-05 10:03:59 | 3 | 2019-12-05 11:44:20 |
| 1027 | 9513 | D127T102L7940A93 | 5147 | en | 1 | 2019-12-07 12:16:38 | 2 | 2019-12-07 13:33:13 |
| 1028 | 9523 | D601B335Z9665H81 | 5149 | en | 3 | 2019-12-08 09:36:42 | 2 | 2019-12-08 11:14:58 |
| 1029 | 9515 | D570K624F8858E76 | 5150 | fr | 2 | 2019-12-08 10:53:47 | 2 | 2019-12-08 12:52:55 |
| 1030 | 9532 | D952G324M2778N96 | 5157 | en | 1 | 2019-12-10 12:40:54 | 3 | 2019-12-10 14:37:44 |
| 1031 | 9534 | D511E829D1120P99 | 5159 | pt | 2 | 2019-12-10 14:35:04 | 3 | 2019-12-10 16:45:01 |
| 1032 | 9502 | D607F479P4765P37 | 5160 | sv | 2 | 2019-12-10 15:22:22 | 2 | 2019-12-10 17:45:24 |
| 1033 | 9448 | D127T102L7940A93 | 5176 | en | 2 | 2019-12-15 15:19:52 | 2 | 2019-12-15 17:03:25 |
| 1034 | 9547 | D592Z759N4619V32 | 5185 | en | 2 | 2019-12-17 10:38:49 | 1 | 2019-12-17 13:25:20 |
| 1035 | 9507 | D119M445Z8873B29 | 5187 | en | 3 | 2019-12-17 13:41:58 | 1 | 2019-12-17 15:14:52 |
| 1036 | 9568 | D601B335Z9665H81 | 5194 | en | 3 | 2019-12-19 14:30:27 | 3 | 2019-12-19 16:45:02 |
| 1037 | 9556 | D561K998R8427R26 | 5200 | fr | 2 | 2019-12-21 10:33:23 | 2 | 2019-12-21 11:21:52 |
| 1038 | 9489 | D438U949Y7280M45 | 5202 | en | 2 | 2019-12-22 11:13:02 | 1 | 2019-12-22 12:36:17 |
| 1039 | 9582 | D689M436C2815G77 | 5206 | fr | 2 | 2019-12-23 13:10:51 | 2 | 2019-12-23 14:20:23 |
| 1040 | 9576 | D845W425F3685F62 | 5215 | fr | 2 | 2019-12-24 15:38:53 | 1 | 2019-12-24 17:42:26 |
| 1041 | 9560 | D710U525C8071V72 | 5216 | ko | 1 | 2019-12-24 15:55:09 | 3 | 2019-12-24 17:50:35 |
| 1042 | 9562 | D510H421W1552A28 | 5217 | ko | 2 | 2019-12-24 16:00:38 | 3 | 2019-12-24 18:10:00 |
| 1043 | 9440 | D127T102L7940A93 | 5219 | nl | 2 | 2019-12-25 11:54:34 | 3 | 2019-12-25 16:11:20 |
| 1044 | 9442 | D432J989K2788F27 | 5221 | nl | 1 | 2019-12-25 11:59:57 | 1 | 2019-12-25 13:36:35 |
| 1045 | 9417 | D910N244E8046F15 | 5222 | en | 1 | 2019-12-26 12:47:27 | 2 | 2019-12-26 14:48:40 |
| 1046 | 9607 | D332R599Y1992N37 | 5225 | en | 2 | 2019-12-27 11:29:44 | 2 | 2019-12-27 14:15:38 |
| 1047 | 9558 | D736D252Z3041D49 | 5230 | en | 1 | 2019-12-28 12:08:05 | 1 | 2019-12-28 13:45:43 |
| 1048 | 9622 | D561K998R8427R26 | 5235 | en | 2 | 2019-12-29 11:30:35 | 2 | 2019-12-29 13:31:56 |
| 1049 | 9623 | D592Z759N4619V32 | 5237 | nl | 1 | 2019-12-30 09:28:34 | 3 | 2019-12-30 11:13:36 |
| 1050 | 9581 | D601B335Z9665H81 | 5240 | ko | 2 | 2019-12-30 11:57:23 | 1 | 2019-12-30 13:08:03 |
Table definition
CREATE TABLE audio_guide_hire (
hire_id INTEGER PRIMARY KEY,
ticket_id INTEGER NOT NULL REFERENCES ticket (ticket_id),
serial_number TEXT NOT NULL REFERENCES audio_guide_device (serial_number),
order_id INTEGER NOT NULL UNIQUE REFERENCES purchase_order (order_id),
language_code TEXT NOT NULL REFERENCES language (language_code),
issued_wing_id INTEGER NOT NULL REFERENCES wing (wing_id),
issued_at TEXT NOT NULL,
returned_wing_id INTEGER REFERENCES wing (wing_id),
returned_at TEXT,
CHECK ((returned_at IS NULL) = (returned_wing_id IS NULL)),
CHECK (returned_at IS NULL OR returned_at > issued_at)
) STRICT;