¾�ΥС�������ʸ�� �� 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9.6 | 9.5 | 9.4 | 9.3 | 9.2 | 9.1 | 9.0 | 8.4 | 8.3 | 8.2 | 8.1 | 8.0 | 7.4 | 7.3 | 7.2

3.3. ��������

第2章��weather�ơ��֥��cities�ơ��֥��פ��Ф��Ƥ������������Τ褦����������ͤ��Ƥߤޤ��礦��cities�ơ��֥�˰��פ�����ܤ��ʤ��Ԥ����Ф�weather�ơ��֥�������Ǥ��ʤ��������Ȥ��ޤ��������ǡ����������������������ȸƤӤޤ����Ǥ�ñ��ʥǡ����١��������ƥ�Ǥ�cities�ơ��֥�˰��פ���Ԥ�¸�ߤ��뤫�ɤ�����ǽ�˸��ڤ��Ƥ���weather�ơ��֥�˿����쥳���ɤ��ɲä��뤫�ݤ���������ʤ���Фʤ�ޤ��󡣤��μ�ˡ�ˤ�¿�������꤬���뤳�ȡ������ƤȤƤ����ؤǤ��뤳�Ȥ��顢PostgreSQL�����äƺ�Ȥ����뤳�Ȥ��Ǥ��ޤ���

�����Υơ��֥������ϰʲ��Τ褦�ˤʤ�ޤ���

CREATE TABLE cities (
         city     varchar(80) primary key,
	 location point
);

CREATE TABLE weather (
	city      varchar(80) references cities(city),
	temp_lo   int,
	temp_hi   int,
	prcp      real,
	date      date
);

�Ǥ�̵���ʥ쥳���ɤ��������Ƥߤޤ��礦��

INSERT INTO weather VALUES ('Berkeley', 45, 53, 0.0, '1994-11-28');

ERROR:  insert or update on table "weather" violates foreign key constraint "weather_city_fkey"
DETAIL:  Key (city)=(Berkeley) is not present in table "cities".

���������ˤ�뿶�񤤤ǥ��ץꥱ������󤬸����˥��塼�˥󥰤���ޤ��������Υ��塼�ȥꥢ��ǤϤ��δ�ñ����������ˤϿʤߤޤ��󤬡�����˾��󤬤ۤ�������第5章���������������������������������Ѥ���褦�ˤ���ȡ��ְ㤤�ʤ��ǡ����١������ץꥱ�������μ�����夵���ޤ��ΤǿȤ��դ��褦�����Ǥ���������