donb
committed
on 15 May 10
Fixed two constraint naming errors.
/oracle/ref-countries-create.sql (+2 -2)
1 1 -- packages/ref-country/sql/oracle/ref-countries-create.sql
2 2 --
3 3 -- @author jon@jongriffin.com.com
4 4 -- @creation-date 2001-08-27
5 5 -- @cvs-id $Id$
6 6
7 7 -- country is taken from ISO 3166
8 8
9 9 -- probably ought to add a note about analyze for efficiency on non-integer primary keys
10 10
11 11 create table countries (
12 12     -- this violates 3nf but is used for 2 reasons
13 13     -- 1. to help efficiency
14 14     -- 2. to make querys not fail if no translation exists yet
15 15     default_name varchar(100)
16 16         constraint countries_default_name_nn
17 17         not null
18           constraint countries_default_name_uq
  18         constraint countries_default_name_un
19 19         unique,
20 20     iso char(2)
21 21         constraint countries_iso_pk
22 22         primary key
23 23 );
24 24
25 25 comment on table countries is '
26 26     This is the country code/english name table from ISO 3166.
27 27 ';
28 28
29 29 comment on column countries.default_name is '
30 30     This is admittedly a violation of 3NF but it is more efficient and helps with non-translated values.
31 31 See country.sql for more comments.
32 32 ';
33 33
34 34 -- add this table into the reference repository
35 35 declare
36 36     v_id integer;
37 37 begin
38 38     v_id := acs_reference.new(