-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbmkg.sql
53 lines (44 loc) · 1.07 KB
/
bmkg.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
--
-- Database: `bmkg_cuaca`
--
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_cuaca`
--
CREATE TABLE `t_cuaca` (
`idWilayah` int(11) NOT NULL,
`jamCuaca` datetime NOT NULL,
`kodeCuaca` int(11) NOT NULL,
`cuaca` varchar(16) NOT NULL,
`humidity` int(3) NOT NULL,
`tempC` int(11) NOT NULL COMMENT 'Temperatur Celcius',
`tempF` int(11) NOT NULL COMMENT 'Temperatur Fahrenheit'
) ENGINE=InnoDB;
-- --------------------------------------------------------
--
-- Struktur dari tabel `t_wilayah`
--
CREATE TABLE `t_wilayah` (
`id` int(11) NOT NULL,
`propinsi` varchar(32) NOT NULL,
`kota` varchar(32) NOT NULL,
`kecamatan` varchar(32) NOT NULL,
`lat` decimal(8,6) NOT NULL,
`lon` decimal(9,6) NOT NULL
) ENGINE=InnoDB;
--
-- Indexes for dumped tables
--
--
-- Indeks untuk tabel `t_cuaca`
--
ALTER TABLE `t_cuaca`
ADD PRIMARY KEY (`idWilayah`,`jamCuaca`),
ADD KEY `jamCuaca` (`jamCuaca`),
ADD KEY `idWilayah` (`idWilayah`);
--
-- Indeks untuk tabel `t_wilayah`
--
ALTER TABLE `t_wilayah`
ADD PRIMARY KEY (`id`);
COMMIT;