Skip to content

Commit

Permalink
added db.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
burakfircasiguzel committed Mar 9, 2022
1 parent 7e6cb8c commit 4f4a1a4
Showing 1 changed file with 209 additions and 0 deletions.
209 changes: 209 additions & 0 deletions db.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 */;

0 comments on commit 4f4a1a4

Please sign in to comment.