¾�ΥС�������ʸ�� �� 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. ��������

Chapter 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,
	temp_lo   int,
	temp_lo   int,
	prcp      real,
	date      date
);

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

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

ERROR:<unnamed> referential integrity violation - key referenced from weather not found in cities

���������ˤ�뿶�񤬥��ץꥱ�������˸�����Ĵ�¤���ޤ��������Υ��塼�ȥꥢ��ǤϤ�����������ˤϿʤߤޤ��󤬡�����˾����ߤ�������PostgreSQL �桼�����������������������������������������Ѥ���褦�ˤ���ȴְ㤤�ʤ��ǡ����١������ץꥱ�������μ�����夵���ޤ��ΤǿȤˤĤ��褦�����Ǥ���������