-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb.sql
209 lines (166 loc) · 7.59 KB
/
db.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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 09 Mar 2022, 13:37:58
-- Sunucu sürümü: 10.4.17-MariaDB
-- PHP Sürümü: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Veritabanı: `jsfblog`
--
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `admin`
--
CREATE TABLE `admin` (
`id` int(11) NOT NULL,
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Tablo döküm verisi `admin`
--
INSERT INTO `admin` (`id`, `username`, `password`) VALUES
(1, 'admin', '1a1dc91c907325c69271ddf0c944bc72');
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `blog`
--
CREATE TABLE `blog` (
`id` int(10) NOT NULL,
`title` varchar(255) DEFAULT NULL,
`detail` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Tablo döküm verisi `blog`
--
INSERT INTO `blog` (`id`, `title`, `detail`) VALUES
(31, 'New York City', 'New York, often called New York City (NYC) to distinguish it from the state of New York, is the most populous city in the United States. With a 2020 population of 8,804,190 distributed over 300.46 square miles (778.2 km2), New York City is also the most densely populated major city in the United States. Located at the southern tip of the state of New York, the city is the center of the New York metropolitan area, the largest metropolitan area in the world by urban area.[9] With over 20.1 million people in its metropolitan statistical area and 23.5 million in its combined statistical area as of 2020, New York is one of the world\'s most populous megacities. New York City has been described as the cultural, financial, and media capital of the world, significantly influencing commerce, entertainment, research, technology, education, politics, tourism, dining, art, fashion, and sports, and is the most photographed city in the world.[10] Home to the headquarters of the United Nations, New York is an important center for international diplomacy,[11][12] and has sometimes been called the capital of the world.'),
(32, 'Istanbul', 'Istanbul, formerly known as Constantinople, is the largest city in Turkey, serving as the country\'s economic, cultural and historic hub. The city straddles the Bosporus strait, lying in both Europe and Asia, and has a population of over 15 million residents, comprising 19% of the population of Turkey. Istanbul is the most populous European city, and the world\'s 15th-largest city.'),
(33, 'Munich', 'Munich, Bavarian: is the capital and most populous city of the German state of Bavaria. With a population of 1,558,395 inhabitants as of 31 July 2020,[4] it is the third-largest city in Germany, after Berlin and Hamburg, and thus the largest which does not constitute its own state, as well as the 11th-largest city in the European Union. The city\'s metropolitan region is home to 6 million people.'),
(34, 'Paris', 'Paris is the capital and most populous city of France, with an estimated population of 2,165,423 residents in 2019 in an area of more than 105 square kilometres (41 square miles),[4] making it the 34th most densely populated city in the world in 2020.[5] Since the 17th century, Paris has been one of the world\'s major centres of finance, diplomacy, commerce, fashion, gastronomy, science, and arts. The City of Paris is the centre and seat of government of the region and province of Île-de-France, or Paris Region, with an estimated population of 12,997,058 in 2020,[6] or about 18 percent of the population of France,[7] making it in 2020 the largest metropolitan area in Europe,[8] and 14th largest in the world in 2015.[9] The Paris Region had a GDP of €709 billion ($808 billion) in 2017.[10] According to the Economist Intelligence Unit Worldwide Cost of Living Survey in 2018, Paris was the second most expensive city in the world, after Singapore and ahead of Zürich, Hong Kong, Oslo, and Geneva.[11] Another source ranked Paris as most expensive, on par with Singapore and Hong Kong, in 2018');
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `blog_category`
--
CREATE TABLE `blog_category` (
`blog_id` int(10) NOT NULL,
`category_id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Tablo döküm verisi `blog_category`
--
INSERT INTO `blog_category` (`blog_id`, `category_id`) VALUES
(31, 12),
(32, 14),
(33, 13),
(34, 15);
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `category`
--
CREATE TABLE `category` (
`id` int(10) NOT NULL,
`name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Tablo döküm verisi `category`
--
INSERT INTO `category` (`id`, `name`) VALUES
(12, 'United States'),
(13, 'Germany'),
(14, 'Turkey'),
(15, 'France'),
(16, 'Italy');
-- --------------------------------------------------------
--
-- Tablo için tablo yapısı `document`
--
CREATE TABLE `document` (
`id` int(11) NOT NULL,
`blog_id` int(11) DEFAULT NULL,
`path` varchar(255) DEFAULT NULL,
`name` varchar(255) DEFAULT NULL,
`type` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Tablo döküm verisi `document`
--
INSERT INTO `document` (`id`, `blog_id`, `path`, `name`, `type`) VALUES
(26, 31, '\\Users\\ELOCK2\\Documents\\NetBeansProjects\\BlogApp\\img', 'newyork2.jpg', 'image/jpeg'),
(27, 32, '\\Users\\ELOCK2\\Documents\\NetBeansProjects\\BlogApp\\img', 'istanbul.png', 'image/png'),
(28, 33, '\\Users\\ELOCK2\\Documents\\NetBeansProjects\\BlogApp\\img', 'munich.jpg', 'image/jpeg'),
(29, 34, '\\Users\\ELOCK2\\Documents\\NetBeansProjects\\BlogApp\\img', 'paris.jpg', 'image/jpeg');
--
-- Dökümü yapılmış tablolar için indeksler
--
--
-- Tablo için indeksler `admin`
--
ALTER TABLE `admin`
ADD PRIMARY KEY (`id`);
--
-- Tablo için indeksler `blog`
--
ALTER TABLE `blog`
ADD PRIMARY KEY (`id`);
--
-- Tablo için indeksler `blog_category`
--
ALTER TABLE `blog_category`
ADD PRIMARY KEY (`blog_id`,`category_id`),
ADD KEY `category_id` (`category_id`),
ADD KEY `blog_id` (`blog_id`);
--
-- Tablo için indeksler `category`
--
ALTER TABLE `category`
ADD PRIMARY KEY (`id`);
--
-- Tablo için indeksler `document`
--
ALTER TABLE `document`
ADD PRIMARY KEY (`id`);
--
-- Dökümü yapılmış tablolar için AUTO_INCREMENT değeri
--
--
-- Tablo için AUTO_INCREMENT değeri `admin`
--
ALTER TABLE `admin`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- Tablo için AUTO_INCREMENT değeri `blog`
--
ALTER TABLE `blog`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;
--
-- Tablo için AUTO_INCREMENT değeri `category`
--
ALTER TABLE `category`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- Tablo için AUTO_INCREMENT değeri `document`
--
ALTER TABLE `document`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;
--
-- Dökümü yapılmış tablolar için kısıtlamalar
--
--
-- Tablo kısıtlamaları `blog_category`
--
ALTER TABLE `blog_category`
ADD CONSTRAINT `blog_category_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;