ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/DBS/Schema/RefDBLegacy/OracleApps.sql
Revision: 1.9
Committed: Fri Jan 20 16:55:06 2006 UTC (19 years, 3 months ago) by lat
Content type: application/sql
Branch: MAIN
CVS Tags: BeforeJan2006SchemaChanges
Changes since 1.8: +3 -3 lines
Log Message:
Default to production tablespace names.

File Contents

# User Rev Content
1 lat 1.1 -- ======================================================================
2     create sequence seq_app_family;
3     create sequence seq_application;
4     create sequence seq_app_config;
5    
6     -- ======================================================================
7     create table t_app_family
8     (id integer not null,
9 lat 1.7 name varchar (1000) not null);
10 lat 1.1
11     create table t_application
12     (id integer not null,
13 lat 1.3 executable varchar (1000) not null,
14     app_version varchar (1000) not null,
15 lat 1.8 app_family integer not null);
16 lat 1.1
17     create table t_app_config
18     (id integer not null,
19     application integer not null,
20 lat 1.8 parameter_set varchar (1000) not null);
21 lat 1.1
22     -- ======================================================================
23     alter table t_app_family
24     add constraint pk_app_family
25     primary key (id)
26 lat 1.9 using index tablespace CMS_DBS_INDX01;
27 lat 1.1
28     alter table t_app_family
29     add constraint uq_app_family_name
30     unique (name);
31    
32     --
33     alter table t_application
34     add constraint pk_application
35     primary key (id)
36 lat 1.9 using index tablespace CMS_DBS_INDX01;
37 lat 1.1
38     alter table t_application
39     add constraint uq_application_key
40     unique (executable, app_version, app_family);
41    
42     alter table t_application
43     add constraint fk_app_family
44     foreign key (app_family) references t_app_family (id);
45    
46     --
47     alter table t_app_config
48     add constraint pk_app_config
49     primary key (id)
50 lat 1.9 using index tablespace CMS_DBS_INDX01;
51 lat 1.1
52     alter table t_app_config
53     add constraint uq_app_config
54 lat 1.8 unique (application, parameter_set);
55 lat 1.1
56     alter table t_app_config
57     add constraint fk_app_config_app
58     foreign key (application) references t_application (id);