<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>заметки на полях &#187; sql</title>
	<atom:link href="http://svdev.ru/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://svdev.ru</link>
	<description>Блокнот разработчика</description>
	<lastBuildDate>Thu, 08 Dec 2011 11:40:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Список городов по странам и регионам</title>
		<link>http://svdev.ru/blog/country-city-region-dump/</link>
		<comments>http://svdev.ru/blog/country-city-region-dump/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 02:09:47 +0000</pubDate>
		<dc:creator>Дерябин Сергей</dc:creator>
				<category><![CDATA[неразобранное]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://svdev.ru/?p=474</guid>
		<description><![CDATA[В архиве дамп трех табличек: страны регионы (с привязкой к стране) города (с привязкой к региону и стране) Кодировка файла UTF-8. Размер архива 4,7Мб. Забирать здесь. После заливки желательно прицепить ключи: ALTER TABLE region ADD CONSTRAINT fk_region_ref_country FOREIGN KEY &#40;country_id&#41; REFERENCES country &#40;id&#41; ON DELETE RESTRICT ON UPDATE cascade; ALTER TABLE city ADD CONSTRAINT fk_city_ref_region [...]]]></description>
			<content:encoded><![CDATA[<p>В архиве дамп трех табличек:</p>
<ul>
<li>страны</li>
<li>регионы (с привязкой к стране)</li>
<li>города (с привязкой к региону и стране)</li>
</ul>
<p>Кодировка файла UTF-8. Размер архива 4,7Мб. Забирать <a href="http://svdev.ru/wp-content/uploads/2010/02/geo.sql_.gz">здесь</a>.</p>
<p>После заливки желательно прицепить ключи:</p>
<div class="codecolorer-container sql vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="sql codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> region <span style="color: #993333; font-weight: bold;">ADD</span> <span style="color: #993333; font-weight: bold;">CONSTRAINT</span> fk_region_ref_country <span style="color: #993333; font-weight: bold;">FOREIGN</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>country_id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">REFERENCES</span> country <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">RESTRICT</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">UPDATE</span> cascade;<br />
<span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> city <span style="color: #993333; font-weight: bold;">ADD</span> <span style="color: #993333; font-weight: bold;">CONSTRAINT</span> fk_city_ref_region <span style="color: #993333; font-weight: bold;">FOREIGN</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>region_id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">REFERENCES</span> region <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">RESTRICT</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">UPDATE</span> cascade;<br />
<span style="color: #993333; font-weight: bold;">ALTER</span> <span style="color: #993333; font-weight: bold;">TABLE</span> city <span style="color: #993333; font-weight: bold;">ADD</span> <span style="color: #993333; font-weight: bold;">CONSTRAINT</span> fk_city_ref_country <span style="color: #993333; font-weight: bold;">FOREIGN</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">&#40;</span>country_id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">REFERENCES</span> country <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">DELETE</span> <span style="color: #993333; font-weight: bold;">RESTRICT</span> <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #993333; font-weight: bold;">UPDATE</span> cascade;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://svdev.ru/blog/country-city-region-dump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

